This is the mail archive of the gcc-bugs@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]

[Bug c++/16783] Accepts invalid integral constant expression for array size


------- 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


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