aboutsummaryrefslogtreecommitdiff
path: root/gcc/c/c-parser.c
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>2020-07-06 09:54:40 -0700
committerNathan Sidwell <nathan@acm.org>2020-07-06 10:02:46 -0700
commite88218fd5a21e44c77c10dec87af4b11c76f34a0 (patch)
treeee1cbca72c47e5a0af0ae3e8193b043751aea610 /gcc/c/c-parser.c
parentf2151227dfe90a5fe73297c370786be98b0b090f (diff)
downloadgcc-e88218fd5a21e44c77c10dec87af4b11c76f34a0.zip
gcc-e88218fd5a21e44c77c10dec87af4b11c76f34a0.tar.gz
gcc-e88218fd5a21e44c77c10dec87af4b11c76f34a0.tar.bz2
c++: Always use pushdecl for exception library helpers
The ABI exception helpers like __throw were being created by first looking for them, and then adding if not found. Primarily because libitm wasn't declaring them with the correct exception specifiers. I fixed libitm a while back, so let's just use push_library_fn and let the symbol table machinery deal with duplicates. push_library_fn was making the assumtion there wasn't already a decl available, by always returning the new decl. Bad things would happen if there was a duplicate, because duplicate_decls explicitly gcc_frees the new decl. Fixed by having it return whatever pushdecl returns. gcc/cp/ * decl.c (push_library_fn): Return the decl pushdecl_toplevel returns. * except.c (verify_library_fn): Replace with ... (declare_library_fn_1): ... this fn. Always push the fn. (declare_library_fn): Call it. (build_throw): Call declare_library_fn_1. gcc/testsuite/ * g++.dg/eh/builtin10.C: Adjust expected errors. * g++.dg/eh/builtin11.C: Likewise. * g++.dg/eh/builtin5.C: Likewise. * g++.dg/eh/builtin6.C: Likewise. * g++.dg/eh/builtin7.C: Likewise. * g++.dg/eh/builtin9.C: Likewise. * g++.dg/parse/crash55.C: Likewise.
Diffstat (limited to 'gcc/c/c-parser.c')
0 files changed, 0 insertions, 0 deletions