This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Unreviewed C++ patches


Jakub Jelinek wrote:
Hi!

PR c++/21454
TREE_READONLY for const array sized from initializer:
http://gcc.gnu.org/ml/gcc-patches/2005-05/msg01066.html

OK.


PR c++/21495
fix for ICE on invalid in error reporting
http://gcc.gnu.org/ml/gcc-patches/2005-05/msg00977.html

I don't think this is correct -- or, if it is, we should be simplifying things further. In particular, I think id_declarator can be NULL here with invalid input like:


static int : 3;

On the other hand, I have no idea what the current code is trying to do; the comment:

/* Avoid trying to get an operand off an identifier node. */

doesn't look like something I would have written, though you never know. How about just replacing the entire contents of the "if (decl_context == FIELD)" block with:

  if (declarator && declarator->kind == cdk_id)
    error ("invalid storage class specified for data member %qD",
           declarator->u.id.unqualified_name);
  else
    error ("invalid storage class specified for data member");
  return error_mark_node;

?

--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
(916) 791-8304


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]