diff options
author | Marek Polacek <polacek@redhat.com> | 2020-11-09 10:19:07 -0500 |
---|---|---|
committer | Marek Polacek <polacek@redhat.com> | 2020-11-09 14:39:36 -0500 |
commit | 3a5f8d745f8e26d973218b088788f22ad197ca67 (patch) | |
tree | b6db6efcdffa3c475dbc13854f1e5f6a7e586917 /gcc/cp/class.c | |
parent | 6624075e7e996d61143bf5fc106fa2cb61c614f6 (diff) | |
download | gcc-3a5f8d745f8e26d973218b088788f22ad197ca67.zip gcc-3a5f8d745f8e26d973218b088788f22ad197ca67.tar.gz gcc-3a5f8d745f8e26d973218b088788f22ad197ca67.tar.bz2 |
c++: Fix -Wvexing-parse ICE with omitted int [PR97762]
For declarations like
long f();
decl_specifiers->type will be NULL, but I neglected to handle this case,
therefore we ICE. So handle this case by pretending we've seen 'int',
which is good enough for -Wvexing-parse's purposes.
gcc/cp/ChangeLog:
PR c++/97762
* parser.c (warn_about_ambiguous_parse): Handle the case when
there is no type in the decl-specifiers.
gcc/testsuite/ChangeLog:
PR c++/97762
* g++.dg/warn/Wvexing-parse8.C: New test.
Diffstat (limited to 'gcc/cp/class.c')
0 files changed, 0 insertions, 0 deletions