[Bug debug/33861] Debugging info for C++ template parameters is incorrect
nathan at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Mon Oct 22 14:33:00 GMT 2007
------- Comment #2 from nathan at gcc dot gnu dot org 2007-10-22 14:32 -------
the testcase is valid. [14.3.2]/2 essentially gives it as an example. A
literal '&' is optional in this case (para 1).
para 5 tells us that array to pointer decay happens here, and GCC internally
represents that as CAST_EXPR (<type>, ADDR_EXPR (<array_obj>)). It could have
used ADDR_EXPR (ARRAY_REF (<array_obj>, 0)), but it doesn't. That alternative
is equally invalid as a non-type template argument.
explicitly writing '(char *)&name' in the source is ill-formed though.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33861
More information about the Gcc-bugs
mailing list