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 debug/33861] Debugging info for C++ template parameters is incorrect



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


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