public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/21385] New: __extension__ lost inside template
@ 2005-05-04 18:06 jimrees at itasoftware dot com
2005-05-04 18:10 ` [Bug c++/21385] " pinskia at gcc dot gnu dot org
0 siblings, 1 reply; 2+ messages in thread
From: jimrees at itasoftware dot com @ 2005-05-04 18:06 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1723 bytes --]
Target: x86_64-suse-linux
Configured with: ../gcc-4.0.0/configure --prefix=/ita3 --enable-languages=c,c++ --with-system-
zlib --enable-__cxa_atexit x86_64-suse-linux : (reconfigured) ../gcc-4.0.0/configure --prefix=/ita3
--enable-languages=c,c++ --with-system-zlib --enable-__cxa_atexit --disable-checking x86_64-
suse-linux
Thread model: posix
gcc version 4.0.0
template functions appear to erase the effect of the __extension__ keyword inside their definitions,
causing "-ansi -pedantic" to produce an error instead of a warning.
Compiling the following code with "-ansi -pedantic" produces an error for the line in the template
function, but not the ordinary function.
% g++ -c -ansi -pedantic foo.cpp
foo.cpp: In function âint template_function(int) [with T = void]â:
foo.cpp:15: instantiated from here
foo.cpp:11: error: ISO C++ forbids variable-size array
------------------------------------------------------
int ordinary_function(int dimension)
{
__extension__ int data[dimension];
return 0;
}
template<typename T>
int template_function(int dimension)
{
__extension__ int data[dimension];
return 0;
}
template int template_function<void>(int);
--
Summary: __extension__ lost inside template
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: minor
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jimrees at itasoftware dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: x86_64-suse-linux
GCC host triplet: x86_64-suse-linux
GCC target triplet: x86_64-suse-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21385
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c++/21385] __extension__ lost inside template
2005-05-04 18:06 [Bug c++/21385] New: __extension__ lost inside template jimrees at itasoftware dot com
@ 2005-05-04 18:10 ` pinskia at gcc dot gnu dot org
0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-05-04 18:10 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-05-04 18:10 -------
Confirmed, not a regression.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
GCC build triplet|x86_64-suse-linux |
GCC host triplet|x86_64-suse-linux |
GCC target triplet|x86_64-suse-linux |
Keywords| |rejects-valid
Known to fail| |2.95.3 3.0.4 3.3.3 3.4.0
| |4.0.0 4.1.0
Last reconfirmed|0000-00-00 00:00:00 |2005-05-04 18:10:03
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21385
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-05-04 18:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-04 18:06 [Bug c++/21385] New: __extension__ lost inside template jimrees at itasoftware dot com
2005-05-04 18:10 ` [Bug c++/21385] " pinskia 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).