-
Notifications
You must be signed in to change notification settings - Fork 217
Description
Describe the bug
Eclipse fails to recognize paths and symbols associated with stdatomic, atomic keywords etc
To Reproduce
Steps to reproduce the behavior:
- Create a c project, "C Managed Build"
- Select Executable/Empty Project/Linux GCC
- For project name give name Test
- Go to project properties and under C/C++ Build/Settings, under GCC C Compiler/Dialect Select language standard ISO C11( -std=c11)
- Create a source file Test.c with the following contents:
struct TestStruct {
_Atomic int testName;
};
int main() {
return 0;
}
- Build the project and verify it compiles without error
Build Finished. 0 errors, 0 warnings. - Note the error:Even though gcc gives back no errors eclipse shows error under the _Atomic keyword with text "Syntax error"
Expected behavior
Eclipse should not be showing this error
Version Information (please complete the following information):
- OS and OS Version/extra details: Ubuntu 24.04.1 LTS updated based on latest available updated as of today 22 Nov 2024 with gcc version 13.2.0
- Eclipse Version from Help -> About : Eclipse IDE for C/C++ Developers (includes Incubating components)
Version: 2024-06 (4.32.0)
Build id: 20240606-1231 - CDT Version from Help -> About -> Installation Details -> Features tab : Eclipse CDT Eclipse C/C++ Development Tools 11.6.0.202406041555 org.eclipse.cdt
Additional context
The problem goes beyond this and possibly spans to using newer C11 features like stdatomic , since I am unaware of how CDT is designed, I am unable to understand how to get around it. I have only reported issue for features I have gotten around to using on my current project. For now I am turning off/ignoring the errors, but I am worried this will turn of analysis where the errors are genuine in the source. I tried to resolve the issues by trying to add indexing path entries etc but none of the solutions available on the internet work.