aboutsummaryrefslogtreecommitdiff
path: root/gcc/ggc-none.c
diff options
context:
space:
mode:
authorqingzhe huang <nickhuang99@hotmail.com>2021-10-01 10:46:35 -0400
committerJason Merrill <jason@redhat.com>2021-10-01 11:44:47 -0400
commit7c99923f8c544ec07109e8333acb2c2388c38a1b (patch)
tree419bf8cdb8be6ccc0bcdca6911e692c2e23c0a7f /gcc/ggc-none.c
parent17374dab3eefd282977ad90743c9aff97f2e41ce (diff)
downloadgcc-7c99923f8c544ec07109e8333acb2c2388c38a1b.zip
gcc-7c99923f8c544ec07109e8333acb2c2388c38a1b.tar.gz
gcc-7c99923f8c544ec07109e8333acb2c2388c38a1b.tar.bz2
c++: cv-qualified ref introduced by typedef [PR101783]
The root cause of this bug is that it considers reference with cv-qualifiers as an error by generating value for variable "bad_quals". However, this is not correct for case of typedef. Here I quote spec [dcl.ref]/1 : "Cv-qualified references are ill-formed except when the cv-qualifiers are introduced through the use of a typedef-name ([dcl.typedef], [temp.param]) or decltype-specifier ([dcl.type.decltype]), in which case the cv-qualifiers are ignored." 2021-09-30 qingzhe huang <nickhuang99@hotmail.com> gcc/cp/ChangeLog: PR c++/101783 * tree.c (cp_build_qualified_type_real): Exclude typedef from error. gcc/testsuite/ChangeLog: PR c++/101783 * g++.dg/parse/pr101783.C: New test.
Diffstat (limited to 'gcc/ggc-none.c')
0 files changed, 0 insertions, 0 deletions