summaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/cpp/line-3.c
blob: b254ae400419c1cf6d07698c95621eea2854b620 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# 0 ".../line-1.c"
# 0 "<built-in>"
# 0 "<command-line>"
# 1 "./line-2.h" 1
#define bob 1

#define bill() 2
#error wrong
# 0 "<command-line>" 2
# 1 ".../line-3.c"
int line1;
int f = bob;
int bill(1);
int line4;

// { dg-regexp {In file included from <command-line>:\n[^\n]*/line-2.h:4:2: error: #error wrong\n} }

// { dg-regexp {[^\n]*/line-3.c:3:11: error: macro "bill" passed 1 arguments, but takes just 0\n[^\n]*/line-2.h:3: note: macro "bill" defined here\n} }

// { dg-options "-fpreprocessed -fdirectives-only" }