aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/decl.h
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2008-09-08 16:52:44 -0400
committerJason Merrill <jason@gcc.gnu.org>2008-09-08 16:52:44 -0400
commitb344d949d25164341ca4532ce067af1b254198a0 (patch)
tree0142184b1cea337fc342e6818257e4f6cb77fa58 /gcc/cp/decl.h
parent37022b7c72c96135c90798684598f39fd1371b40 (diff)
downloadgcc-b344d949d25164341ca4532ce067af1b254198a0.zip
gcc-b344d949d25164341ca4532ce067af1b254198a0.tar.gz
gcc-b344d949d25164341ca4532ce067af1b254198a0.tar.bz2
re PR c++/37302 (function parameters are declared too late)
PR c++/37302 * parser.c (cp_parser_parameter_declaration_list): Process the PARM_DECLs as we go and push them. Return a TREE_LIST. (cp_parser_parameter_declaration_clause): Return a TREE_LIST. (cp_parser_direct_declarator): Create a binding level and suppress deprecated warnings in the parameter list. (make_call_declarator): PARMS is now a tree. * cp-tree.h (struct cp_declarator): Function parms are now a tree. * decl.h (enum deprecated_states, deprecated_state): Move here. * decl.c: From here. (type_is_deprecated): New fn. (grokparms): PARMLIST is a tree now. Warn about parms that use deprecated types. * mangle.c (write_expression): Handle PARM_DECL, CALL_EXPR and 0-operand cast. * pt.c (tsubst) [DECLTYPE_TYPE]: Set skip_evaluation. (tsubst_copy) [PARM_DECL]: Handle a PARM_DECL used outside of a function. * name-lookup.c (pushtag): Look through function parameter scopes. (pushdecl_maybe_friend): Don't set DECL_CONTEXT on a PARM_DECL when we're parsing a function declarator. From-SVN: r140120
Diffstat (limited to 'gcc/cp/decl.h')
-rw-r--r--gcc/cp/decl.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/cp/decl.h b/gcc/cp/decl.h
index 52ab0fb..ed28714 100644
--- a/gcc/cp/decl.h
+++ b/gcc/cp/decl.h
@@ -34,3 +34,16 @@ enum decl_context
extern tree grokdeclarator (const cp_declarator *,
const cp_decl_specifier_seq *,
enum decl_context, int, tree*);
+
+/* States indicating how grokdeclarator() should handle declspecs marked
+ with __attribute__((deprecated)). An object declared as
+ __attribute__((deprecated)) suppresses warnings of uses of other
+ deprecated items. */
+
+enum deprecated_states {
+ DEPRECATED_NORMAL,
+ DEPRECATED_SUPPRESS
+};
+
+extern enum deprecated_states deprecated_state;
+