Commit e3790655 by Andrew Pinski Committed by Andrew Pinski

re PR c++/16205 (ICE with -Wall on no-throw specifier)

2004-06-27  Andrew Pinski  <pinskia@physics.uc.edu>

        PR c++/16205
        * c-common.c (warn_for_collisions_1): Warn for only decls which
        have a name.

From-SVN: r83759
parent 3ff0c9ed
2004-06-27 Andrew Pinski <pinskia@physics.uc.edu> 2004-06-27 Andrew Pinski <pinskia@physics.uc.edu>
PR c++/16205
* c-common.c (warn_for_collisions_1): Warn for only decls which
have a name.
PR c++/15145 PR c++/15145
* c.opt (Wsequence-point): Enable for C++ and ObjC++. * c.opt (Wsequence-point): Enable for C++ and ObjC++.
......
...@@ -1122,7 +1122,8 @@ warn_for_collisions_1 (tree written, tree writer, struct tlist *list, ...@@ -1122,7 +1122,8 @@ warn_for_collisions_1 (tree written, tree writer, struct tlist *list,
{ {
if (list->expr == written if (list->expr == written
&& list->writer != writer && list->writer != writer
&& (! only_writes || list->writer)) && (! only_writes || list->writer)
&& DECL_NAME (list->expr))
{ {
warned_ids = new_tlist (warned_ids, written, NULL_TREE); warned_ids = new_tlist (warned_ids, written, NULL_TREE);
warning ("operation on `%s' may be undefined", warning ("operation on `%s' may be undefined",
......
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