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

Intellisense support for gcc __attribute__((libcall)) not found #4800

Open
AlphaKilimanjaro opened this issue Dec 31, 2019 · 5 comments
Open

Comments

@AlphaKilimanjaro
Copy link

Type: LanguageService

Describe the bug
Certain c libraries use the ((libcall)) attribute in gcc to create interface structs for functions. What it does is it passes the interface base as first argument transparently when calling the function. Like this:

IInterface->SomeFunciton (arg1, arg2, etc);
becomes

IInterface->SomeFunction(IInterface, arg1, arg2, etc);
when constructing the call.

This is not supported in IntelliSense with the current c/c++. It would be a nice-to-have feature when working with these libraries.

  • OS and Version: Mac OS X, Windows, Chrome OS
  • VS Code Version: Latest
  • C/C++ Extension Version: Latest
  • Other extensions you installed (and if the issue persists after disabling them):
  • A clear and concise description of what the bug is.

To Reproduce

Copy/paste this in vscode and save as test.c:

`#ifdef amigaos4

#ifndef APICALL
#define APICALL attribute((libcall))
#endif

struct IntuitionIFace
{
unsigned int APICALL (*Obtain)(struct IntuitionIFace *Self, const char *arg1, char arg2);
unsigned int APICALL (*Release)(struct IntuitionIFace *Self, char arg3, short arg4);
} iface;

int main() {
struct IntuitionIFace *IIntuition = &iface;
//this below is the call
IIntuition->Obtain("Hello world", 'b');
}
#endif`

It will give am error squiggle at the end of last call.

Expected behavior

No error squiggle. The above compiles and runs with no errors in ppc-amigaos-gcc.

Screenshots

Additional context

@AlphaKilimanjaro
Copy link
Author

The ((libcall)) attribute is used by these libraries:

https://wiki.amigaos.net/wiki/Libraries

@github-actions
Copy link

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

@github-actions github-actions bot added the more votes needed Issues that have been postponed until more community members upvote it label Oct 17, 2020
@migthymax
Copy link

I'm using VS Code to cross compile, and thus stumbling over the missing support for gcc attribute((libcall))

@heartacker
Copy link

@AlphaKilimanjaro @migthymax
please vote for 3
image

@github-actions github-actions bot reopened this Feb 25, 2022
@github-actions github-actions bot modified the milestones: Triage, Backlog Feb 25, 2022
@github-actions github-actions bot removed the more votes needed Issues that have been postponed until more community members upvote it label Feb 25, 2022
@github-actions
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants