This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] [gsoc] [gimplefe] GIMPLE FE Project


On 23 August 2016 at 21:15, Prasad Ghangal <prasad.ghangal@gmail.com> wrote:
> On 23 August 2016 at 02:56, David Malcolm <dmalcolm@redhat.com> wrote:
>> On Tue, 2016-08-23 at 00:10 +0530, Prasad Ghangal wrote:
>>> On 22 August 2016 at 16:55, Trevor Saunders <tbsaunde@tbsaunde.org>
>>> wrote:
>>> > On Sun, Aug 21, 2016 at 10:35:17PM +0530, Prasad Ghangal wrote:
>>
>> [...]
>>
>>> > @@ -228,6 +228,12 @@ struct GTY(()) function {
>>> >    /* GIMPLE body for this function.  */
>>> >    gimple_seq gimple_body;
>>> >
>>> > +  /* GIMPLEFE pass to start with */
>>> > +  opt_pass *pass_startwith = NULL;
>> I'm guessing you've only compiled in C++11 mode? because I'm pretty
>>> > sure
>>> > you are using a C++11 feature here (the default member value you
>>> > assign).
>>>
>>
>> [...]
>>
>>> I am not getting what did you mean by C++11 mode (I am not explicitly
>>
>> Prasad: what compiler version are you using to build your patched gcc?
>>  My guess is that you're using gcc 6 to build.
>>
> I am using gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.1)
>
>> In gcc 6 we changed the default C++ mode from -std=gnu++98
>> to -std=gnu++14. See:
>>   https://gcc.gnu.org/gcc-6/porting_to.html#gxx14
>>
>> I believe the syntax that Trevor spotted is only available in C++11
>> onwards:
>>
>>   $ cat test.cc
>>   struct foo
>>   {
>>     int field = 42;
>>   };
>>
>> With the default for gcc 6:
>>
>>   $ gcc -c test.cc -std=c++14
>>
>> it has no problems, whereas with the default for gcc 5 and earlier:
>>
>>   $ gcc -c test.cc -std=gnu++98
>>   test.cc:3:15: warning: non-static data member initializers only
>> available with -std=c++11 or -std=gnu++11
>>    int field = 42;
>>                ^~
>>
> and it does give me the warning. I will try compiling on < 5 version.
>
I have successfully bootstrapped using gcc 4.8 version. I think while
stage2+ builds it is putting -std=gnu++11 flag. Should I remove C++11
syntax ?


Thanks,
Prasad

>> So it's probably worth attempting to bootstrap with an older gcc as the
>> starting compiler.
>>
>> Hope this is helpful
>> Dave
>
> Re-attaching the patch as it has a typo
>
>
> Thanks,
> Prasad


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]