// { dg-do compile { target *-*-linux* *-*-gnu* } } // { dg-add-options no_pch } // Copyright (C) 2011-2025 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License along // with this library; see the file COPYING3. If not see // . // libstdc++/49745 // error: 'int truncate' redeclared as different kind of symbol // This tests that no libstdc++ headers include . // However, as discussed in PR libstdc++/100117 we cannot guarantee that // no libc headers include it indirectly, so only include the C++ headers. // That means we can't use because that includes etc. // so we list the C++ headers explicitly here. This list is unfortunately // doomed to get out of date as new headers are added to the library. #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #if __cplusplus >= 201103L #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #endif #if __cplusplus >= 201402L #include #endif #if __cplusplus >= 201703L #include #include // #include #include #include #include #include #include #endif #if __cplusplus >= 202002L #include #include #include #include #if __cpp_impl_coroutine # include #endif #if __has_include () # include #endif #include #include #include #include #include #include #include #include #include #endif #if __cplusplus > 202002L #if __has_include() # include #endif #if __has_include() # include #endif #endif int truncate = 0; // { dg-xfail-if "PR libstdc++/99995" { c++20 } }