Issue 61639
Summary building C++ with the iOS 5.1 SDK fails with clang 16.0.0
Labels new issue
Assignees
Reporter OldWorldOrdr
    ```c++
#include <iostream>
int main() {
    std::cout << "Hello, World!" << std::endl;
    return 0;
}
```
`clang++ -target arm-apple-darwin9 -arch armv6 -miphoneos-version-min=3.0.0 -mlinker-version=609 -isysroot /home/joey/iosdev/toolchain/sdk hello.cpp`
```
In file included from hello.cpp:1:
In file included from /home/joey/iosdev/toolchain/sdk/usr/include/c++/v1/iostream:38:
In file included from /home/joey/iosdev/toolchain/sdk/usr/include/c++/v1/ios:216:
In file included from /home/joey/iosdev/toolchain/sdk/usr/include/c++/v1/__locale:15:
In file included from /home/joey/iosdev/toolchain/sdk/usr/include/c++/v1/string:434:
In file included from /home/joey/iosdev/toolchain/sdk/usr/include/c++/v1/algorithm:594:
In file included from /home/joey/iosdev/toolchain/sdk/usr/include/c++/v1/memory:590:
In file included from /home/joey/iosdev/toolchain/sdk/usr/include/c++/v1/typeinfo:61:
/home/joey/iosdev/toolchain/sdk/usr/include/c++/v1/exception:144:5: error: an attribute list cannot appear here
    _ATTRIBUTE(noreturn) friend void rethrow_exception(exception_ptr);
 ^~~~~~~~~~~~~~~~~~~~
/home/joey/iosdev/toolchain/sdk/usr/include/c++/v1/__config:120:25: note: expanded from macro '_ATTRIBUTE'
#  define _ATTRIBUTE(x) [[x]]
 ^~~~~
In file included from hello.cpp:1:
In file included from /home/joey/iosdev/toolchain/sdk/usr/include/c++/v1/iostream:38:
In file included from /home/joey/iosdev/toolchain/sdk/usr/include/c++/v1/ios:216:
In file included from /home/joey/iosdev/toolchain/sdk/usr/include/c++/v1/__locale:15:
In file included from /home/joey/iosdev/toolchain/sdk/usr/include/c++/v1/string:434:
In file included from /home/joey/iosdev/toolchain/sdk/usr/include/c++/v1/algorithm:594:
/home/joey/iosdev/toolchain/sdk/usr/include/c++/v1/memory:3724:18: error: 'reset' is missing exception specification 'noexcept'
shared_ptr<_Tp>::reset(_Yp* __p)
 ^
/home/joey/iosdev/toolchain/sdk/usr/include/c++/v1/memory:3099:30: note: previous declaration is here
    template<class _Yp> void reset(_Yp* __p) _NOEXCEPT;
                             ^
In file included from hello.cpp:1:
In file included from /home/joey/iosdev/toolchain/sdk/usr/include/c++/v1/iostream:38:
In file included from /home/joey/iosdev/toolchain/sdk/usr/include/c++/v1/ios:216:
In file included from /home/joey/iosdev/toolchain/sdk/usr/include/c++/v1/__locale:15:
/home/joey/iosdev/toolchain/sdk/usr/include/c++/v1/string:3425:44: error: 'compare' is missing exception specification 'noexcept'
basic_string<_CharT, _Traits, _Allocator>::compare(const_pointer __s) const
 ^
/home/joey/iosdev/toolchain/sdk/usr/include/c++/v1/string:1433:9: note: previous declaration is here
    int compare(const_pointer __s) const _NOEXCEPT;
        ^
In file included from hello.cpp:1:
In file included from /home/joey/iosdev/toolchain/sdk/usr/include/c++/v1/iostream:38:
In file included from /home/joey/iosdev/toolchain/sdk/usr/include/c++/v1/ios:216:
In file included from /home/joey/iosdev/toolchain/sdk/usr/include/c++/v1/__locale:18:
In file included from /home/joey/iosdev/toolchain/sdk/usr/include/c++/v1/mutex:177:
In file included from /home/joey/iosdev/toolchain/sdk/usr/include/c++/v1/functional:466:
/home/joey/iosdev/toolchain/sdk/usr/include/c++/v1/tuple:604:1: error: 'get' is missing exception specification 'noexcept'
get(tuple<_Tp...>& __t)
^
/home/joey/iosdev/toolchain/sdk/usr/include/c++/v1/__tuple:81:1: note: previous declaration is here
get(tuple<_Tp...>&) _NOEXCEPT;
^
In file included from hello.cpp:1:
In file included from /home/joey/iosdev/toolchain/sdk/usr/include/c++/v1/iostream:38:
In file included from /home/joey/iosdev/toolchain/sdk/usr/include/c++/v1/ios:216:
In file included from /home/joey/iosdev/toolchain/sdk/usr/include/c++/v1/__locale:18:
In file included from /home/joey/iosdev/toolchain/sdk/usr/include/c++/v1/mutex:177:
In file included from /home/joey/iosdev/toolchain/sdk/usr/include/c++/v1/functional:466:
/home/joey/iosdev/toolchain/sdk/usr/include/c++/v1/tuple:613:1: error: 'get' is missing exception specification 'noexcept'
get(const tuple<_Tp...>& __t)
^
/home/joey/iosdev/toolchain/sdk/usr/include/c++/v1/__tuple:85:1: note: previous declaration is here
get(const tuple<_Tp...>&) _NOEXCEPT;
^
In file included from hello.cpp:1:
In file included from /home/joey/iosdev/toolchain/sdk/usr/include/c++/v1/iostream:38:
In file included from /home/joey/iosdev/toolchain/sdk/usr/include/c++/v1/ios:216:
In file included from /home/joey/iosdev/toolchain/sdk/usr/include/c++/v1/__locale:18:
In file included from /home/joey/iosdev/toolchain/sdk/usr/include/c++/v1/mutex:177:
In file included from /home/joey/iosdev/toolchain/sdk/usr/include/c++/v1/functional:466:
/home/joey/iosdev/toolchain/sdk/usr/include/c++/v1/tuple:622:1: error: 'get' is missing exception specification 'noexcept'
get(tuple<_Tp...>&& __t)
^
/home/joey/iosdev/toolchain/sdk/usr/include/c++/v1/__tuple:89:1: note: previous declaration is here
get(tuple<_Tp...>&&) _NOEXCEPT;
^
In file included from hello.cpp:1:
In file included from /home/joey/iosdev/toolchain/sdk/usr/include/c++/v1/iostream:40:
In file included from /home/joey/iosdev/toolchain/sdk/usr/include/c++/v1/istream:156:
In file included from /home/joey/iosdev/toolchain/sdk/usr/include/c++/v1/ostream:134:
/home/joey/iosdev/toolchain/sdk/usr/include/c++/v1/bitset:212:28: error: '__init' is missing exception specification 'noexcept'
__bitset<_N_words, _Size>::__init(unsigned long long __v, false_type)
 ^
/home/joey/iosdev/toolchain/sdk/usr/include/c++/v1/bitset:193:10: note: previous declaration is here
    void __init(unsigned long long __v, false_type) _NOEXCEPT;
 ^
/home/joey/iosdev/toolchain/sdk/usr/include/c++/v1/bitset:225:28: error: '__init' is missing exception specification 'noexcept'
__bitset<_N_words, _Size>::__init(unsigned long long __v, true_type)
 ^
/home/joey/iosdev/toolchain/sdk/usr/include/c++/v1/bitset:194:10: note: previous declaration is here
    void __init(unsigned long long __v, true_type) _NOEXCEPT;
         ^
8 errors generated.
```

When using clang 15.0.7 it compiles and runs just fine, no errors or even warnings.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to