On vxworks, vxConfig.h is implicitly included, and it defines multiple
macros in the namespace reserved for the implementation.

g++.dg/modules/macro-5_a.H tests that macros from the command-line do
not make the module output, but it can't tell them from macros from
implicitly-included headers, so the test fails.

Stricten the pattern to avoid matching reserved macro names.

Tested with gcc-14 targeting ppc-vx7r2 and ppc64-vx7r2.  Also tested
with trunk on ppc64le-linux-gnu, and with gcc-14 targeting powerpc-elf.
Ok to install?


for  gcc/testsuite/ChangeLog

        * g++.dg/modules/macro-5_a.H: Don't match macros in the
        namespace reserved for the implementation.
---
 gcc/testsuite/g++.dg/modules/macro-5_a.H |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/testsuite/g++.dg/modules/macro-5_a.H 
b/gcc/testsuite/g++.dg/modules/macro-5_a.H
index d0913d1c53e57..a44a82abfae51 100644
--- a/gcc/testsuite/g++.dg/modules/macro-5_a.H
+++ b/gcc/testsuite/g++.dg/modules/macro-5_a.H
@@ -2,4 +2,4 @@
 // command line macros are not exported
 // { dg-module-cmi {} }
 
-// { dg-final { scan-lang-dump-not {Writing macro #define [_a-zA-Z0-9]* at 
[0-9]*} module } }
+// { dg-final { scan-lang-dump-not {Writing macro #define [a-z][_a-zA-Z0-9]* 
at [0-9]*} module } }

-- 
Alexandre Oliva, happy hacker            https://blog.lx.oliva.nom.br/
Free Software Activist     FSFLA co-founder     GNU Toolchain Engineer
More tolerance and less prejudice are key for inclusion and diversity.
Excluding neuro-others for not behaving ""normal"" is *not* inclusive!

Reply via email to