summaryrefslogtreecommitdiffstats
path: root/gcc/c-common.h
diff options
context:
space:
mode:
authormmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>2004-11-25 17:11:37 +0000
committermmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>2004-11-25 17:11:37 +0000
commitab6bb71403e003cd006220ed24f340436fc58b4e (patch)
tree1f43cc1480d6fed656039fd8b9ad792166e521e4 /gcc/c-common.h
parent352baa70189c521d2c52b11845fc93cd4ed15b36 (diff)
downloadppe42-gcc-ab6bb71403e003cd006220ed24f340436fc58b4e.tar.gz
ppe42-gcc-ab6bb71403e003cd006220ed24f340436fc58b4e.zip
PR c++/18001
* c-common.h (lvalue_use): Move here from c-ctypeck.c. (lvalue_or_else): Declare. * c-common.c (lvalue_or_else): Move here from c-typeck.c. * c-typeck.c (lvalue_use): Remove. (lvalue_or_else): Remove. PR c++/18556 * toplev.c (check_global_declarations): Set DECL_IGNORED_P on unemitted variables with static storage duration. PR c++/18445 * class.c (instantiate_type): Treat NON_DEPENDENT_EXPRs with unknown_type as non matching. Tidy up. * pt.c (build_non_dependent_expr): Do not build a NON_DEPENDENT_EXPR for a VAR_DECL. PR c++/18001 * cp-tree.h (lvalue_or_else): Remove declaration. * tree.c (lvalue_or_else): Remove. * typeck.c (build_unary_op): Adjust call to lvalue_or_else. (build_modify_expr): Likewise. PR c++/18625 * decl.c (duplicate_decls): Return error_mark_node on error, as specified. PR c++/18466 * decl.c (grokvardecl): Keep track of whether or not a there was explicit qualification. * name-lookup.c (set_decl_namespace): Complain about explicit qualification of a name within its own namespace. PR c++/18545 * typeck.c (check_return_expr): Robustify. PR c++/18445 * g++.dg/template/crash28.C: Likewise. PR c++/18001 * g++.dg/expr/unary2.C: Adjust lvalue messages. * g++.dg/ext/lvaddr.C: Likewise. * g++.dg/opt/pr7503-3.C: Likewise. PR c++/18466 * g++.dg/parse/qualified3.C: New test. * g++.old-deja/g++.other/friend7.C: Remove bogus qualification. PR c++/18545 * g++.dg/expr/return1.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@91301 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-common.h')
-rw-r--r--gcc/c-common.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/c-common.h b/gcc/c-common.h
index 63c095c0781..d0fbaa837df 100644
--- a/gcc/c-common.h
+++ b/gcc/c-common.h
@@ -873,6 +873,19 @@ extern void verify_sequence_points (tree);
extern tree fold_offsetof (tree);
+/* Places where an lvalue, or modifiable lvalue, may be required.
+ Used to select diagnostic messages in lvalue_or_else and
+ readonly_error. */
+enum lvalue_use {
+ lv_assign,
+ lv_increment,
+ lv_decrement,
+ lv_addressof,
+ lv_asm
+};
+
+extern int lvalue_or_else (tree, enum lvalue_use);
+
/* In c-gimplify.c */
extern void c_genericize (tree);
extern int c_gimplify_expr (tree *, tree *, tree *);
OpenPOWER on IntegriCloud