diff options
author | Gabriel Dos Reis <gdr@integrable-solutions.net> | 2003-09-07 18:52:53 +0000 |
---|---|---|
committer | Gabriel Dos Reis <gdr@gcc.gnu.org> | 2003-09-07 18:52:53 +0000 |
commit | a2a9e21c333495766fc733fedbf1821b9b333840 (patch) | |
tree | a053051804681d6afd59965f85bf34dfc364a70f /gcc/c-pretty-print.c | |
parent | 1ab237dfa3b2afa84b952ac457eb01df96638757 (diff) | |
download | gcc-a2a9e21c333495766fc733fedbf1821b9b333840.tar.gz |
re PR c++/11762 (namespace aliasing ICE in warn_extern_redeclared_static)
* c-pretty-print.h (pp_c_left_brace): Declare.
(pp_c_right_brace): Likewise.
* c-pretty-print.c (pp_c_left_brace): Now a function
(pp_c_right_brace): Likewise.
cp/
PR c++/11762
* error.c (dump_decl): Handle namespace-alias-definition.
* decl.c (warn_extern_redeclared_static): There is no point in
checking changes in storage class specifier for a namespace
declaration.
(duplicate_decls): Tidy diagnostic message.
* cxx-pretty-print.c (pp_cxx_left_brace): New macro.
(pp_cxx_right_brace): Likewise.
(pp_cxx_original_namespace_definition): New function.
(pp_cxx_namespace_alias_definition): Likewise.
(pp_cxx_declaration): Use them. Handle NAMESPACE_DECLs.
From-SVN: r71175
Diffstat (limited to 'gcc/c-pretty-print.c')
-rw-r--r-- | gcc/c-pretty-print.c | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/gcc/c-pretty-print.c b/gcc/c-pretty-print.c index 922d987ab28..0fd5bb1e933 100644 --- a/gcc/c-pretty-print.c +++ b/gcc/c-pretty-print.c @@ -41,18 +41,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA pp_c_whitespace (PP); \ } while (0) -#define pp_c_left_brace(PP) \ - do { \ - pp_left_brace (PP); \ - pp_base (PP)->padding = pp_none; \ - } while (0) - -#define pp_c_right_brace(PP) \ - do { \ - pp_right_brace (PP); \ - pp_base (PP)->padding = pp_none; \ - } while (0) - #define pp_c_left_bracket(PP) \ do { \ pp_left_bracket (PP); \ @@ -116,6 +104,20 @@ pp_c_right_paren (c_pretty_printer *pp) } void +pp_c_left_brace (c_pretty_printer *pp) +{ + pp_left_brace (pp); + pp_base (pp)->padding = pp_none; +} + +void +pp_c_right_brace (c_pretty_printer *pp) +{ + pp_right_brace (pp); + pp_base (pp)->padding = pp_none; +} + +void pp_c_dot (c_pretty_printer *pp) { pp_dot (pp); |