decl.c (get_type_quals, [...]): New.
authorPaolo Carlini <paolo.carlini@oracle.com>
Wed, 10 Jul 2019 08:24:54 +0000 (08:24 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Wed, 10 Jul 2019 08:24:54 +0000 (08:24 +0000)
commita620ef15027baace38d591709474f1a9519ba657
tree4edea152284b330cfbefd2b2ec4971c5c2adb0ce
parentcaa0705cb68fa63e5b2cce9d9fe3561f1ba23e58
decl.c (get_type_quals, [...]): New.

/cp
2019-07-10  Paolo Carlini  <paolo.carlini@oracle.com>

* decl.c (get_type_quals,
smallest_type_location (const cp_decl_specifier_seq*)): New.
(check_tag_decl): Use smallest_type_location in error_at about
multiple types in one declaration.
(grokdeclarator): Use locations[ds_complex] in error_at about
complex invalid; use locations[ds_storage_class] in error_at
about static cdtor; use id_loc in error_at about flexible
array member in union; use get_type_quals.

/testsuite
2019-07-10  Paolo Carlini  <paolo.carlini@oracle.com>

* g++.dg/diagnostic/complex-invalid-1.C: New.
* g++.dg/diagnostic/static-cdtor-1.C: Likewise.
* g++.dg/cpp1z/has-unique-obj-representations2.C: Test location
too.
* g++.dg/other/anon-union3.C: Adjust expected location.
* g++.dg/parse/error8.C: Likewise.

From-SVN: r273323
gcc/cp/ChangeLog
gcc/cp/decl.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp1z/has-unique-obj-representations2.C
gcc/testsuite/g++.dg/diagnostic/complex-invalid-1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/diagnostic/static-cdtor-1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/other/anon-union3.C
gcc/testsuite/g++.dg/parse/error8.C