Commit 55ace93c by Jason Merrill

error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.

        * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
        (dump_function_decl): Always dump parms.

From-SVN: r49396
parent 65f36ac8
2002-02-01 Jason Merrill <jason@redhat.com> 2002-02-01 Jason Merrill <jason@redhat.com>
PR c++/4872
* decl.c (finish_function): Warn about a non-void function with
no return statement.
* error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS. * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
(dump_function_decl): Always dump parms. (dump_function_decl): Always dump parms.
......
...@@ -140,8 +140,7 @@ dump_scope (scope, flags) ...@@ -140,8 +140,7 @@ dump_scope (scope, flags)
tree scope; tree scope;
int flags; int flags;
{ {
int f = ~TFF_RETURN_TYPE & (TFF_DECL_SPECIFIERS int f = ~TFF_RETURN_TYPE & (flags & (TFF_SCOPE | TFF_CHASE_TYPEDEF));
| (flags & (TFF_SCOPE | TFF_CHASE_TYPEDEF)));
if (scope == NULL_TREE) if (scope == NULL_TREE)
return; return;
...@@ -1137,7 +1136,7 @@ dump_function_decl (t, flags) ...@@ -1137,7 +1136,7 @@ dump_function_decl (t, flags)
dump_function_name (t, flags); dump_function_name (t, flags);
if (flags & TFF_DECL_SPECIFIERS) if (1)
{ {
dump_parameters (parmtypes, flags); dump_parameters (parmtypes, flags);
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// g(), because xref wanted the mangled name, which breaks inside a template. // g(), because xref wanted the mangled name, which breaks inside a template.
// Of course, the offending code is actually ill-formed anyway, so check // Of course, the offending code is actually ill-formed anyway, so check
// for the error. // for the error. Also check that it's formatted properly.
struct A struct A
{ {
...@@ -14,7 +14,7 @@ template<class T> void A::f() ...@@ -14,7 +14,7 @@ template<class T> void A::f()
struct B struct B
{ {
void g() {} void g() {}
static int x; // { dg-error "static" "" } static int x; // { dg-error "static.*`int A::f\\(\\)::B::x'" "" }
}; };
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment