Bug 129 - __extension__ ignored in template
Summary: __extension__ ignored in template
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 2.95.2
: P3 normal
Target Milestone: ---
Assignee: Gabriel Dos Reis
URL:
Keywords: rejects-valid
Depends on:
Blocks:
 
Reported: 2000-03-23 11:26 UTC by martin
Modified: 2003-07-25 17:33 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description martin 2000-03-23 11:26:00 UTC
 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);
}
Comment 1 Gabriel Dos Reis 2001-02-15 03:29:36 UTC
Responsible-Changed-From-To: unassigned->gdr
Responsible-Changed-Why: Analyzed
Comment 2 Gabriel Dos Reis 2001-02-15 03:29:36 UTC
State-Changed-From-To: analyzed->closed
State-Changed-Why: Fixed on gcc-3_0-branch.
Comment 3 Gabriel Dos Reis 2001-02-15 11:29:37 UTC
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