public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/44663]  New: missed GXX_EXPERIMENTAL guards in <tr1/tuple>?
@ 2010-06-25 10:49 pluto at agmk dot net
  2010-06-25 11:09 ` [Bug libstdc++/44663] " redi at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: pluto at agmk dot net @ 2010-06-25 10:49 UTC (permalink / raw)
  To: gcc-bugs

hi,

the latest llvm/clang++ reports an error during parsing <tr1/tuple>
included from <tr1/functional>:

In file included from t00.cpp:1:
In file included from /usr/include/c++/4.5.0/tr1/functional:39:
/usr/include/c++/4.5.0/tr1/tuple:68:30: error: variadic templates are only
allowed in C++0x
  template<int _Idx, typename... _Elements>

afaics there's no #ifdef __GXX_EXPERIMENTAL... guards but...

http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt01ch01.html#manual.intro.status.standard.200x

(...)
In this implementation -std=gnu++0x or -std=c++0x flags must be used
to enable language and library features. The pre-defined symbol
__GXX_EXPERIMENTAL_CXX0X__ is used to check for the presence of
the required flag.
(...)


-- 
           Summary: missed GXX_EXPERIMENTAL guards in <tr1/tuple>?
           Product: gcc
           Version: 4.5.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pluto at agmk dot net
  GCC host triplet: x86_64-gnu-linux


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


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

* [Bug libstdc++/44663] missed GXX_EXPERIMENTAL guards in <tr1/tuple>?
  2010-06-25 10:49 [Bug libstdc++/44663] New: missed GXX_EXPERIMENTAL guards in <tr1/tuple>? pluto at agmk dot net
@ 2010-06-25 11:09 ` redi at gcc dot gnu dot org
  2010-06-25 11:55 ` redi at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu dot org @ 2010-06-25 11:09 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from redi at gcc dot gnu dot org  2010-06-25 11:08 -------
(In reply to comment #0)
> the latest llvm/clang++ reports an error during parsing <tr1/tuple>
> included from <tr1/functional>:
> 
> In file included from t00.cpp:1:
> In file included from /usr/include/c++/4.5.0/tr1/functional:39:
> /usr/include/c++/4.5.0/tr1/tuple:68:30: error: variadic templates are only
> allowed in C++0x

That's Clang's problem, not GCC's :-)

They are supported as an extension in g++, so we can use them to implement
components like tr1::tuple.  (I think the original implementation of variadic
templates was done by Douglas Gregor, who's now working on Clang.)

See also Bug 43824


-- 

redi at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


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


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

* [Bug libstdc++/44663] missed GXX_EXPERIMENTAL guards in <tr1/tuple>?
  2010-06-25 10:49 [Bug libstdc++/44663] New: missed GXX_EXPERIMENTAL guards in <tr1/tuple>? pluto at agmk dot net
  2010-06-25 11:09 ` [Bug libstdc++/44663] " redi at gcc dot gnu dot org
@ 2010-06-25 11:55 ` redi at gcc dot gnu dot org
  2010-06-25 11:59 ` paolo dot carlini at oracle dot com
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu dot org @ 2010-06-25 11:55 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from redi at gcc dot gnu dot org  2010-06-25 11:55 -------
http://gcc.gnu.org/onlinedocs/libstdc++/faq.html#faq.other_compilers

If the guards were there as you suggest, tr1::tuple would only be usable in
C++0x mode, where it's redundant because you have std::tuple anyway.

g++ is the only compiler officially supported by libstdc++, so personally I'm
opposed to disabling functionality to support other compilers.  I'm not opposed
to changes that don't affect functionality for g++ users e.g. if non-standard
features are used unnecessarily and could be replaced with equivalent standard
features.  That doesn't apply here, as the advantages of variadic templates are
huge.


-- 


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


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

* [Bug libstdc++/44663] missed GXX_EXPERIMENTAL guards in <tr1/tuple>?
  2010-06-25 10:49 [Bug libstdc++/44663] New: missed GXX_EXPERIMENTAL guards in <tr1/tuple>? pluto at agmk dot net
  2010-06-25 11:09 ` [Bug libstdc++/44663] " redi at gcc dot gnu dot org
  2010-06-25 11:55 ` redi at gcc dot gnu dot org
@ 2010-06-25 11:59 ` paolo dot carlini at oracle dot com
  2010-06-25 14:18 ` [Bug libstdc++/44663] New: " Andrew Pinski
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: paolo dot carlini at oracle dot com @ 2010-06-25 11:59 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from paolo dot carlini at oracle dot com  2010-06-25 11:59 -------
Totally agree.


-- 


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


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

* [Bug libstdc++/44663] missed GXX_EXPERIMENTAL guards in <tr1/tuple>?
  2010-06-25 10:49 [Bug libstdc++/44663] New: missed GXX_EXPERIMENTAL guards in <tr1/tuple>? pluto at agmk dot net
                   ` (3 preceding siblings ...)
  2010-06-25 14:18 ` [Bug libstdc++/44663] New: " Andrew Pinski
@ 2010-06-25 14:18 ` pinskia at gmail dot com
  2010-06-25 14:23 ` paolo dot carlini at oracle dot com
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gmail dot com @ 2010-06-25 14:18 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from pinskia at gmail dot com  2010-06-25 14:18 -------
Subject: Re:   New: missed GXX_EXPERIMENTAL guards in <tr1/tuple>?



