bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: Vaseeharan Vinayagamoorthy <Vaseeharan.Vinayagamoorthy@arm.com>,
	Paul Eggert <eggert@cs.ucla.edu>, Bruno Haible <bruno@clisp.org>
Cc: "bug-gnulib@gnu.org" <bug-gnulib@gnu.org>,
	"libc-alpha@sourceware.org" <libc-alpha@sourceware.org>
Subject: Re: [PATCH 1/5] posix: Sync regex code with gnulib
Date: Wed, 20 Jan 2021 13:05:32 -0300	[thread overview]
Message-ID: <a315640b-538d-0444-99ef-4c90ce0b86b0@linaro.org> (raw)
In-Reply-To: <385AE4F6-56ED-4A40-A936-F00C21D1BFEE@arm.com>

Right, this did not showed up on build-many-glibc.py.  My plan is to touch
as little code as possible since we are in slush freeze and sync again with
gnulib once we set development for 2.34.

I will fix this as well.

On 20/01/2021 12:32, Vaseeharan Vinayagamoorthy wrote:
> Thanks for the fix, Adhemerval Zanella.
> I assume you would fix this in other files too, for example I think a similar patch is needed for posix/fnmatch.c.
> 
> fnmatch.c:67:26: error: "__clang_major__" is not defined [-Werror=undef]
>  # if (__GNUC__ >= 7) || (__clang_major__ >= 10)
>                           ^~~~~~~~~~~~~~~
> 
> 
> 
> On 20/01/2021, 11:27, "Adhemerval Zanella" <adhemerval.zanella@linaro.org> wrote:
> 
> 
> 
>     On 19/01/2021 23:55, Paul Eggert wrote:
>     > On 1/19/21 7:43 AM, Bruno Haible wrote:
>     >> Adhemerval Zanella wrote:
>     >>> -# if (__GNUC__ >= 7) || (__clang_major__ >= 10)
>     >>> +# if (__GNUC__ >= 7) || (defined __clang_major__ &&__clang_major__ >= 10)
>     >> I would write it as:
>     >>
>     >> +# if (__GNUC__ >= 7) || (defined __clang__ && __clang_major__ >= 10)
>     > 
>     > This line should be used only if _LIBC is defined, so we can simplify it to just "#if __GNUC__ >= 7" and thus not worry about Clang.
>     > 
>     > I see that Gnulib wasn't consistent about this, so I installed the attached patch to Gnulib to fix the issue here and elsewhere. The idea is that the Gnulib regex_internal.h can be copied back to glibc, and that the other uses in Gnulib should be similar.
> 
>     Thanks, I will check with a bootstrap build and sync regex_internal.h
>     with glibc.
> 
>     > 
>     > On 1/19/21 6:43 AM, Adhemerval Zanella wrote:
>     > 
>     >> Paul, this seemed to a common pattern scatter on multiple file in gnulib.
>     >> Wouldn't be better to consolidate it on cdefs.h?
>     > 
>     > We could append something like the following to cdefs.h, and switch to __attribute_fallthrough__ for modules shared between the two systems. Is that something you'd like to pursue? (We should also sync Gnulib cdefs.h back to glibc of course.)
>     > 
>     > #if defined __STDC_VERSION__ && 201710L < __STDC_VERSION__
>     > # define __attribute_fallthrough__ [[__fallthrough__]]
>     > #elif __GNUC_PREREQ (7, 0) || __glibc_has_attribute (__fallthrough__)
>     > # define __attribute_fallthrough__ __attribute__ ((__fallthrough__))
>     > #else
>     > # define __attribute_fallthrough__ ((void) 0)
>     > #endif
> 
>     Yes, for 2.34 I will send some patches to sync the remaining gnulib
>     files and document from our part the shared files.
> 


  reply	other threads:[~2021-01-20 16:07 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-30 20:15 [PATCH 1/5] posix: Sync regex code with gnulib Adhemerval Zanella
2020-12-30 20:15 ` [PATCH 2/5] posix: Sync glob " Adhemerval Zanella
2020-12-31 21:47   ` Paul Eggert
2020-12-30 20:15 ` [PATCH 3/5] Sync intprops.h " Adhemerval Zanella
2020-12-31 21:47   ` Paul Eggert
2020-12-30 20:15 ` [PATCH 4/5] Sync flexmember.h " Adhemerval Zanella
2020-12-31 21:48   ` Paul Eggert
2020-12-30 20:15 ` [PATCH 5/5] posix: Sync fnmatch " Adhemerval Zanella
2020-12-31 21:54   ` Paul Eggert
2020-12-31 21:37 ` [PATCH 1/5] posix: Sync regex code " Paul Eggert
2021-01-19 14:16 ` Vaseeharan Vinayagamoorthy
2021-01-19 14:43   ` Adhemerval Zanella
2021-01-19 15:43     ` Bruno Haible
2021-01-20  2:55       ` Paul Eggert
2021-01-20 11:27         ` Adhemerval Zanella
2021-01-20 15:32           ` Vaseeharan Vinayagamoorthy
2021-01-20 16:05             ` Adhemerval Zanella [this message]
2021-01-20 17:46           ` Paul Eggert
2021-01-19 16:52     ` Florian Weimer
2021-01-19 17:11       ` Adhemerval Zanella
2021-01-19 17:16         ` Florian Weimer
2021-01-19 17:18           ` Adhemerval Zanella

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a315640b-538d-0444-99ef-4c90ce0b86b0@linaro.org \
    --to=adhemerval.zanella@linaro.org \
    --cc=Vaseeharan.Vinayagamoorthy@arm.com \
    --cc=bruno@clisp.org \
    --cc=bug-gnulib@gnu.org \
    --cc=eggert@cs.ucla.edu \
    --cc=libc-alpha@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).