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; 8+ 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] 8+ 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; 8+ 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] 8+ messages in thread

* [Bug c++/21385] __extension__ lost inside template
       [not found] <bug-21385-4@http.gcc.gnu.org/bugzilla/>
  2012-05-29 11:55 ` paolo.carlini at oracle dot com
  2012-08-06 17:18 ` paolo.carlini at oracle dot com
@ 2015-07-10 14:52 ` paolo.carlini at oracle dot com
  2 siblings, 0 replies; 8+ messages in thread
From: paolo.carlini at oracle dot com @ 2015-07-10 14:52 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=21385

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |NEW
           Assignee|paolo.carlini at oracle dot com    |unassigned at gcc dot gnu.org

--- Comment #7 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Not seriously, for the time being. Unassigning.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug c++/21385] __extension__ lost inside template
       [not found] <bug-21385-4@http.gcc.gnu.org/bugzilla/>
  2012-05-29 11:55 ` paolo.carlini at oracle dot com
@ 2012-08-06 17:18 ` paolo.carlini at oracle dot com
  2015-07-10 14:52 ` paolo.carlini at oracle dot com
  2 siblings, 0 replies; 8+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-08-06 17:18 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21385

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
                 CC|gcc-bugs at gcc dot gnu.org |
         AssignedTo|unassigned at gcc dot       |paolo.carlini at oracle dot
                   |gnu.org                     |com
      Known to fail|                            |

--- Comment #6 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-08-06 17:18:40 UTC ---
Having a look.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug c++/21385] __extension__ lost inside template
       [not found] <bug-21385-4@http.gcc.gnu.org/bugzilla/>
@ 2012-05-29 11:55 ` paolo.carlini at oracle dot com
  2012-08-06 17:18 ` paolo.carlini at oracle dot com
  2015-07-10 14:52 ` paolo.carlini at oracle dot com
  2 siblings, 0 replies; 8+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-05-29 11:55 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21385

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jimb@red-bean.com

--- Comment #5 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-05-29 11:52:52 UTC ---
*** Bug 45492 has been marked as a duplicate of this bug. ***


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug c++/21385] __extension__ lost inside template
       [not found] <bug-21385-10569@http.gcc.gnu.org/bugzilla/>
  2007-09-22 18:09 ` pcarlini at suse dot de
  2007-09-23 17:49 ` jason at gcc dot gnu dot org
@ 2007-09-24 16:46 ` pcarlini at suse dot de
  2 siblings, 0 replies; 8+ messages in thread
From: pcarlini at suse dot de @ 2007-09-24 16:46 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from pcarlini at suse dot de  2007-09-24 16:46 -------
I see, thanks. Well, if I can bother you a bit more about your very welcome
work on attribute aligned, I noticed also PR10179. Thanks again.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21385


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug c++/21385] __extension__ lost inside template
       [not found] <bug-21385-10569@http.gcc.gnu.org/bugzilla/>
  2007-09-22 18:09 ` pcarlini at suse dot de
@ 2007-09-23 17:49 ` jason at gcc dot gnu dot org
  2007-09-24 16:46 ` pcarlini at suse dot de
  2 siblings, 0 replies; 8+ messages in thread
From: jason at gcc dot gnu dot org @ 2007-09-23 17:49 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from jason at gcc dot gnu dot org  2007-09-23 17:49 -------
I don't think implementing this can leverage the attribute work.  I'd probably
implement it with a new tree code; the alternative would be a new flag in a lot
of places.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21385


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug c++/21385] __extension__ lost inside template
       [not found] <bug-21385-10569@http.gcc.gnu.org/bugzilla/>
@ 2007-09-22 18:09 ` pcarlini at suse dot de
  2007-09-23 17:49 ` jason at gcc dot gnu dot org
  2007-09-24 16:46 ` pcarlini at suse dot de
  2 siblings, 0 replies; 8+ messages in thread
From: pcarlini at suse dot de @ 2007-09-22 18:09 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pcarlini at suse dot de  2007-09-22 18:08 -------
I'm not sure, but naively appears fixable similarly to the attributes... Jason?


-- 

pcarlini at suse dot de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jason at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21385


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-07-10 14:52 UTC | newest]

Thread overview: 8+ 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
     [not found] <bug-21385-10569@http.gcc.gnu.org/bugzilla/>
2007-09-22 18:09 ` pcarlini at suse dot de
2007-09-23 17:49 ` jason at gcc dot gnu dot org
2007-09-24 16:46 ` pcarlini at suse dot de
     [not found] <bug-21385-4@http.gcc.gnu.org/bugzilla/>
2012-05-29 11:55 ` paolo.carlini at oracle dot com
2012-08-06 17:18 ` paolo.carlini at oracle dot com
2015-07-10 14:52 ` paolo.carlini at oracle dot com

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).