public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Florian Weimer <fw@sourceware.org>
To: glibc-cvs@sourceware.org
Subject: [glibc/release/2.34/master] Allow #pragma GCC in headers in conformtest
Date: Fri, 11 Nov 2022 16:28:54 +0000 (GMT)	[thread overview]
Message-ID: <20221111162854.D393C3857C44@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=291d4402067760edb7c0f339f9e451787a25e20a

commit 291d4402067760edb7c0f339f9e451787a25e20a
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Fri Aug 27 17:47:46 2021 +0000

    Allow #pragma GCC in headers in conformtest
    
    No "#pragma GCC" pragma allows macro-expansion of its arguments, so no
    namespace issues arise from use of such pragmas in installed headers.
    Ignore them in conformtest tests of header namespace.
    
    Tested for x86_64, in conjunction with Paul's patch
    <https://sourceware.org/pipermail/libc-alpha/2021-August/130571.html>
    adding use of such pragmas to installed headers shared with gnulib.
    
    (cherry picked from commit 6090a4a1b32fd7859d0ad5b7e9b240bd5fa04b3f)

Diff:
---
 conform/conformtest.py | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/conform/conformtest.py b/conform/conformtest.py
index 4898e16c9f..164cf2917d 100644
--- a/conform/conformtest.py
+++ b/conform/conformtest.py
@@ -631,6 +631,14 @@ class HeaderTests(object):
                     continue
                 if re.match(r'# [1-9]', line):
                     continue
+                if line.startswith('#pragma GCC '):
+                    # No GCC pragma uses macro expansion, so no
+                    # namespace issues arise from such pragmas.  (Some
+                    # pragmas not in the GCC namespace do macro-expand
+                    # their arguments and so could be affected by
+                    # macros defined by user code including the
+                    # header.)
+                    continue
                 match = re.match(r'#define (.*)', line)
                 if match:
                     self.check_token(bad_tokens, match.group(1))

                 reply	other threads:[~2022-11-11 16:28 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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

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

  git send-email \
    --in-reply-to=20221111162854.D393C3857C44@sourceware.org \
    --to=fw@sourceware.org \
    --cc=glibc-cvs@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).