Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: #include<vector> stopped working in clang on frontend #6607

Closed
ranaanoop opened this issue Jun 15, 2024 · 3 comments
Closed

[BUG]: #include<vector> stopped working in clang on frontend #6607

ranaanoop opened this issue Jun 15, 2024 · 3 comments
Labels

Comments

@ranaanoop
Copy link

Describe the bug

I've noticed that #include<vector> stopped working in clang in conformance view as well as execution mode. Demo

The clang error says:

In file included from <source>:1:
In file included from /opt/compiler-explorer/gcc-snapshot/lib/gcc/x86_64-linux-gnu/15.0.0/../../../../include/c++/15.0.0/vector:62:
In file included from /opt/compiler-explorer/gcc-snapshot/lib/gcc/x86_64-linux-gnu/15.0.0/../../../../include/c++/15.0.0/bits/stl_algobase.h:64:
In file included from /opt/compiler-explorer/gcc-snapshot/lib/gcc/x86_64-linux-gnu/15.0.0/../../../../include/c++/15.0.0/bits/stl_pair.h:60:
/opt/compiler-explorer/gcc-snapshot/lib/gcc/x86_64-linux-gnu/15.0.0/../../../../include/c++/15.0.0/type_traits:549:30: error: use of class template '__is_pointer' requires template arguments; argument deduction not allowed in function return type
  549 |     : public __bool_constant<__is_pointer(_Tp)>
      |                              ^~~~~~~~~~~~
/opt/compiler-explorer/gcc-snapshot/lib/gcc/x86_64-linux-gnu/15.0.0/../../../../include/c++/15.0.0/bits/cpp_type_traits.h:368:12: note: template is declared here
  368 |     struct __is_pointer : __truth_type<_IsPtr>
      |            ^
1 error generated.
Compiler returned: 1

Below is also attached the screenshot for reference.

Steps to reproduce

  1. Open this demo

Expected behavior

Expected behavior is that the program should compile in clang.

Reproduction link

https://godbolt.org/z/Phj9EP1G3

Screenshots

image

Operating System

No response

Browser version

Firefox

@ranaanoop ranaanoop added the bug label Jun 15, 2024
@partouf
Copy link
Contributor

partouf commented Jun 15, 2024

This happens occasionally as clang trunk uses gcc's trunk stdlib. It will usually be fixed by someone by the next day, but you can also file the issue at llvm-project

@partouf
Copy link
Contributor

partouf commented Jun 15, 2024

Double check that this is indeed somewhere in Clang trunk. (although the issue appears more complicated than just a quick fix for them probably, but I'm no expert)
https://godbolt.org/z/6M1jMKT3j

@jeremy-rifkin
Copy link
Member

Clang trunk fixed itself so I think we can close

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants