public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/28766]  New:  compound literal expression vs templates
@ 2006-08-18  3:28 pinskia at gcc dot gnu dot org
  2006-08-18  3:30 ` [Bug c++/28766] " pinskia at gcc dot gnu dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-08-18  3:28 UTC (permalink / raw)
  To: gcc-bugs

The following should be able to compile but does not:
struct A { int i; };

template<int t>
void foo()
{
    ((struct A) { 0 }).i += 1;
}

void g(void)
{
  foo<0>();
}

--------
If we remove the template on foo, the statement with compund literal expression
is accepted.


-- 
           Summary:  compound literal expression vs templates
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org


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


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2009-04-16 17:07 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-08-18  3:28 [Bug c++/28766] New: compound literal expression vs templates pinskia at gcc dot gnu dot org
2006-08-18  3:30 ` [Bug c++/28766] " pinskia at gcc dot gnu dot org
2006-08-24  1:57 ` bangerth at dealii dot org
2006-08-24  3:29 ` pinskia at gcc dot gnu dot org
2006-10-12  1:45 ` bangerth at dealii dot org
2009-04-16 17:02 ` pinskia at gcc dot gnu dot org
2009-04-16 17:03 ` pinskia at gcc dot gnu dot org
2009-04-16 17:07 ` pinskia at gcc dot gnu dot org
2009-04-16 17:07 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).