Commit de6c8b0c authored by Henrik (Grubba) Grubbström's avatar Henrik (Grubba) Grubbström
Browse files

Compiler: Don't attempt to constant-fold automap markers.

Attempting to get a constant from an expression like

  ({ "abc", "cde" })[*]

is not possible and generates the compilation error
"[*] not supported here", so don't attempt to.

Fixes #10039.
parent 332912ea
......@@ -2114,6 +2114,7 @@ node *copy_node(node *n)
int is_const(node *n)
if(!n) return 1;
if(n->token == F_AUTO_MAP_MARKER) return 0;
return !(n->tree_info & (OPT_SIDE_EFFECT |
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