Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/gcc.dg/cpp/sysmac3.c @ 132:d34655255c78
update gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 10:21:07 +0900 |
parents | 84e7813d76e9 |
children |
comparison
equal
deleted
inserted
replaced
130:e108057fa461 | 132:d34655255c78 |
---|---|
1 /* Copyright (C) 2001-2017 Free Software Foundation, Inc. */ | |
2 | |
3 /* { dg-do preprocess } */ | |
4 /* { dg-options "-std=c99 -pedantic -Wtraditional -ftrack-macro-expansion=0" } */ | |
5 | |
6 /* Tests diagnostics are suppressed for some macros defined in system | |
7 headers. */ | |
8 | |
9 /* Source: Neil Booth, 15 Jan 2001. */ | |
10 | |
11 #include "sysmac3.h" | |
12 | |
13 #define uint 1U | |
14 #define str(x) x | |
15 #define foo(x, y...) bar(x, y) /* { dg-warning "named variadic macros" } */ | |
16 | |
17 #if uint /* { dg-warning "traditional C rejects" } */ | |
18 #endif | |
19 #if sys_uint /* { dg-bogus "traditional C rejects" } */ | |
20 #endif | |
21 | |
22 (str); /* { dg-warning "used with arguments" } */ | |
23 (sys_str); /* { dg-bogus "used with arguments" } */ | |
24 | |
25 foo (one_arg); /* { dg-warning "requires at least one" } */ | |
26 sys_foo (one_arg); /* { dg-bogus "requires at least one" } */ |