Skip to content
Snippets Groups Projects
Commit 88a7beb7 authored by Mark Mitchell's avatar Mark Mitchell Committed by Mark Mitchell
Browse files

re PR c++/21619 (__builtin_constant_p(&"Hello"[0])?1:-1 not compile-time constant)

	PR c++/21619
	* cp-tree.h (DECL_IS_BUILTIN_CONSTANT_P): New macro.
	* parser.c (cp_parser_postfix_expression): Allow non-constant
	expressions as arguments to __builtin_constant_p.
	* tree.c (builtin_valid_in_constant_expr_p): Use
	DECL_IS_BUILTIN_CONSTANT_P.

	PR c++/21619
	* g++.dg/ext/builtin9.C: New test.

From-SVN: r100626
parent 1d508aa9
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment