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

<typeinfo> must be included before typeid is used #2623

Closed
lh123 opened this issue Oct 8, 2018 · 2 comments
Closed

<typeinfo> must be included before typeid is used #2623

lh123 opened this issue Oct 8, 2018 · 2 comments
Labels
bug fixed Check the Milestone for the release in which the fix is or will be available. Language Service
Milestone

Comments

@lh123
Copy link
Contributor

lh123 commented Oct 8, 2018

  • GCC: MinGW-W64 7.3.0
  • IntelliSenseMode: gcc-x64
#include <typeinfo>
#include <iostream>

int main() {
    const std::type_info &info = typeid(int); //<typeinfo> must be included before typeid is used
}

Relative: #1067

@bobbrow bobbrow added Language Service investigate: repro This issue's repro steps needs to be investigated/confirmed labels Oct 8, 2018
@sean-mcmanus
Copy link
Collaborator

sean-mcmanus commented Oct 8, 2018

This error occurs when the typeinfo class can't be found (the "must be included" message is misleading).

One workaround should be to add " -fno-ms-extensions" to end of your compilerPath.

I think we should change the default mode for mingw back to the -fno-ms-extensions, because -fms-extensions causes more problems than it solves.

@sean-mcmanus sean-mcmanus added this to the October 2018 milestone Oct 8, 2018
@sean-mcmanus sean-mcmanus added bug fixed Check the Milestone for the release in which the fix is or will be available. and removed investigate: repro This issue's repro steps needs to be investigated/confirmed labels Oct 8, 2018
@sean-mcmanus
Copy link
Collaborator

This should be fixed with https://github.com/Microsoft/vscode-cpptools/releases/download/0.19.1-insiders/cpptools-win32.vsix .

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

3 participants