summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/cpp/syshdr4.c
blob: fe001d2ed0ea8234177e30b850e62179979e1693 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/* Contributed by Nicholas Ormrod */
/* Origin: PR preprocessor/60723 */

/* This tests that multi-line macro callsites, which are defined
   in system headers and whose expansion contains a builtin followed
   by a non-builtin token, do not generate a line directive that
   mark the current file as being a system file, when performing
   non-integrated preprocessing. */
/* System files suppress div-by-zero warnings, so the presence of
   such indicates the lack of the bug.

   { dg-do compile }
   { dg-options -no-integrated-cpp }  */

#include "syshdr4.h"
FOO(
)

int
foo()
{
  return 1 / 0; /* { dg-warning "div-by-zero" } */
  return 0;
}