This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
c++/129: Re: Unsolicited warnings
- To: gcc-gnats at gcc dot gnu dot org
- Subject: c++/129: Re: Unsolicited warnings
- From: "Martin v. Loewis" <martin at loewis dot home dot cs dot tu-berlin dot de>
- Date: Thu, 23 Mar 2000 20:20:18 +0100
- References: <m38zzavvd1.fsf@kosh.ultra.csn.tu-chemnitz.de>
- Resent-Cc: gcc-prs at gcc dot gnu dot org, Enrico dot Scholz at informatik dot tu-chemnitz dot de
- Resent-Reply-To: gcc-gnats@gcc.gnu.org, "Martin v. Loewis" <martin@loewis.home.cs.tu-berlin.de>
>Number: 129
>Category: c++
>Synopsis: __extension__ ignored in template
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: analyzed
>Class: rejects-legal
>Submitter-Id: net
>Arrival-Date: Thu Mar 23 11:26:00 PST 2000
>Closed-Date:
>Last-Modified:
>Originator: Enrico Scholz <Enrico.Scholz@informatik.tu-chemnitz.de>
>Release: 2.95.2
>Organization:
>Environment:
>Description:
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'
]
>How-To-Repeat:
template<class T>
void foo(T)
{
__extension__ long long x;
}
int main()
{
foo(3);
}
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: