Skip to content

Eclipse unable to recognize stdatomic and related symbols #946

@sunnynarula

Description

@sunnynarula

Describe the bug
Eclipse fails to recognize paths and symbols associated with stdatomic, atomic keywords etc

To Reproduce
Steps to reproduce the behavior:

  1. Create a c project, "C Managed Build"
  2. Select Executable/Empty Project/Linux GCC
  3. For project name give name Test
  4. Go to project properties and under C/C++ Build/Settings, under GCC C Compiler/Dialect Select language standard ISO C11( -std=c11)
  5. Create a source file Test.c with the following contents:
    struct TestStruct {
    _Atomic int testName;
    };

int main() {
return 0;
}

  1. Build the project and verify it compiles without error
    Build Finished. 0 errors, 0 warnings.
  2. 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

Screenshots
Screenshot from 2024-11-22 06-07-11

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions