aboutsummaryrefslogtreecommitdiff
path: root/libgomp
diff options
context:
space:
mode:
authorSenthil Kumar Selvaraj <saaadhu@gcc.gnu.org>2026-01-28 13:59:55 +0530
committerSenthil Kumar Selvaraj <saaadhu@gcc.gnu.org>2026-01-28 19:35:44 +0530
commit3090d28ab359e8299aee33386dc44b81faf8edca (patch)
tree6cf164edc4383cf96d2b3f3fb3ecc7f380df7e21 /libgomp
parent26723879292eda8a9b606b3c2b968941ec4fd9ef (diff)
downloadgcc-master.zip
gcc-master.tar.gz
gcc-master.tar.bz2
c: Fix parser error on address space names [PR 123583]HEADtrunkmaster
This patch fixes a regression introduced by PR 67784 (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67784) - it broke recognition of named address space qualifiers (such as __memx on AVR or __seg_gs on x86) after certain statements. The fix for PR 67784 attempts to reclassify tokens whose token->id_kind could have been set incorrectly (because of possibly wrong scope when peeking ahead). c_parser_maybe_reclassify_token only skips reclassification for C_ID_CLASSNAME though - a token with id_kind = C_ID_ADDRSPACE ends up getting reclassified as C_ID_ID, eventually causing a ": error: '<address space name>' undeclared" error later down the line. Rather than explicitly excluding C_ID_ADDRSPACE, the patch modifies the check to reclassify only tokens kinds that could potentially get incorrectly classified - C_ID_ID and C_ID_TYPENAME. Bootstrapped and regtested on x86_64-linux. PR c/123583 gcc/c/ChangeLog: * c-parser.cc (c_parser_maybe_reclassify_token): Reclassify only C_ID_ID and C_ID_TYPENAME tokens. gcc/testsuite/ChangeLog: * gcc.target/avr/pr123583.c: New test. * gcc.target/i386/pr123583.c: New test.
Diffstat (limited to 'libgomp')
0 files changed, 0 insertions, 0 deletions