]> git.ipfire.org Git - thirdparty/gcc.git/blob - libstdc++-v3/testsuite/17_intro/badnames.cc
Update copyright years.
[thirdparty/gcc.git] / libstdc++-v3 / testsuite / 17_intro / badnames.cc
1 // Copyright (C) 2020-2023 Free Software Foundation, Inc.
2 //
3 // This file is part of the GNU ISO C++ Library. This library is free
4 // software; you can redistribute it and/or modify it under the
5 // terms of the GNU General Public License as published by the
6 // Free Software Foundation; either version 3, or (at your option)
7 // any later version.
8
9 // This library is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
13
14 // You should have received a copy of the GNU General Public License along
15 // with this library; see the file COPYING3. If not see
16 // <http://www.gnu.org/licenses/>.
17
18 // { dg-do compile { target x86_64-*-linux* } }
19 // { dg-add-options no_pch }
20
21 // Names taken from coding_style.bad_identifiers in the libstdc++ manual.
22 // We can't test this on all targets, because these names are used in
23 // non-GCC system headers. Test on x86_64-linux where we know these particular
24 // names aren't used.
25
26 // For Solaris:
27 #define _B _B is a BADNAME
28 #define _C _C is a BADNAME
29 #define _L _L is a BADNAME
30 #define _N _N is a BADNAME
31 #define _P _P is a BADNAME
32 #define _S _S is a BADNAME
33 #define _U _U is a BADNAME
34 #define _X _X is a BADNAME
35 #define _E1 _E1 is a BADNAME
36 #define _E2 _E2 is a BADNAME
37 #define _E3 _E3 is a BADNAME
38 #define _E4 _E4 is a BADNAME
39 #define _E5 _E5 is a BADNAME
40 #define _E6 _E6 is a BADNAME
41 #define _E7 _E7 is a BADNAME
42 #define _E8 _E8 is a BADNAME
43 #define _E9 _E9 is a BADNAME
44 #define _E10 _E10 is a BADNAME
45 #define _E11 _E11 is a BADNAME
46 #define _E12 _E12 is a BADNAME
47 #define _E13 _E13 is a BADNAME
48 #define _E14 _E14 is a BADNAME
49 #define _E15 _E15 is a BADNAME
50 #define _E16 _E16 is a BADNAME
51 #define _E17 _E17 is a BADNAME
52 #define _E18 _E18 is a BADNAME
53 #define _E19 _E19 is a BADNAME
54 #define _E20 _E20 is a BADNAME
55 #define _E21 _E21 is a BADNAME
56 #define _E22 _E22 is a BADNAME
57 #define _E23 _E23 is a BADNAME
58 #define _E24 _E24 is a BADNAME
59
60 // Irix adds:
61 #define _A _A is a BADNAME
62 #define _G _G is a BADNAME
63
64 // MS adds:
65 #define _T _T is a BADNAME
66 #define __deref __deref is a BADNAME
67
68 // BSD adds:
69 #define __used __used is a BADNAME
70 #define __unused __unused is a BADNAME
71 // __inline (glibc uses this so can't test here)
72 // _Complex (glibc uses this so can't test here)
73 #define __istype __istype is a BADNAME
74 #define __maskrune __maskrune is a BADNAME
75 #define __tolower __tolower is a BADNAME
76 #define __toupper __toupper is a BADNAME
77 #define __wchar_t __wchar_t is a BADNAME
78 #define __wint_t __wint_t is a BADNAME
79 // _res
80 // _res_ext
81 // __tg_*
82
83 // VxWorks adds:
84 #define _C2 _C2 is a BADNAME
85
86
87 #include <bits/stdc++.h>