microsoft / vscode-cpptools

Official repository for the Microsoft C/C++ extension for VS Code.
Other
5.42k stars 1.52k forks source link

AmigaOS4 support #5057

Open steen-lund opened 4 years ago

steen-lund commented 4 years ago

Hi,

I use macOS to cross compile for Amiga OS 4 and use VS Code as text editor.

Screen Shot 2020-03-04 at 23 16 49

As you can see in the screenshot it complaints about to few arguments, but actually this is a feature of the ppc-amigaos-gcc as the first argument is implicit. Eg an API is declared like this

struct PCIDevice
{
    BOOL APICALL (*Lock)(struct PCIDevice *Self, UBYTE Mode);
    void APICALL (*Unlock)(struct PCIDevice *Self);
}

but called like this my_device->Lock(PCI_LOCK_EXCLUSIVE);

Without the Self argument. The magic is in the APICALLqualifier that makes the compiler take care of this.

My question is, can I some how make the parser understand this and stop complaining about too few arguments?

Cheers Steen

steen-lund commented 4 years ago

ignore the file not found problem in the screenshot, it compiles fine and after tweeking my c_cpp_properties.json the problem is gone.

sean-mcmanus commented 4 years ago

One "workaround" is to set C_Cpp.errorSquiggles to "Disabled".

Our IntelliSense compiler only guarantees support for standard C and C++ and not compiler-specific extensions, except for certain common extensions in clang and gcc. If that APICALL can get added to the C language standard, then our IntelliSense compiler is likely to pick up support for that eventually, e.g. our extension is adding support for C++20. However, the C standard hasn't been updated with new features since C11, so it looks like they're unlikely to accept new features from the Amiga compiler unless gcc itself has added that feature as well.

steen-lund commented 4 years ago

Thanks, I'll disable the error squiggles. I highly doubt the Amiga specific APICALL will be added to either gcc upstream or the C standard :) I was hoping there was someway to extend the parser, but ... oh well ... :)

github-actions[bot] commented 3 years ago

This feature request is being closed due to insufficient upvotes. When enough upvotes are received, this issue will be eligible for our backlog.

ksdhans commented 1 year ago

How does one upvote an issue on GitHub? I've just hit the same problem, and would very much like to have it fixed.

sean-mcmanus commented 1 year ago

@ksdhans Click the face icon, then thumbs up -- which you've already done.

github-actions[bot] commented 1 year ago

This feature request has received enough votes to be added to our backlog.

mrx23dot commented 2 weeks ago

There are bigger issues that affect a lot more people.