aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Tools/c-analyzer/c_parser/preprocessor/gcc.py
diff options
context:
space:
mode:
authorEric Snow <ericsnowcurrently@gmail.com>2023-03-06 19:40:09 -0700
committerGitHub <noreply@github.com>2023-03-06 19:40:09 -0700
commit8606697f49dc58ff7e18147401ac65a09c38cf57 (patch)
treedea36ac4b586c474ddb97ab9d25e02490a8b8ab0 /Tools/c-analyzer/c_parser/preprocessor/gcc.py
parentf9cdeb7b99d408a2e884101ede576952510bcc9b (diff)
downloadcpython-8606697f49dc58ff7e18147401ac65a09c38cf57.tar.gz
cpython-8606697f49dc58ff7e18147401ac65a09c38cf57.zip
gh-90110: Fix the c-analyzer Tool (#102483)
Some incompatible changes had gone in, and the "ignore" lists weren't properly undated. This change fixes that. It's necessary prior to enabling test_check_c_globals, which I hope to do soon. Note that this does include moving last_resort_memory_error to PyInterpreterState. https://github.com/python/cpython/issues/90110
Diffstat (limited to 'Tools/c-analyzer/c_parser/preprocessor/gcc.py')
-rw-r--r--Tools/c-analyzer/c_parser/preprocessor/gcc.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Tools/c-analyzer/c_parser/preprocessor/gcc.py b/Tools/c-analyzer/c_parser/preprocessor/gcc.py
index 77080225379..7ef1a8afc3b 100644
--- a/Tools/c-analyzer/c_parser/preprocessor/gcc.py
+++ b/Tools/c-analyzer/c_parser/preprocessor/gcc.py
@@ -29,7 +29,7 @@ COMPILER_DIRECTIVE_RE = re.compile(r'''
[^()]*
)*
) # <args>
- ( [)] [)] )? # <closed>
+ ( [)] [)] ) # <closed>
''', re.VERBOSE)
POST_ARGS = (
@@ -156,6 +156,7 @@ def _iter_top_include_lines(lines, topfile, cwd,
if name != 'pragma':
raise Exception(line)
else:
+ line = re.sub(r'__inline__', 'inline', line)
if not raw:
line, partial = _strip_directives(line, partial=partial)
yield _common.SourceLine(