6

Sometimes when I compile C++ projects, the build goes successful by saying "Build Succeeded". But, if you clicked on error list, it may show some errors such as "IntelliSense: incomplete type is not allowed". My question is what is that "IntelliSense" errors and should I have concerns on output executable file?

5
  • Intellisense errors are not necessarily real compiler errors. Intellisense is a separate compiler that partially compiles your code to help create IDE completions and to underline possible errors in the Visual Studio IDE.
    – drescherjm
    Commented Jan 15, 2015 at 15:01
  • 1
    @drescherjm IntelliSense isn't a full compiler per se. It is strictly for analysis and has an entirely different code base from the actual MSVC compiler since the latter doesn't actually build an AST during compilation.
    – sjdowling
    Commented Jan 15, 2015 at 15:04
  • 1
    @drescherjm I'd say it's fine to answer this question. It could well serve as a canonical for the myriad of questions coming in about intellisense errors. Commented Jan 15, 2015 at 15:28
  • @πάνταῥεῖ - That's ok, as long as the poster says the errors are related to Intellisense. Too many times, posts come in stating "compiler errors" when there are no compilation errors, but are really Intellisense issues. Commented Jan 15, 2015 at 15:44
  • 1
    @PaulMcKenzie Most of the time these posters don't even mention intellisense, but just give a (link to a) screenshot :-P. It could well serve to dupe such out. Commented Jan 15, 2015 at 15:46

2 Answers 2

6

Intellisense errors are not necessarily real compiler errors. Remember Intellisense is a separate partial compiler designed for speed over accuracy. It partially compiles your code to help generate IDE completions and also is used by the IDE underline possible errors in the Visual Studio IDE.

6

The IntelliSense parser, starting with VS2010, is a product of a different company. EDG, the Edison Design Group, pretty famous in the C++ world for being the only ones that ever wrote a front-end for C++03 that was 100% compliant with that standard.

But it isn't 100% compatible with the MSVC++ compiler. VS2010 were training wheels, they've been chipping away at the incompatibilities. Some differences are pretty fundamental, MSVC++ uses a uncommon way to perform macro substitutions in the pre-processor for example. A detail that was never specified in the language standard and Microsoft committed, early, to a choice that's different from everybody else's. Very hard to fix, way too many of their customers took a dependency on that.

You could look on the bright side of this problem. Your code is dodgy and likely to be troublesome if you ever port to g++ of clang. If you need help to get it undodged then just ask a question about it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.