aboutsummaryrefslogtreecommitdiff
path: root/gcc/config.gcc
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2022-04-11 10:41:07 +0200
committerJakub Jelinek <jakub@redhat.com>2022-04-11 10:41:07 +0200
commit083e8e66d2e90992fa83a53bfc3553dfa91abda1 (patch)
treef792b4756e3cc01b00de9dd941502bcbf18a7a08 /gcc/config.gcc
parent8d331aab65488b3998bd106205bbe6cab5df31b5 (diff)
downloadgcc-083e8e66d2e90992fa83a53bfc3553dfa91abda1.zip
gcc-083e8e66d2e90992fa83a53bfc3553dfa91abda1.tar.gz
gcc-083e8e66d2e90992fa83a53bfc3553dfa91abda1.tar.bz2
c-family: Initialize ridpointers for __int128 etc. [PR105186]
The following testcase ICEs with C++ and is incorrectly rejected with C. The reason is that both FEs use ridpointers identifiers for CPP_KEYWORD and value or u.value for CPP_NAME e.g. when parsing attributes or OpenMP directives etc., like: /* Save away the identifier that indicates which attribute this is. */ identifier = (token->type == CPP_KEYWORD) /* For keywords, use the canonical spelling, not the parsed identifier. */ ? ridpointers[(int) token->keyword] : id_token->u.value; identifier = canonicalize_attr_name (identifier); I've tried to change those to use ridpointers only if non-NULL and otherwise use the value/u.value even for CPP_KEYWORDS, but that was a large 10 hunks patch. The following patch instead just initializes ridpointers for the __intNN keywords. It can't be done earlier before we record_builtin_type as there are 2 different spellings and if we initialize those ridpointers early, the second record_builtin_type fails miserably. 2022-04-11 Jakub Jelinek <jakub@redhat.com> PR c++/105186 * c-common.cc (c_common_nodes_and_builtins): After registering __int%d and __int%d__ builtin types, initialize corresponding ridpointers entry. * c-c++-common/pr105186.c: New test.
Diffstat (limited to 'gcc/config.gcc')
0 files changed, 0 insertions, 0 deletions