vscode-cpptools icon indicating copy to clipboard operation
vscode-cpptools copied to clipboard

IntelliSense does not recognize nested functions (GCC extension)

Open UR3IQO opened this issue 7 years ago • 13 comments

I use nested functions in C (GNU C extension https://gcc.gnu.org/onlinedocs/gcc-4.6.0/gcc/Nested-Functions.html ) and found it very helpful in some situation. Unfortunately IntelliSense does not support them. Are there any plans to add correct handling of this GNU C extension?

UR3IQO avatar Sep 14 '17 17:09 UR3IQO

We can add it to the backlog, but this is not likely something we would address anytime soon.

bobbrow avatar Sep 14 '17 17:09 bobbrow

Please add it.

UR3IQO avatar Sep 14 '17 17:09 UR3IQO

+1 I use these extensively. Very convenient sometimes to let the compiler figure out variable scope, etc instead of explicitly coding long extension lists. Also it's one of the few ways to grant a qsort comparator knowledge of the environment in which it is invoked.

GabeAl avatar Sep 18 '17 17:09 GabeAl

Is there at least a way to disable (suppress) that warning?

raggesilver avatar Jun 27 '18 00:06 raggesilver

@raggesilver What warning are you referring to? You can set errorSquiggles to "Disabled" to disable all messages, but we don't have a way to remove certain ones.

sean-mcmanus avatar Jun 27 '18 01:06 sean-mcmanus

+1 I'd be really glad to see this feature added. I really like the error squiggles in general because they are genuinely helpful in finding bugs even before compilation. It's just really annoying how a single use of a nested function fills the entire rest of the file with those squiggles...

BionicRabbit3 avatar May 19 '19 14:05 BionicRabbit3

Please add a +1 (thumbs up) to the first post so we can track the priority of this feature request better. image

bobbrow avatar May 20 '19 20:05 bobbrow

Is there any mentoring instruction? I can think to try to work on it if you get me any hints on where should I look.

I like vcode but our project use nested function intensely so I cannot adopt it if this issue is not solved.

la10736 avatar Oct 22 '19 10:10 la10736

@la10736 Our parser code is not open source.

sean-mcmanus avatar Oct 22 '19 19:10 sean-mcmanus

Ok, fine!

la10736 avatar Oct 22 '19 21:10 la10736

This repro's in VS. (We share common IntelliSense components with VS). I opened a bug against VS here: https://developercommunity.visualstudio.com/content/problem/794903/intellisense-in-gcc-mode-does-not-recognize-nested.html

Colengms avatar Oct 25 '19 19:10 Colengms

This problem will soon celebrate its fifth anniversary. Will this ever be fixed? Other GCC extensions seem to be supported (at least, they aren't marked as an error).

ArmoredPony avatar Aug 06 '22 13:08 ArmoredPony

@ArmoredPony It's a missing feature in our parser that we'd have to get the parser team to add. This is the 2nd or so most upvoted IntelliSense-related feature so that makes it more of a priority, but I don't have any ETA yet.

sean-mcmanus avatar Aug 08 '22 21:08 sean-mcmanus

I would love for this to be fixed; I work with code that uses nested functions often, and the error squiggles are an annoyance.

AnElectricalEngineer avatar Nov 24 '22 21:11 AnElectricalEngineer

Now it's 2023, we do need this feature 💔 .

laplacedoge avatar Feb 20 '23 02:02 laplacedoge

its 2024 common guys xd

ooyay avatar Jan 01 '24 00:01 ooyay