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

identifier "__auto_type" is undefined of atomic_store #2175

Closed
qwerty258 opened this issue Jun 23, 2018 · 5 comments
Closed

identifier "__auto_type" is undefined of atomic_store #2175

qwerty258 opened this issue Jun 23, 2018 · 5 comments
Labels
bug fixed Check the Milestone for the release in which the fix is or will be available. Language Service
Milestone

Comments

@qwerty258
Copy link

Type: LanguageService

Describe the bug

  • OS and Version: Ubuntu 16.04.4 LTS
  • VS Code Version: 1.24.1
  • C/C++ Extension Version: 0.17.5
  • Other extensions you installed (and if the issue persists after disabling them): autoconf, Git History, Markdown TOC, Python, File Templates for VSCdoe
  • A clear and concise description of what the bug is.

for atomic_store prompting identifier "__auto_type" is undefined

To Reproduce
c_cpp_properties.json:

{
    "env": {
        "defaultIncludePath": [
            "${workspaceRoot}/include_internal",
            "${workspaceRoot}/generated_files"
        ]
    },
    "configurations": [
        {
            "name": "Linux",
            "intelliSenseMode": "clang-x64",
            "includePath": [
                "${workspaceRoot}/include_internal",
                "${workspaceRoot}/generated_files"
                ],
            "defines": [],
            "compilerPath": "/opt/arm-linux-gnueabihf/bin/arm-linux-gnueabihf-gcc",
            "cppStandard": "c++17",
            "cStandard": "c11",
            "browse": {
                "path": [
                ],
                "limitSymbolsToIncludedHeaders": true,
                "databaseFilename": "${workspaceFolder}/.vscode/browse.vc.db"
            }
        }
    ],
    "version": 4
}
#include <stdatomic.h>
int main()
{
    atomic_bool b_variable = ATOMIC_VAR_INIT(false);
    atomic_store(&b_variable, true);
    return 0;
}

Expected behavior
do not prompting identifier "__auto_type" is undefined for using atomic_store of C 11 standard

@sean-mcmanus
Copy link
Contributor

sean-mcmanus commented Jun 25, 2018

A previous issue with the same error is #1448 , but that got fixed by setting the compilerPath to gcc. My best guess is that we're not able to query the compiler you're using for the correct includes/defines (i.e. this works for me with the normal gcc compiler). Can you set your C_Cpp.loggingLevel temporarily to "Debug" and then open a C/C++ file to see in the C/C++ Output pane what the problem is? I don't think we've ever tested with that version of the gcc compiler (although we have tested with other arm gcc compilers).

@sean-mcmanus sean-mcmanus added Language Service more info needed The issue report is not actionable in its current state labels Jun 25, 2018
@sean-mcmanus
Copy link
Contributor

sean-mcmanus commented Jun 25, 2018

Oops, actually, I am hitting the "__auto_type" issue with gcc-6 (not clang though). Looks like our parser isn't configured correctly to handle the __auto_type gcc extension. I couldn't work around the issue via forcing the --gcc or --gnu_version. I'm not sure when we'll get around to fixing this...

@sean-mcmanus sean-mcmanus added bug and removed more info needed The issue report is not actionable in its current state labels Jun 25, 2018
@qwerty258
Copy link
Author

I'm sorry, I deleted too much config when removing personal info. "includePath" and "path" had config: /opt/arm-linux-gnueabihf/arm-linux-gnueabihf/sysroot/usr/include.
It's really annoying to have error prompting wherever there is atomic_store atomic_load but the extension still helps a lot in coding.

@sean-mcmanus sean-mcmanus added this to the August 2018 milestone Jul 24, 2018
@sean-mcmanus sean-mcmanus added the fixed Check the Milestone for the release in which the fix is or will be available. label Jul 24, 2018
@sean-mcmanus
Copy link
Contributor

sean-mcmanus commented Jul 24, 2018

Should be fixed in our next release...we weren't using the gcc version correctly to configure our parser (see #2317 ).

UPDATE: A fix is available in our 0.17.8-insiders release at https://github.com/Microsoft/vscode-cpptools/releases/tag/v0.17.8-insiders .

@qwerty258
Copy link
Author

Just installed v0.17.8-insiders and all the error prompting disappeared.
The extension works fine, if encounter problem in future will let you know.
Thank you @sean-mcmanus . 👍👍👍

@github-actions github-actions bot locked and limited conversation to collaborators Oct 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug fixed Check the Milestone for the release in which the fix is or will be available. Language Service
Projects
None yet
Development

No branches or pull requests

2 participants