[Bug c++/12667] [3.3 regression] max(enum) returns reference to temporary

falk at debian dot org gcc-bugzilla@gcc.gnu.org
Sun Nov 16 17:55:00 GMT 2003


------- Additional Comments From falk at debian dot org  2003-11-16 17:55 -------
(In reply to comment #4)
> The code in comment #3 is definitely wrong. You call 
>   max(E1,E2) 
> both E1 and E2 are names that when evaluated yield temporary variables.

I don't think so. The standard says:

"The identifiers in an enumerator-list are declared as constants, and can appear
wherever constants are required."


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12667



More information about the Gcc-bugs mailing list