This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: GCC 4.8 and -ftree-loop-distribute-patterns.
- From: "Carlos O'Donell" <carlos at redhat dot com>
- To: Adhemerval Zanella <azanella at linux dot vnet dot ibm dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Mon, 08 Apr 2013 09:26:33 -0400
- Subject: Re: GCC 4.8 and -ftree-loop-distribute-patterns.
- References: <511D4F82 dot 3080604 at redhat dot com> <515F4565 dot 6030301 at linux dot vnet dot ibm dot com> <20130405223023 dot 0DEB62C096 at topped-with-meat dot com> <51601F98 dot 5000606 at linux dot vnet dot ibm dot com> <51602AC8 dot 7020108 at redhat dot com> <5162ACD7 dot 4090208 at linux dot vnet dot ibm dot com>
On 04/08/2013 07:41 AM, Adhemerval Zanella wrote:
> On 04/06/2013 11:01 AM, Carlos O'Donell wrote:
>> The patch, like my Fedora patch, is incomplete. We need to detect
>> the compiler feature, set a feature macro, and then conditionally
>> carry out whatever is required to allow glibc to compile with the
>> feature enabled.
>>
>> In your case it would be to include string.h.
>>
>> I'm up to my ears in other work, so I would be more than happy to
>> give up the glory that goes along with fixing this :-)
>
> I'm not a big fan of adding logic to handle a compiler feature to
> just add or a not an include, however it is up to discussion. I'll
> work on this fix.
It's more than that, it's about long-term maintenance of that hack.
The goal is to get everyone into the habit of checking for features
instead of GCC versions. That way the maintenance burden is *much*
easier 5, 10 years down the road. The macros all use features and
features have strict meanings. There is no such thing as GCC 4.8,
there are 4.8's for all the distros with lots of patches. We should
always check for a feature, enable the macro, and adjust using the
macro. That way reviewing code and headers and conditionals becomes
much easier and almost self-documenting.
Does that make sense?
Cheers,
Carlos.