public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Is C++11 to be default for GCC 4.9?
@ 2014-01-24  9:26 Lars Hagström
  2014-01-24  9:36 ` Marc Glisse
  0 siblings, 1 reply; 8+ messages in thread
From: Lars Hagström @ 2014-01-24  9:26 UTC (permalink / raw)
  To: gcc

Hi,

I'm wondering whether GCC 4.9 will switch to -std=gnu++11 as default?

I did download and build 4.9 from git (through archlinux AUR) to see
if I could answer this myself, but I got slightly contradictory
results:

I got an error that implies that "auto" is not usable, which would
mean that C++11 is not enabled, but I also got a warning that implied
that gnu++11 is "enabled by default".

> error: ‘xdir’ does not name a type

> warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11 [enabled by default]

Or does the "enabled by default" bit mean something other than I think it means?

Thanks in advance for any insight you can offer.
/Lars

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

* Re: Is C++11 to be default for GCC 4.9?
  2014-01-24  9:26 Is C++11 to be default for GCC 4.9? Lars Hagström
@ 2014-01-24  9:36 ` Marc Glisse
  2014-01-24 10:08   ` pinskia
  2014-01-26 17:51   ` Richard Sandiford
  0 siblings, 2 replies; 8+ messages in thread
From: Marc Glisse @ 2014-01-24  9:36 UTC (permalink / raw)
  To: Lars Hagström; +Cc: gcc

Wrong list, please send any follow-ups to gcc-help@gcc.gnu.org only.

On Fri, 24 Jan 2014, Lars Hagström wrote:

> I'm wondering whether GCC 4.9 will switch to -std=gnu++11 as default?

No. This is asked regularly, google should find the answer easily.

> I got an error that implies that "auto" is not usable, which would
> mean that C++11 is not enabled, but I also got a warning that implied
> that gnu++11 is "enabled by default".
>
>> error: ‘xdir’ does not name a type
>
>> warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11 [enabled by default]
>
> Or does the "enabled by default" bit mean something other than I think it means?

It is the warning that is enabled by default (in other messages you would 
see [-Wunused] or [-Wformat] etc to tell you which option controls this 
warning).

-- 
Marc Glisse

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

* Re: Is C++11 to be default for GCC 4.9?
  2014-01-24  9:36 ` Marc Glisse
@ 2014-01-24 10:08   ` pinskia
  2014-01-26 17:51   ` Richard Sandiford
  1 sibling, 0 replies; 8+ messages in thread
From: pinskia @ 2014-01-24 10:08 UTC (permalink / raw)
  To: gcc-help; +Cc: Lars Hagström, gcc



> On Jan 24, 2014, at 1:26 AM, Marc Glisse <marc.glisse@inria.fr> wrote:
> 
> Wrong list, please send any follow-ups to gcc-help@gcc.gnu.org only.
> 
>> On Fri, 24 Jan 2014, Lars Hagström wrote:
>> 
>> I'm wondering whether GCC 4.9 will switch to -std=gnu++11 as default?
> 
> No. This is asked regularly, google should find the answer easily.

Considering GCC has not switched to c99 by default what makes someone think GCC should switch to c++11 by default?

-- Andrew

> 
>> I got an error that implies that "auto" is not usable, which would
>> mean that C++11 is not enabled, but I also got a warning that implied
>> that gnu++11 is "enabled by default".
>> 
>>> error: ‘xdir’ does not name a type
>> 
>>> warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11 [enabled by default]
>> 
>> Or does the "enabled by default" bit mean something other than I think it means?
> 
> It is the warning that is enabled by default (in other messages you would see [-Wunused] or [-Wformat] etc to tell you which option controls this warning).
> 
> -- 
> Marc Glisse

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

* Re: Is C++11 to be default for GCC 4.9?
  2014-01-24  9:36 ` Marc Glisse
  2014-01-24 10:08   ` pinskia
@ 2014-01-26 17:51   ` Richard Sandiford
  2014-01-26 22:44     ` Jonathan Wakely
                       ` (2 more replies)
  1 sibling, 3 replies; 8+ messages in thread
From: Richard Sandiford @ 2014-01-26 17:51 UTC (permalink / raw)
  To: gcc-help; +Cc: Lars Hagström, gcc

Marc Glisse <marc.glisse@inria.fr> writes:
>> I got an error that implies that "auto" is not usable, which would
>> mean that C++11 is not enabled, but I also got a warning that implied
>> that gnu++11 is "enabled by default".
>>
>>> error: ‘xdir’ does not name a type
>>
>>> warning: non-static data member initializers only available with
>>> -std=c++11 or -std=gnu++11 [enabled by default]
>>
>> Or does the "enabled by default" bit mean something other than I think
>> it means?
>
> It is the warning that is enabled by default (in other messages you would 
> see [-Wunused] or [-Wformat] etc to tell you which option controls this 
> warning).

I can definitely sympathise with reading the message the other way though.
If that's the only output you see, the natural assumption is that the
"enabled by default" applies to the thing just before it.

Any objections to changing it to "this warning is enabled by default"
or "warning enabled by default"?  Or is that too verbose?

Thanks,
Richard

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

* Re: Is C++11 to be default for GCC 4.9?
  2014-01-26 17:51   ` Richard Sandiford
@ 2014-01-26 22:44     ` Jonathan Wakely
  2014-01-27 16:36     ` Florian Weimer
  2014-02-02  8:05     ` Ryan Hill
  2 siblings, 0 replies; 8+ messages in thread
From: Jonathan Wakely @ 2014-01-26 22:44 UTC (permalink / raw)
  To: gcc-help, Lars Hagström, gcc, Richard Sandiford

