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

C99 "compound literals are not allowed" is shown sometimes #1313

Closed
Yanpas opened this issue Dec 6, 2017 · 4 comments
Closed

C99 "compound literals are not allowed" is shown sometimes #1313

Yanpas opened this issue Dec 6, 2017 · 4 comments
Labels
bug fixed Check the Milestone for the release in which the fix is or will be available. Language Service
Milestone

Comments

@Yanpas
Copy link

Yanpas commented Dec 6, 2017

  • Operating System : Linux Ubuntu
  • VS Code version 1.18.1
  • C/C++ extension version 0.14.3

Sampel code:

struct Foo {
	int a,b;
};

void foo(struct Foo* f) {
	//struct Foo f = {.a = 1};
	foo(&(struct Foo){.a=1});
        /* Sometimes " a compound literal of type "struct Foo" is not allowed" is shown */
}
@sean-mcmanus
Copy link
Contributor

The same error repros with VS 2017. I've filed a bug with the team responsible.

@sean-mcmanus
Copy link
Contributor

sean-mcmanus commented Dec 6, 2017

I've verified this is fixed in our pending February update.

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

Fixed with the preview .vsix at https://github.com/Microsoft/vscode-cpptools/releases/tag/v0.15.0-insiders (our final release is planned for next week).

@sean-mcmanus
Copy link
Contributor

@Yanpas The bogus compound literals are not allowed error has been fixed with 0.15.0.

@github-actions github-actions bot locked and limited conversation to collaborators Oct 16, 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