On Jun 25, 2010, at 3:49 AM, "pluto at agmk dot net" <gcc-bugzilla@gcc.gnu.org 
 > wrote:

> hi,
>
> the latest llvm/clang++ reports an error during parsing <tr1/tuple>
> included from <tr1/functional>:

Both of these are c++0x only headers and really are only supported  
when compiling in c++0x mode.


>
> In file included from t00.cpp:1:
> In file included from /usr/include/c++/4.5.0/tr1/functional:39:
> /usr/include/c++/4.5.0/tr1/tuple:68:30: error: variadic templates  
> are only
> allowed in C++0x
>  template<int _Idx, typename... _Elements>
>
> afaics there's no #ifdef __GXX_EXPERIMENTAL... guards but...
>
> http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt01ch01.html#manual.intro.status.standard.200x
>
> (...)
> In this implementation -std=gnu++0x or -std=c++0x flags must be used
> to enable language and library features. The pre-defined symbol
> __GXX_EXPERIMENTAL_CXX0X__ is used to check for the presence of
> the required flag.
> (...)
>
>
> -- 
>           Summary: missed GXX_EXPERIMENTAL guards in <tr1/tuple>?
>           Product: gcc
>           Version: 4.5.1
>            Status: UNCONFIRMED
>          Severity: normal
>          Priority: P3
>         Component: libstdc++
>        AssignedTo: unassigned at gcc dot gnu dot org
>        ReportedBy: pluto at agmk dot net
>  GCC host triplet: x86_64-gnu-linux
>
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44663
>


-- 


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


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

* Re: [Bug libstdc++/44663]  New: missed GXX_EXPERIMENTAL guards in <tr1/tuple>?
  2010-06-25 10:49 [Bug libstdc++/44663] New: missed GXX_EXPERIMENTAL guards in <tr1/tuple>? pluto at agmk dot net
                   ` (2 preceding siblings ...)
  2010-06-25 11:59 ` paolo dot carlini at oracle dot com
@ 2010-06-25 14:18 ` Andrew Pinski
  2010-06-25 14:18 ` [Bug libstdc++/44663] " pinskia at gmail dot com
  2010-06-25 14:23 ` paolo dot carlini at oracle dot com
  5 siblings, 0 replies; 7+ messages in thread
From: Andrew Pinski @ 2010-06-25 14:18 UTC (permalink / raw)
  To: gcc-bugzilla; +Cc: gcc-bugs



On Jun 25, 2010, at 3:49 AM, "pluto at agmk dot net" <gcc-bugzilla@gcc.gnu.org 
 > wrote:

> hi,
>
> the latest llvm/clang++ reports an error during parsing <tr1/tuple>
> included from <tr1/functional>:

Both of these are c++0x only headers and really are only supported  
when compiling in c++0x mode.


>
> In file included from t00.cpp:1:
> In file included from /usr/include/c++/4.5.0/tr1/functional:39:
> /usr/include/c++/4.5.0/tr1/tuple:68:30: error: variadic templates  
> are only
> allowed in C++0x
>  template<int _Idx, typename... _Elements>
>
> afaics there's no #ifdef __GXX_EXPERIMENTAL... guards but...
>
> http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt01ch01.html#manual.intro.status.standard.200x
>
> (...)
> In this implementation -std=gnu++0x or -std=c++0x flags must be used
> to enable language and library features. The pre-defined symbol
> __GXX_EXPERIMENTAL_CXX0X__ is used to check for the presence of
> the required flag.
> (...)
>
>
> -- 
>           Summary: missed GXX_EXPERIMENTAL guards in <tr1/tuple>?
>           Product: gcc
>           Version: 4.5.1
>            Status: UNCONFIRMED
>          Severity: normal
>          Priority: P3
>         Component: libstdc++
>        AssignedTo: unassigned at gcc dot gnu dot org
>        ReportedBy: pluto at agmk dot net
>  GCC host triplet: x86_64-gnu-linux
>
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44663
>


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

* [Bug libstdc++/44663] missed GXX_EXPERIMENTAL guards in <tr1/tuple>?
  2010-06-25 10:49 [Bug libstdc++/44663] New: missed GXX_EXPERIMENTAL guards in <tr1/tuple>? pluto at agmk dot net
                   ` (4 preceding siblings ...)
  2010-06-25 14:18 ` [Bug libstdc++/44663] " pinskia at gmail dot com
@ 2010-06-25 14:23 ` paolo dot carlini at oracle dot com
  5 siblings, 0 replies; 7+ messages in thread
From: paolo dot carlini at oracle dot com @ 2010-06-25 14:23 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from paolo dot carlini at oracle dot com  2010-06-25 14:23 -------
Wrong Andrew.


-- 


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


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

end of thread, other threads:[~2010-06-25 14:23 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-25 10:49 [Bug libstdc++/44663] New: missed GXX_EXPERIMENTAL guards in <tr1/tuple>? pluto at agmk dot net
2010-06-25 11:09 ` [Bug libstdc++/44663] " redi at gcc dot gnu dot org
2010-06-25 11:55 ` redi at gcc dot gnu dot org
2010-06-25 11:59 ` paolo dot carlini at oracle dot com
2010-06-25 14:18 ` [Bug libstdc++/44663] New: " Andrew Pinski
2010-06-25 14:18 ` [Bug libstdc++/44663] " pinskia at gmail dot com
2010-06-25 14:23 ` paolo dot 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).