public inbox for
help / color / mirror / Atom feed
* [glibc/release/2.34/master] Allow #pragma GCC in headers in conformtest
@ 2022-11-11 16:28 Florian Weimer
  0 siblings, 0 replies; only message in thread
From: Florian Weimer @ 2022-11-11 16:28 UTC (permalink / raw)
  To: glibc-cvs;h=291d4402067760edb7c0f339f9e451787a25e20a

commit 291d4402067760edb7c0f339f9e451787a25e20a
Author: Joseph Myers <>
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
    adding use of such pragmas to installed headers shared with gnulib.
    (cherry picked from commit 6090a4a1b32fd7859d0ad5b7e9b240bd5fa04b3f)

 conform/ | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/conform/ b/conform/
index 4898e16c9f..164cf2917d 100644
--- a/conform/
+++ b/conform/
@@ -631,6 +631,14 @@ class HeaderTests(object):
                 if re.match(r'# [1-9]', line):
+                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:

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-11-11 16:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-11 16:28 [glibc/release/2.34/master] Allow #pragma GCC in headers in conformtest Florian Weimer

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).