@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-fgnu-tm" } */
+/* { dg-options "-fgnu-tm -ftrack-macro-expansion=0" } */
#define TC __attribute__((transaction_callable))
#define TU __attribute__((transaction_unsafe))
@@ -1,4 +1,4 @@
-/* { dg-options "-Wparentheses" } */
+/* { dg-options "-Wparentheses -ftrack-macro-expansion=0" } */
extern void f2 (int);
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-options "-std=c++0x -ftrack-macro-expansion=0" }
#define SA(X) static_assert (X, #X)
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x -w" }
+// { dg-options "-std=c++0x -w -ftrack-macro-expansion=0" }
#include <limits.h>
extern constexpr int max_s = INT_MAX + 1; // { dg-error "" }
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-Wall" } */
+/* { dg-options "-Wall -ftrack-macro-expansion=0" } */
/* Validate expected warnings and errors. */
#define U __attribute__((unused))
@@ -4,7 +4,7 @@
*/
/* { dg-do compile } */
-/* { dg-options " -ansi -Wno-long-long" } */
+/* { dg-options " -ansi -Wno-long-long -ftrack-macro-expansion=0" } */
#include "gnu-inline-common.h"
@@ -1,7 +1,7 @@
// DR 339
//
// Test of the use of various unary operators with SFINAE
-
+// { dg-options "-fmessage-length=0 -pedantic-errors -Wno-long-long -ftrack-macro-expansion=0 " }
// Boilerplate helpers
typedef char yes_type;
struct no_type { char data[2]; };
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-fgnu-tm" } */
+/* { dg-options "-fgnu-tm -ftrack-macro-expansion=0" } */
#define W(X) __attribute__((transaction_wrap(X)))
void f1(void);
@@ -3,7 +3,7 @@
gcc/testsuite/gcc.dg/Wconversion-real-integer.c */
/* { dg-do compile }
-/* { dg-options "-Wconversion" } */
+/* { dg-options "-Wconversion -ftrack-macro-expansion=0" } */
/* { dg-require-effective-target int32plus } */
#include <limits.h>
@@ -1,11 +1,11 @@
/* { dg-do compile } */
-/* { dg-options "-Wdouble-promotion" } */
+/* { dg-options "-Wdouble-promotion -ftrack-macro-expansion=2" } */
#include <stddef.h>
/* Some targets do not provide <complex.h> so we define I ourselves. */
#define I 1.0iF
-#define ID ((_Complex double)I)
+#define ID ((_Complex double)I) // { dg-warning "implicit" }
float f;
double d;
@@ -36,7 +36,7 @@ usual_arithmetic_conversions(void)
local_cf = cf + 1.0; /* { dg-warning "implicit" } */
local_cf = cf - d; /* { dg-warning "implicit" } */
- local_cf = cf + 1.0 * ID; /* { dg-warning "implicit" } */
+ local_cf = cf + 1.0 * ID; /* { dg-message "expanded from here" } */
local_cf = cf - cd; /* { dg-warning "implicit" } */
local_f = i ? f : d; /* { dg-warning "implicit" } */
@@ -3,7 +3,7 @@
C++ equivalent of gcc/testsuite/gcc.dg/Wsign-conversion.c */
// { dg-do compile }
-// { dg-options "-fsigned-char -Wsign-conversion" }
+// { dg-options "-fsigned-char -Wsign-conversion -ftrack-macro-expansion=0" }
#include <limits.h>
void fsc (signed char sc);
@@ -1,6 +1,6 @@
/* PR c/19978 : Test for duplicated warnings (unary operators). */
/* { dg-do compile } */
-/* { dg-options "-Woverflow" } */
+/* { dg-options "-Woverflow -ftrack-macro-expansion=0" } */
#include <limits.h>
@@ -1,5 +1,5 @@
// { dg-do assemble }
-// { dg-options "" }
+// { dg-options "-ftrack-macro-expansion=0" }
// prms-id: 10769
#define PMF2PF(PMF) ((void (*)())(PMF))
@@ -1,7 +1,7 @@
/* Test diagnostics for bad implicit type conversions. */
/* Origin: Joseph Myers <jsm@polyomino.org.uk> */
/* { dg-do compile } */
-/* { dg-options "-pedantic" } */
+/* { dg-options "-pedantic -ftrack-macro-expansion=0" } */
#define TESTARG(ID, TL, TR) void ID##F(TL); void ID##F2(TR x) { ID##F(x); } extern int dummy
#define TESTARP(ID, TL, TR) struct { void (*x)(TL); } ID##Fp; void ID##F2(TR x) { ID##Fp.x(x); } extern int dummy
@@ -2,7 +2,7 @@
-pedantic-errors test. */
/* Origin: Joseph Myers <jsm@polyomino.org.uk> */
/* { dg-do compile } */
-/* { dg-options "-pedantic-errors" } */
+/* { dg-options "-pedantic-errors -ftrack-macro-expansion=0" } */
#define TESTARG(ID, TL, TR) void ID##F(TL); void ID##F2(TR x) { ID##F(x); } extern int dummy
#define TESTARP(ID, TL, TR) struct { void (*x)(TL); } ID##Fp; void ID##F2(TR x) { ID##Fp.x(x); } extern int dummy
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -Wall" } */
+/* { dg-options "-O2 -Wall -ftrack-macro-expansion=0" } */
extern void abort (void);
@@ -1,7 +1,7 @@
/* Test whether buffer overflow warnings for __*_chk builtins
are emitted properly. */
/* { dg-do compile } */
-/* { dg-options "-O2 -std=gnu99" } */
+/* { dg-options "-O2 -std=gnu99 -ftrack-macro-expansion=0" } */
/* { dg-options "-mstructure-size-boundary=8 -O2 -std=gnu99" { target arm*-*-* } } */
extern void abort (void);
@@ -3,7 +3,7 @@
incorrectly determined to be 0 while it should be (size_t) -1
(== unknown). */
/* { dg-do compile } */
-/* { dg-options "-O2" } */
+/* { dg-options "-O2 -ftrack-macro-expansion=0" } */
#include "../gcc.c-torture/execute/builtins/chk.h"
@@ -1,7 +1,7 @@
/* Test whether buffer overflow warnings for __strncat_chk builtin
are emitted properly. */
/* { dg-do compile } */
-/* { dg-options "-O2 -std=gnu99" } */
+/* { dg-options "-O2 -std=gnu99 -ftrack-macro-expansion=0" } */
extern void abort (void);
@@ -3,7 +3,7 @@
expansion. */
/* Origin: Joseph Myers <joseph@codesourcery.com> */
/* { dg-do compile } */
-/* { dg-options "-std=iso9899:1990 -pedantic-errors" } */
+/* { dg-options "-std=iso9899:1990 -pedantic-errors -ftrack-macro-expansion=0" } */
struct s {
int a;
@@ -3,7 +3,7 @@
expansion. */
/* Origin: Joseph Myers <joseph@codesourcery.com> */
/* { dg-do compile } */
-/* { dg-options "-std=iso9899:1999 -pedantic-errors" } */
+/* { dg-options "-std=iso9899:1999 -pedantic-errors -ftrack-macro-expansion=0" } */
struct s {
int a;
@@ -4,18 +4,20 @@
/* Test of prohibition on directives which result from macro expansion.
See also direct2s.c */
-/* { dg-do compile } */
+/*
+ { dg-options "-ftrack-macro-expansion=0" }
+ { dg-do compile } */
#define HASH #
#define HASHDEFINE #define
#define HASHINCLUDE #include
HASH include "somerandomfile" /*{ dg-error "stray" "non-include" }*/
-/*{ dg-bogus "No such" "don't execute non-include" { target *-*-* } 13 }*/
-int resync_parser_1; /*{ dg-error "parse|syntax|expected" "" { target *-*-* } 13 }*/
+/*{ dg-bogus "No such" "don't execute non-include" { target *-*-* } 15 }*/
+int resync_parser_1; /*{ dg-error "parse|syntax|expected" "" { target *-*-* } 15 }*/
HASHINCLUDE <somerandomfile> /*{ dg-error "stray|expected" "non-include 2" }*/
-/*{ dg-bogus "No such" "don't execute non-include 2" { target *-*-* } 17 }*/
+/*{ dg-bogus "No such" "don't execute non-include 2" { target *-*-* } 19 }*/
int resync_parser_2;
void g1 ()
@@ -43,4 +45,4 @@ void f ()
#define starslash *##/
slashstar starslash /* { dg-error "parse error|syntax error|expected" "not a comment" } */
-/* { dg-error "does not give" "paste warning(s)" { target *-*-* } 45 } */
+/* { dg-error "does not give" "paste warning(s)" { target *-*-* } 47 } */
@@ -6,7 +6,7 @@
should be identical. */
/* { dg-do compile } */
-/* { dg-options "-save-temps -ansi -pedantic-errors" } */
+/* { dg-options "-save-temps -ansi -pedantic-errors -ftrack-macro-expansion=0" } */
#define HASH #
#define HASHDEFINE #define
@@ -1,8 +1,10 @@
/* Copyright (C) 2006 Free Software Foundation, Inc. */
/* PR preprocessor/28709 */
-/* { dg-do compile } */
+/* { dg-options "-ftrack-macro-expansion=0" }
+ { dg-do compile } */
+
#define foo - ## >>
foo;
-/* { dg-error "expected identifier.*'-'" "" { target *-*-* } 6 } */
-/* { dg-error pasting "" { target *-*-* } 6 } */
+/* { dg-error "expected identifier.*'-'" "" { target *-*-* } 8 } */
+/* { dg-error pasting "" { target *-*-* } 8 } */
@@ -1,5 +1,5 @@
/*
- { dg-options "-Wuninitialized" }
+ { dg-options "-Wuninitialized -ftrack-macro-expansion=0" }
{ dg-do compile }
*/
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O -Wall" } */
+/* { dg-options "-O -Wall -ftrack-macro-expansion=0" } */
/* C99 6.2.7: Compatible type and composite type. */
@@ -2,7 +2,7 @@
This one inspired by java/class.c:build_utf8_ref. */
/* { dg-do compile } */
-/* { dg-options "-Wuninitialized" } */
+/* { dg-options "-Wuninitialized -ftrack-macro-expansion=2" } */
#include <stddef.h>
@@ -24,7 +24,7 @@ do { \
tmp->car = 0; tmp->cdr = 0; tmp->type = TYPE; \
tmp->data = VALUE; \
if (TREE->car) \
- LAST->cdr = tmp; \
+ LAST->cdr = tmp; /* { dg-bogus "field" "uninitialized variable warning" { xfail *-*-* } } */ \
else \
TREE->car = tmp; \
LAST = tmp; \
@@ -39,7 +39,7 @@ make_something(int a, int b, int c)
rv = malloc (sizeof (struct tree));
rv->car = 0;
- APPEND(rv, field, INTEGER_T, a); /* { dg-bogus "field" "uninitialized variable warning" { xfail *-*-* } } */
+ APPEND(rv, field, INTEGER_T, a);
APPEND(rv, field, PTR_T, b);
APPEND(rv, field, INTEGER_T, c);
@@ -54,7 +54,7 @@ case ${query} in
echo ${CC}
;;
--cxxflags)
- CXXFLAGS_default="-D_GLIBCXX_ASSERT -fmessage-length=0"
+ CXXFLAGS_default="-D_GLIBCXX_ASSERT -fmessage-length=0 -ftrack-macro-expansion=0"
CXXFLAGS_config="@SECTION_FLAGS@ @CXXFLAGS@ @EXTRA_CXX_FLAGS@"
echo ${CXXFLAGS_default} ${CXXFLAGS_config}
;;