1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
Description: Fix autoscan false positives in C++ comments
autoscan currently misidentifies tokens inside C++-style // comments
because it only strips classic C /* */ comments. This patch ensures
that // comments are stripped after strings are processed, preventing
false positives in configure.ac generation.
Author: Arian Ott <arian.ott@ieee.org>
Bug-Debian: https://bugs.debian.org/826934
Forwarded: no
Last-Update: 2026-03-02
Index: autoconf/bin/autoscan.in
===================================================================
--- autoconf.orig/bin/autoscan.in
+++ autoconf/bin/autoscan.in
@@ -291,6 +291,7 @@ sub scan_c_file ($)
# Remove string and character constants.
s,\"[^\"]*\",,g;
s,\'[^\']*\',,g;
+ s,//.*$,,;
# Tokens in the code.
# Maybe we should ignore function definitions (in column 0)?
|