111
|
1 // { dg-do preprocess }
|
|
2 // { dg-options "-std=gnu99 -fdiagnostics-show-option -Wbuiltin-macro-redefined" }
|
|
3
|
|
4 #ifndef __TIME__
|
|
5 #error "__TIME__ builtin is not defined"
|
|
6 // { dg-bogus "__TIME__ builtin is not defined" "no-time" { target *-*-* } .-1 }
|
|
7 #endif
|
|
8
|
131
|
9 #define __TIME__ "X" // { dg-warning "-:\"__TIME__\" redefined .-Wbuiltin-macro-redefined." }
|
111
|
10
|
|
11 #define __TIME__ "Y" // { dg-bogus "-Wbuiltin-macro-redefined" }
|
131
|
12 // { dg-warning "-:\"__TIME__\" redefined" "not-builtin-1" { target *-*-* } .-1 }
|
|
13 // { dg-message "-:previous definition" "previous-1" { target *-*-* } 9 }
|
111
|
14
|
|
15 #define X "X"
|
|
16 #define X "Y" // { dg-bogus "-Wbuiltin-macro-redefined" }
|
131
|
17 // { dg-warning "-:\"X\" redefined" "not-builtin-2" { target *-*-* } .-1 }
|
|
18 // { dg-message "-:previous definition" "previous-2" { target *-*-* } 15 }
|