diff options
author | Nathaniel Shead <nathanieloshead@gmail.com> | 2023-11-10 14:28:40 +1100 |
---|---|---|
committer | Nathaniel Shead <nathanieloshead@gmail.com> | 2023-11-25 12:44:17 +1100 |
commit | 1f70291b93a07178bb645273cdd80c404d77ba2f (patch) | |
tree | 1feca8b9e05e19e61e43a6bf0e3849648afee788 /gcc/doc/cpp.texi | |
parent | 9dd8be6fc2debc4fbd0950386d4e98878af27a45 (diff) | |
download | gcc-1f70291b93a07178bb645273cdd80c404d77ba2f.zip gcc-1f70291b93a07178bb645273cdd80c404d77ba2f.tar.gz gcc-1f70291b93a07178bb645273cdd80c404d77ba2f.tar.bz2 |
c++: more checks for exporting names with using-declarations
Currently only functions are directly checked for validity when
exporting via a using-declaration. This patch also checks exporting
non-external names of variables, types, and enumerators. This also
prevents ICEs with `export using enum` for internal-linkage enums.
While we're at it this patch also improves the error messages for these
cases to provide more context about what went wrong.
gcc/cp/ChangeLog:
* name-lookup.cc (check_can_export_using_decl): New.
(do_nonmember_using_decl): Use above to check if names can be
exported.
gcc/testsuite/ChangeLog:
* g++.dg/modules/using-10.C: New test.
* g++.dg/modules/using-enum-2.C: New test.
Signed-off-by: Nathaniel Shead <nathanieloshead@gmail.com>
Diffstat (limited to 'gcc/doc/cpp.texi')
0 files changed, 0 insertions, 0 deletions