public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/36089]  New: [4.2/4.3/4.4 Regression] Funny rejects valid with constant integral expression
@ 2008-04-30 16:42 pinskia at gcc dot gnu dot org
  2008-04-30 16:42 ` [Bug c++/36089] [4.1/4.2/4.3/4.4 " pinskia at gcc dot gnu dot org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-04-30 16:42 UTC (permalink / raw)
  To: gcc-bugs

Testcase:
template <int>
struct a
{
    static bool f()
    {
        const int as(2);
        float anArray[as] = { 0.0f, 0.0f };
        return (anArray[0] == anArray[1]);
    }
};

----

If we remove the const from the declaration of as, we get an error with
-pedantic-errors that we have a VLA (otherwise we accept the code).


-- 
           Summary: [4.2/4.3/4.4 Regression] Funny rejects valid with
                    constant integral expression
           Product: gcc
           Version: 4.3.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=36089


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

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

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-30 16:42 [Bug c++/36089] New: [4.2/4.3/4.4 Regression] Funny rejects valid with constant integral expression pinskia at gcc dot gnu dot org
2008-04-30 16:42 ` [Bug c++/36089] [4.1/4.2/4.3/4.4 " pinskia at gcc dot gnu dot org
2008-04-30 16:55 ` pinskia at gcc dot gnu dot org
2008-05-07 23:18 ` pinskia at gcc dot gnu dot org
2008-05-16 19:37 ` rguenth at gcc dot gnu dot org
2008-05-16 20:01 ` pinskia at gcc dot gnu dot org
2008-07-04 22:42 ` [Bug c++/36089] [4.2/4.3/4.4 " jsm28 at gcc dot gnu dot org
2008-11-10 21:21 ` jakub at gcc dot gnu dot org
2008-11-17  7:58 ` jakub at gcc dot gnu dot org
2009-03-31 20:50 ` [Bug c++/36089] [4.3 " jsm28 at gcc dot gnu dot org
2009-07-10 15:55 ` rguenth at gcc dot gnu dot org
2009-07-10 16:03 ` rguenth 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).