| 1 |
# 0 "preproc-2_b.C" |
| 2 |
# 0 "<built-in>" |
| 3 |
#define __STDC__ 1 |
| 4 |
# 0 "<command-line>" |
| 5 |
# 1 "preproc-2_b.C" |
| 6 |
# 7 "preproc-2_b.C" |
| 7 |
import "./preproc-2_a.H"; |
| 8 |
|
| 9 |
#define NAME bill |
| 10 |
|
| 11 |
int NAME = 4; |
| 12 |
|
| 13 |
int bob; // error with header |
| 14 |
|
| 15 |
float NAME; // error with self |
| 16 |
|
| 17 |
// { dg-additional-options "-fmodules-ts -fpreprocessed -fdirectives-only" } |
| 18 |
|
| 19 |
// { dg-regexp {preproc-2_b.C:13:5: error: 'int bob' redeclared as different kind of entity\nIn module ./preproc-2_a.H, imported at preproc-2_b.C:7:\n<command-line>: note: previous declaration 'void bob\(\)'\npreproc-2_a.H:8:6: note: in expansion of macro 'NAME'} } |
| 20 |
|
| 21 |
// { dg-regexp {preproc-2_b.C:9:14: error: conflicting declaration 'float bill'\npreproc-2_b.C:15:7: note: in expansion of macro 'NAME'\npreproc-2_b.C:9:14: note: previous declaration as 'int bill'\npreproc-2_b.C:11:5: note: in expansion of macro 'NAME'} } |