Original-Message-ID: <m38zzavvd1.fsf@kosh.ultra.csn.tu-chemnitz.de> While compiling the code shown below, g++ gives out a warning "straits.h:86: warning: ANSI C++ forbids variable-size array `a'" whose origin I can not understand and which I like to suppress. AFAIK variable-sized arrays are an extension and should not be criticized there. I have tried to prefix straits.h:86 with __extension__ too but it doesn't help. [MvL: example changed from original code, error is now b.cc: In function `void foo<int>(int)': b.cc:9: instantiated from here b.cc:4: warning: ANSI C++ does not support `long long' ] Release: 2.95.2 How-To-Repeat: template<class T> void foo(T) { __extension__ long long x; } int main() { foo(3); }
Responsible-Changed-From-To: unassigned->gdr Responsible-Changed-Why: Analyzed
State-Changed-From-To: analyzed->closed State-Changed-Why: Fixed on gcc-3_0-branch.
From: gdr@gcc.gnu.org To: Enrico.Scholz@informatik.tu-chemnitz.de, gcc-gnats@gcc.gnu.org, gdr@gcc.gnu.org, martin@loewis.home.cs.tu-berlin.de, nobody@gcc.gnu.org Cc: Subject: Re: c++/129 Date: 15 Feb 2001 11:29:37 -0000 Synopsis: __extension__ ignored in template Responsible-Changed-From-To: unassigned->gdr Responsible-Changed-By: gdr Responsible-Changed-When: Thu Feb 15 03:29:36 2001 Responsible-Changed-Why: Analyzed State-Changed-From-To: analyzed->closed State-Changed-By: gdr State-Changed-When: Thu Feb 15 03:29:36 2001 State-Changed-Why: Fixed on gcc-3_0-branch. http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=129&database=gcc