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 c++/36089] New: [4.2/4.3/4.4 Regression] Funny rejects valid with constant integral expression


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


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