0

I'm currently working with MakeFile projects in Visual Studio 2015 and 2017 RC. IntelliSense does not treat function calls with an undeclared identifier as that and displays an error, but rather assumes default-int with no arguments and displays the function description of the caller. Are there configuration steps necessary to make IntelliSense treat undefined functions as just that in Makefile projects or is this a software bug?

IntelliSense assumes default int and shows the caller's header (Note: The image is used to display the message shown on hover, so please keep it in favor of replacing it with code text again.)

EDIT: The issue is resolved when using the extension .cpp. Is there a solution to keep the extension .c?

  • I tried to copy your code into my MakeFile project in VS 2015 and there have 3 intellisense error message about the ‘VOID’ and ‘ThisFunctionDoesNotExist()’ like the screenshot: https://1drv.ms/i/s!Atv5QNuFrncKgl8bMXIdfbP5geNW. Not very clear about your issue, could you please provide the detail steps that you can reproduce your issue or upload the screenshot of your actual result in the editor to https://onedrive.live.com/ and share in here. – Sara Liu - MSFT Jan 30 '17 at 05:36
  • Sorry, I should have stated that 'VOID' is just '#define VOID void' provided by a framework. Actually, I did attach a screenshot of the message I was refering to, though it was edited in favor of a code block, which of course does not show the message. I will edit the post to show the picture again. – M. Häuser Jan 30 '17 at 17:19
  • I'm sorry, I overlooked your screenshot. The 'Identifier "ThisFunctionDoesNotExist" is undefined' error is exactly what I expected and would like to see, though as you can see in my screenshot, it is not marked. Could this be because I'm working with .c files rather than .cpp files? Everything else, including code navigation (Go to, ...), works as expected. – M. Häuser Jan 30 '17 at 17:32
  • So glad to hear that you found the key point. The intellisense for .c file is different with .cpp file and rename the .cpp file to .c, I got the same result like yours. What's do you mean keep the extensions .c? Right click the .c file and select 'Rename' or click this file and press F2 to rename the extension to .cpp, then save it, this change was saved even if you reopen VS to load the solution again. If you want to convert some .c file to .cpp file in the solution, check this similar issue for some tips: http://stackoverflow.com/questions/13694605/how-to-use-c-source-files-in-a-c-project – Sara Liu - MSFT Feb 01 '17 at 02:13
  • I am writing C code and I am compiling the code with C compilers, so I would like to use the C extension to have C IntelliSense. 'default-int' hasn't been supported in ages and is not supported by the compilers VS ships either, so I would not expect IntelliSense to accept it. – M. Häuser Feb 02 '17 at 14:27
  • Like you found, the C intellisense cannot detect this 'Identifier "ThisFunctionDoesNotExist" is undefined' and it appears when I compiled as this screenshot: https://1drv.ms/i/s!Atv5QNuFrncKgmHoBkgas3Krt_ck. For your idea, you can go to https://visualstudio.uservoice.com/forums/121579-visual-studio-ide and raise up your suggestion. – Sara Liu - MSFT Feb 06 '17 at 08:23

0 Answers0