diff options
author | Jakub Jelinek <jakub@redhat.com> | 2009-11-02 14:39:46 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2009-11-02 14:39:46 +0100 |
commit | 9789ba46f6c647ed2f893c8785585338b30c9847 (patch) | |
tree | f1e838ec9a46d86a7ba26afebc76472b3823676e /gcc/c-pragma.h | |
parent | 3f252b91b1e4fd540f0e9e40a4ead814a011ec6e (diff) | |
download | gcc-9789ba46f6c647ed2f893c8785585338b30c9847.tar.gz |
re PR c++/41774 (ice: vector VEC(visibility,base) pop domain error, in pop_visibility at c-pragma.c:757)
PR c++/41774
* c-pragma.c (visstack): Change into vector of ints rather than
enum symbol_visibility.
(push_visibility): Add kind argument, push default_visibility together
with kind.
(pop_visibility): Add kind argument, return true if successful, fail
if visibility stack is empty or if stack top is of different kind.
(handle_pragma_visibility): Don't check length of visstack, instead
call pop_visibility and issue diagnostics if it failed. Pass 0
as last argument to push_visibility and pop_visibility.
* c-pragma.h (push_visibility): Add kind argument.
(pop_visibility): Likewise. Return bool instead of void.
* name-lookup.c (handle_namespace_attrs): Pass 1 as last argument to
push_visibility.
* parser.c (cp_parser_namespace_definition): Pass 1 as argument to
pop_visibility.
* rtti.c (push_abi_namespace): Pass 2 as last argument to
push_visibility.
(pop_abi_namespace): Pass 2 as argument to pop_visibility.
* g++.dg/ext/visibility/namespace3.C: New test.
From-SVN: r153805
Diffstat (limited to 'gcc/c-pragma.h')
-rw-r--r-- | gcc/c-pragma.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/c-pragma.h b/gcc/c-pragma.h index be085ee1115..eab23db6cd9 100644 --- a/gcc/c-pragma.h +++ b/gcc/c-pragma.h @@ -95,8 +95,8 @@ extern struct cpp_reader* parse_in; visibility is not supported on the host OS platform the statements are ignored. */ #define HANDLE_PRAGMA_VISIBILITY 1 -extern void push_visibility (const char *); -extern void pop_visibility (void); +extern void push_visibility (const char *, int); +extern bool pop_visibility (int); extern void init_pragma (void); |