diff options
author | Marek Polacek <polacek@redhat.com> | 2020-02-12 14:00:51 -0500 |
---|---|---|
committer | Marek Polacek <polacek@redhat.com> | 2020-02-15 17:43:45 -0600 |
commit | eef65c474e6836cc0470eb84f28895050161fcb8 (patch) | |
tree | 53b5542b1bb39cda1c59521441faf88761b3d80f /gcc/go | |
parent | fb26050409473f5be54465beca114b7e48de43aa (diff) | |
download | gcc-eef65c474e6836cc0470eb84f28895050161fcb8.zip gcc-eef65c474e6836cc0470eb84f28895050161fcb8.tar.gz gcc-eef65c474e6836cc0470eb84f28895050161fcb8.tar.bz2 |
c++: Fix poor diagnostic for array initializer [PR93710]
A small improvement for an error in build_user_type_conversion_1:
instead of
array-init1.C:11:1: error: conversion from ‘long int’ to ‘A’ is ambiguous
11 | };
| ^
we will print
array-init1.C:8:3: error: conversion from ‘long int’ to ‘A’ is ambiguous
8 | 0L,
| ^~
2020-02-12 Marek Polacek <polacek@redhat.com>
PR c++/93710 - poor diagnostic for array initializer.
* call.c (build_user_type_conversion_1): Use cp_expr_loc_or_input_loc
for an error call.
* g++.dg/diagnostic/array-init1.C: New test.
Diffstat (limited to 'gcc/go')
0 files changed, 0 insertions, 0 deletions