This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] assert.h: allow gcc to detect assert(a = 1) errors
- From: Jim Meyering <jim at meyering dot net>
- To: Florian Weimer <fweimer at redhat dot com>
- Cc: Roland McGrath <roland at hack dot frob dot com>, libc-alpha <libc-alpha at sourceware dot org>
- Date: Sun, 18 Dec 2016 01:52:58 -0800
- Subject: Re: [PATCH] assert.h: allow gcc to detect assert(a = 1) errors
- Authentication-results: sourceware.org; auth=none
- References: <1405537923-28692-1-git-send-email-jim@meyering.net> <20140716201505.34FF22C398F@topped-with-meat.com> <CA+8g5KH_vG9KY-fT8miGH9oSULCoffd5DQQbgr-GDR6d2qTktA@mail.gmail.com> <CA+8g5KFy4tk+H3t0BKoe=wQqsW+ea3ZtzOe2bb+xBUNbtxGBWg@mail.gmail.com> <93a7b09e-70b9-d11e-bfb5-e54e751c8db5@redhat.com> <CA+8g5KGiN54O-jV7-NEP-4a9FrP6tio0xp2J=V0x-QX4tfAz2A@mail.gmail.com> <42486853-b892-20d1-d8e5-c74548369e2e@redhat.com> <CA+8g5KG83STDuNKaUEhjYQAHNU5hm=+UdncBNn2hWRi0m2q6KQ@mail.gmail.com> <c78e8005-524d-336a-c719-9eb0f599f028@redhat.com>
On Fri, Dec 16, 2016 at 4:15 AM, Florian Weimer <fweimer@redhat.com> wrote:
> On 12/15/2016 01:24 AM, Jim Meyering wrote:
>
>> Thanks. I didn't realize glibc used such a strict interpretation.
>> Happy to adjust. How's this (also in the attached, rebased commit):
>>
>> Let gcc detect assert(a = 1) errors.
>> * assert/assert.h (assert) Rewrite, retaining the old definintion
>> when required, but otherwise putting the expression as-is in an
>> "if"
>> expression (hence, with no added parentheses) within a statement
>> expression.
>
>
> Thanks. I just noticed your fb.com address in the ChangeLog. Do you know
> if Facebook have filed paperwork with the FSF for glibc? Commit
> 7ee03f00188723a4de2b85021e511ced6d7fc4be was just two lines, and this commit
> here only adds only very few significant source lines, too, so we might get
> away without the paperwork, but this is probably the last such change we can
> accept.
>
> Anyway, please install if you have commit access.
Thanks. Pushed.
I'll add glibc to my list for the next Facebook copyright assignment.