Andrew Pinski writes:
> On Mon, Nov 29, 2010 at 4:20 PM, Ian Lance Taylor wrote:
>> We could decide not to do anything about this, but I don't think it's a
>> non-issue. With -std=gnu++98 g++ accepts this invalid code. That is,
>> it is a g++ extension, and the code is properly rejected with
>
On Tue, Nov 30, 2010 at 9:07 AM, Miles Bader wrote:
>> If people are worried about multiple translation units, they
>> will still have to provide a definition outside the class -- most
>> likely
>
> Why?
Because its address may be silently taken (through
binding to references), therefore a defin
On Tue, Nov 30, 2010 at 11:40 PM, Gabriel Dos Reis
wrote:
> I agree. I think we have a case here where people will
> say anything to justify a (mis)feature that leads to brittle
> codes
Why does it "lead to brittle codes"?
> If people are worried about multiple translation units, they
> will st
On Tue, Nov 30, 2010 at 5:39 AM, Richard Guenther
wrote:
> On Tue, Nov 30, 2010 at 9:17 AM, Miles Bader wrote:
>> On Tue, Nov 30, 2010 at 5:13 PM, Gabriel Dos Reis
>> wrote:
>>> If you are doing that, why don't you write a simpler code by
>>> just defining (e.g. initializing) the data member out
On 2010-11-29, 22:26:31 -0800, Andrew Pinski wrote:
>
> Except it is documented as a Deprecated feature already so it is
> different from a documented extension. I would say we should just
> drop it as it is documented already as deprecated.
Are you going to drop the feature from g++98?
It is
Richard Guenther writes:
>>> If you are doing that, why don't you write a simpler code by
>>> just defining (e.g. initializing) the data member outside the class?
>>
>> 'cause I want the compiler to be able to use (inline) the underlying values.
>
> I think it'll do that with initializing the memb
On Tue, 30 Nov 2010, Richard Guenther wrote:
On Tue, Nov 30, 2010 at 9:17 AM, Miles Bader wrote:
On Tue, Nov 30, 2010 at 5:13 PM, Gabriel Dos Reis
wrote:
If you are doing that, why don't you write a simpler code by
just defining (e.g. initializing) the data member outside the class?
'cause
On Tue, Nov 30, 2010 at 9:17 AM, Miles Bader wrote:
> On Tue, Nov 30, 2010 at 5:13 PM, Gabriel Dos Reis
> wrote:
>> If you are doing that, why don't you write a simpler code by
>> just defining (e.g. initializing) the data member outside the class?
>
> 'cause I want the compiler to be able to use
Gabriel Dos Reis writes:
>> I.e., I can choose between various types of ugliness -- wrong namespace,
>> funny syntax, or (currently) gcc-dependence. I used to choose gcc-
>> dependence, but then switched to funny syntax. In the future when c++0x
>> support is more widespread, of course, I won't
On Tue, Nov 30, 2010 at 2:33 AM, Miles Bader wrote:
> Gabriel Dos Reis writes:
If you are doing that, why don't you write a simpler code by
just defining (e.g. initializing) the data member outside the class?
>>>
>>> 'cause I want the compiler to be able to use (inline) the underlying v
Gabriel Dos Reis writes:
>>> If you are doing that, why don't you write a simpler code by
>>> just defining (e.g. initializing) the data member outside the class?
>>
>> 'cause I want the compiler to be able to use (inline) the underlying values.
>
> then write even simple code: dispense with the c
On Tue, Nov 30, 2010 at 2:17 AM, Miles Bader wrote:
> On Tue, Nov 30, 2010 at 5:13 PM, Gabriel Dos Reis
> wrote:
>> If you are doing that, why don't you write a simpler code by
>> just defining (e.g. initializing) the data member outside the class?
>
> 'cause I want the compiler to be able to use
On Tue, Nov 30, 2010 at 5:13 PM, Gabriel Dos Reis
wrote:
> If you are doing that, why don't you write a simpler code by
> just defining (e.g. initializing) the data member outside the class?
'cause I want the compiler to be able to use (inline) the underlying values.
-Miles
--
Cat is power. C
On Mon, Nov 29, 2010 at 11:51 PM, Miles Bader wrote:
> Ian Lance Taylor writes:
>> We could decide not to do anything about this, but I don't think it's a
>> non-issue. With -std=gnu++98 g++ accepts this invalid code. That is,
>> it is a g++ extension, and the code is properly rejected with
>>
On Mon, Nov 29, 2010 at 4:20 PM, Ian Lance Taylor wrote:
> We could decide not to do anything about this, but I don't think it's a
> non-issue. With -std=gnu++98 g++ accepts this invalid code. That is,
> it is a g++ extension, and the code is properly rejected with
> -pedantic-errors. We could
Ian Lance Taylor writes:
> We could decide not to do anything about this, but I don't think it's a
> non-issue. With -std=gnu++98 g++ accepts this invalid code. That is,
> it is a g++ extension, and the code is properly rejected with
> -pedantic-errors. We could decide to carry the extension fo
Gabriel Dos Reis writes:
> On Mon, Nov 29, 2010 at 3:24 PM, Roman Kononov wrote:
>> $ cat test.cc
>> struct X { static float const v=1; };
>>
>> $ g++ -c -std=gnu++0x test.cc
>> test.cc:1:33: error: 'constexpr' needed for in-class initialization of
>> static data member 'v' of non-integral type
On Mon, Nov 29, 2010 at 3:24 PM, Roman Kononov wrote:
> $ cat test.cc
> struct X { static float const v=1; };
>
> $ g++ -c -std=gnu++0x test.cc
> test.cc:1:33: error: 'constexpr' needed for in-class initialization of
> static data member 'v' of non-integral type
>
> This will break a great deal of
On Mon, 29 Nov 2010, Andrew Pinski wrote:
On Mon, Nov 29, 2010 at 1:24 PM, Roman Kononov wrote:
$ cat test.cc
struct X { static float const v=1; };
$ g++ -c -std=gnu++0x test.cc
test.cc:1:33: error: 'constexpr' needed for in-class initialization of
static data member 'v' of non-integral type
2010-11-29 13:25 CST, Andrew Pinski wrote:
>well this code is not valid C++03 code to begin with.
I agree. I mean "existing gnu++" if you will.
On Mon, Nov 29, 2010 at 1:24 PM, Roman Kononov wrote:
> $ cat test.cc
> struct X { static float const v=1; };
>
> $ g++ -c -std=gnu++0x test.cc
> test.cc:1:33: error: 'constexpr' needed for in-class initialization of
> static data member 'v' of non-integral type
>
> This will break a great deal of
$ cat test.cc
struct X { static float const v=1; };
$ g++ -c -std=gnu++0x test.cc
test.cc:1:33: error: 'constexpr' needed for in-class initialization of
static data member 'v' of non-integral type
This will break a great deal of existing c++ code preventing easy
transition to c++0x. Maybe, the
22 matches
Mail list logo