]> git.ipfire.org Git - thirdparty/gcc.git/blob - libstdc++-v3/testsuite/17_intro/headers/all_assert_neg.cc
Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception.
[thirdparty/gcc.git] / libstdc++-v3 / testsuite / 17_intro / headers / all_assert_neg.cc
1 // { dg-do compile }
2 // { dg-options "-D__GLIBCXX__=99999999" }
3 // NB: This is done to force any generated and possibly included PCH
4 // to be invalid.
5
6 // 2005-05-24 bkoz
7
8 // Copyright (C) 2005, 2009 Free Software Foundation, Inc.
9 //
10 // This file is part of the GNU ISO C++ Library. This library is free
11 // software; you can redistribute it and/or modify it under the
12 // terms of the GNU General Public License as published by the
13 // Free Software Foundation; either version 3, or (at your option)
14 // any later version.
15
16 // This library is distributed in the hope that it will be useful,
17 // but WITHOUT ANY WARRANTY; without even the implied warranty of
18 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 // GNU General Public License for more details.
20
21 // You should have received a copy of the GNU General Public License along
22 // with this library; see the file COPYING3. If not see
23 // <http://www.gnu.org/licenses/>.
24
25 // 17.4.1.2 Headers
26
27 // This file tests that assert is not included in any of the standard
28 // includes by accident.
29
30 // C++ headers
31 #include <algorithm>
32 #include <bitset>
33 #include <complex>
34 #include <deque>
35 #include <exception>
36 #include <fstream>
37 #include <functional>
38 #include <iomanip>
39 #include <ios>
40 #include <iosfwd>
41 #include <iostream>
42 #include <istream>
43 #include <iterator>
44 #include <limits>
45 #include <list>
46 #include <locale>
47 #include <map>
48 #include <memory>
49 #include <new>
50 #include <numeric>
51 #include <ostream>
52 #include <queue>
53 #include <set>
54 #include <sstream>
55 #include <stack>
56 #include <stdexcept>
57 #include <streambuf>
58 #include <string>
59 #include <typeinfo>
60 #include <utility>
61 #include <valarray>
62 #include <vector>
63
64 // C headers
65 #include <cctype>
66 #include <cerrno>
67 #include <cfloat>
68 #include <ciso646>
69 #include <climits>
70 #include <clocale>
71 #include <cmath>
72 #include <csetjmp>
73 #include <csignal>
74 #include <cstdarg>
75 #include <cstddef>
76 #include <cstdio>
77 #include <cstdlib>
78 #include <cstring>
79 #include <ctime>
80
81 void foo()
82 {
83 assert(true);
84 }
85
86 // { dg-error "not declared" "" { target *-*-* } 83 }
87
88