On 26 January 2014 16:17, Richard Sandiford wrote:
> I can definitely sympathise with reading the message the other way though.
> If that's the only output you see, the natural assumption is that the
> "enabled by default" applies to the thing just before it.
>
> Any objections to changing it to "this warning is enabled by default"
> or "warning enabled by default"?  Or is that too verbose?

The former seems far too verbose to me, I could live with the latter
(even though it's only a few characters shorter!)

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

* Re: Is C++11 to be default for GCC 4.9?
  2014-01-26 17:51   ` Richard Sandiford
  2014-01-26 22:44     ` Jonathan Wakely
@ 2014-01-27 16:36     ` Florian Weimer
  2014-01-27 16:49       ` Marc Glisse
  2014-02-02  8:05     ` Ryan Hill
  2 siblings, 1 reply; 8+ messages in thread
From: Florian Weimer @ 2014-01-27 16:36 UTC (permalink / raw)
  To: gcc-help, Lars Hagström, gcc@gcc.gnu.org >> GCC, rdsandiford

On 01/26/2014 05:17 PM, Richard Sandiford wrote:
> Marc Glisse <marc.glisse@inria.fr> writes:
>>> I got an error that implies that "auto" is not usable, which would
>>> mean that C++11 is not enabled, but I also got a warning that implied
>>> that gnu++11 is "enabled by default".
>>>
>>>> error: ‘xdir’ does not name a type
>>>
>>>> warning: non-static data member initializers only available with
>>>> -std=c++11 or -std=gnu++11 [enabled by default]
>>>
>>> Or does the "enabled by default" bit mean something other than I think
>>> it means?
>>
>> It is the warning that is enabled by default (in other messages you would
>> see [-Wunused] or [-Wformat] etc to tell you which option controls this
>> warning).
>
> I can definitely sympathise with reading the message the other way though.
> If that's the only output you see, the natural assumption is that the
> "enabled by default" applies to the thing just before it.
>
> Any objections to changing it to "this warning is enabled by default"
> or "warning enabled by default"?  Or is that too verbose?

We should show the flag that enables the warning, so that users can use 
the -Wno- variant to disable it if they want.  Or does "enabled by 
default" mean that no such -Wno- flag exists?

-- 
Florian Weimer / Red Hat Product Security Team

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

* Re: Is C++11 to be default for GCC 4.9?
  2014-01-27 16:36     ` Florian Weimer
@ 2014-01-27 16:49       ` Marc Glisse
  0 siblings, 0 replies; 8+ messages in thread
From: Marc Glisse @ 2014-01-27 16:49 UTC (permalink / raw)
  To: Florian Weimer
  Cc: gcc-help, Lars Hagström, gcc@gcc.gnu.org >> GCC, rdsandiford

On Mon, 27 Jan 2014, Florian Weimer wrote:

> On 01/26/2014 05:17 PM, Richard Sandiford wrote:
>> Any objections to changing it to "this warning is enabled by default"
>> or "warning enabled by default"?  Or is that too verbose?

The second one looks fine to me, need to find a real reviewer now ;-)

> We should show the flag that enables the warning, so that users can use the 
> -Wno- variant to disable it if they want.  Or does "enabled by default" mean 
> that no such -Wno- flag exists?

Exactly. -std=c++11 is the right way to make this warning quiet.

-- 
Marc Glisse

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

* Re: Is C++11 to be default for GCC 4.9?
  2014-01-26 17:51   ` Richard Sandiford
  2014-01-26 22:44     ` Jonathan Wakely
  2014-01-27 16:36     ` Florian Weimer
@ 2014-02-02  8:05     ` Ryan Hill
  2 siblings, 0 replies; 8+ messages in thread
From: Ryan Hill @ 2014-02-02  8:05 UTC (permalink / raw)
  To: gcc; +Cc: gcc-help

[-- Attachment #1: Type: text/plain, Size: 1450 bytes --]

On Sun, 26 Jan 2014 16:17:08 +0000
Richard Sandiford <rdsandiford@googlemail.com> wrote:

> Marc Glisse <marc.glisse@inria.fr> writes:
> >> I got an error that implies that "auto" is not usable, which would
> >> mean that C++11 is not enabled, but I also got a warning that implied
> >> that gnu++11 is "enabled by default".
> >>
> >>> error: ‘xdir’ does not name a type
> >>
> >>> warning: non-static data member initializers only available with
> >>> -std=c++11 or -std=gnu++11 [enabled by default]
> >>
> >> Or does the "enabled by default" bit mean something other than I think
> >> it means?
> >
> > It is the warning that is enabled by default (in other messages you would 
> > see [-Wunused] or [-Wformat] etc to tell you which option controls this 
> > warning).
> 
> I can definitely sympathise with reading the message the other way though.
> If that's the only output you see, the natural assumption is that the
> "enabled by default" applies to the thing just before it.
> 
> Any objections to changing it to "this warning is enabled by default"
> or "warning enabled by default"?  Or is that too verbose?

If there's no flag to toggle the warning then why print anything?  To me
"enabled by default" implies there's some way to disable it.


-- 
Ryan Hill                        psn: dirtyepic_sk
   gcc-porting/toolchain/wxwidgets @ gentoo.org

47C3 6D62 4864 0E49 8E9E  7F92 ED38 BD49 957A 8463

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

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

end of thread, other threads:[~2014-02-02  8:05 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-24  9:26 Is C++11 to be default for GCC 4.9? Lars Hagström
2014-01-24  9:36 ` Marc Glisse
2014-01-24 10:08   ` pinskia
2014-01-26 17:51   ` Richard Sandiford
2014-01-26 22:44     ` Jonathan Wakely
2014-01-27 16:36     ` Florian Weimer
2014-01-27 16:49       ` Marc Glisse
2014-02-02  8:05     ` Ryan Hill

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