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.
This commit is contained in:
parent
6f4973c1a2
commit
6090a4a1b3
|
@ -624,6 +624,14 @@ class HeaderTests(object):
|
||||||
continue
|
continue
|
||||||
if re.match(r'# [1-9]', line):
|
if re.match(r'# [1-9]', line):
|
||||||
continue
|
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)
|
match = re.match(r'#define (.*)', line)
|
||||||
if match:
|
if match:
|
||||||
self.check_token(bad_tokens, match.group(1))
|
self.check_token(bad_tokens, match.group(1))
|
||||||
|
|
Loading…
Reference in a new issue