From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2178) id D393C3857C44; Fri, 11 Nov 2022 16:28:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D393C3857C44 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1668184134; bh=Rw4nyJdd04oeLktZZNOCQGxPQLQ9IGBp9YMOEO21q10=; h=From:To:Subject:Date:From; b=pDmf9UeUEOOoE/ttuNfwtO7plT7/5wRxLR9LvJor4MHdcPyqkjdR/UxLv4Y+iaCWN B80Jw4wLmJ04RrW5uNHJDf0BGW3ATb+Dn+axdyWjoSCzMtwR5iLFhJg8jZiFS+qdzb XqtpFYGItQYeMrPiTpVWGeik0Hn4Os6Fbmlm24vc= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Florian Weimer To: glibc-cvs@sourceware.org Subject: [glibc/release/2.34/master] Allow #pragma GCC in headers in conformtest X-Act-Checkin: glibc X-Git-Author: Joseph Myers X-Git-Refname: refs/heads/release/2.34/master X-Git-Oldrev: 6e8044e910600f71f4802dba2d105007af8428c3 X-Git-Newrev: 291d4402067760edb7c0f339f9e451787a25e20a Message-Id: <20221111162854.D393C3857C44@sourceware.org> Date: Fri, 11 Nov 2022 16:28:54 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;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) 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))