This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/16783] Accepts invalid integral constant expression for array size
- From: "giovannibajo at libero dot it" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 31 Jul 2004 00:28:51 -0000
- Subject: [Bug c++/16783] Accepts invalid integral constant expression for array size
- References: <20040727132411.16783.bangerth@dealii.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From giovannibajo at libero dot it 2004-07-31 00:28 -------
This patch of mines:
2004-03-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/14545
* parser.c (cp_parser_functional_cast): A cast to anything
but integral or enumaration type is not an integral constant
expression.
should also handle this case. If it does not, it probably means that for some
reason the expression within the braces is not being parsed as a constant
expression. This strikes me as odd though, and I wonder if the extra level of
parenthesis is confusing the parser somehow. There is some complex code to
handle extra-level of parenthesis which are disambiguators in many situations,
so it is very possible that somewhere we forget to set/propagate the constant-
expression flag.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16783