Bug 2229365

Summary: clang error in gcc std
Product: [Fedora] Fedora Reporter: alex.krivoschecov
Component: clang16Assignee: Tulio Magno Quites Machado Filho <tuliom>
Status: NEW --- QA Contact:
Severity: medium Docs Contact:
Priority: unspecified    
Version: 38CC: tuliom
Target Milestone: ---Keywords: Regression
Target Release: ---Flags: tuliom: needinfo? (alex.krivoschecov)
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description alex.krivoschecov 2023-08-05 10:19:00 UTC
In file included from /usr/bin/../lib/gcc/x86_64-redhat-linux/13/../../../../include/c++/13/iostream:41: 
In file included from /usr/bin/../lib/gcc/x86_64-redhat-linux/13/../../../../include/c++/13/ostream:40: 
In file included from /usr/bin/../lib/gcc/x86_64-redhat-linux/13/../../../../include/c++/13/ios:40: 
In file included from /usr/bin/../lib/gcc/x86_64-redhat-linux/13/../../../../include/c++/13/iosfwd:42:
In file included from /usr/bin/../lib/gcc/x86_64-redhat-linux/13/../../../../include/c++/13/bits/postypes.h:40: 
In file included from /usr/bin/../lib/gcc/x86_64-redhat-linux/13/../../../../include/c++/13/cwchar:44: /usr/include/wchar.h:35:10: fatal error: 'stddef.h' file not found
#include <stddef.h>

Reproducible: Always

Steps to Reproduce:
1.Create simple hello world
2.clang++ -Wall  hello.cpp -o hello
3.error
Actual Results:  
error in std

Expected Results:  
compile a hello world programm

clang version 16.0.6(Fedora 16.0.6-4fc38
target: x86_64-redhat-linux-gnu
thread model:posix
installedDir: /usr/bin
gcc version 13.2.1 20230728(RedHat 13.2.1-1)

Comment 1 Tulio Magno Quites Machado Filho 2023-08-07 13:01:05 UTC
I can't reproduce this issue.

```
$ rpm -q clang clang-libs gcc
clang-16.0.6-2.fc38.x86_64
clang-libs-16.0.6-2.fc38.x86_64
gcc-13.2.1-1.fc38.x86_64
$ cat hello.cpp 
#include <iostream>

int main() {
  std::cout << "Hello World!" << std::endl;

  return 0;
}

$ clang++ -Wall  hello.cpp -o hello
$ ./hello 
Hello World!
```

@alex.krivoschecov Could you provide more details, please?
What is the output from `rpm -q clang clang-libs gcc` ?