question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Function pointers are not generated correctly

See original GitHub issue

Example:

int (*idputs(int (*puts)(const char *)))(const char *);

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
rowanG077commented, Oct 15, 2017

I have also looked at this: https://shaharmike.com/cpp/libclang/

I havent’ used it yet but will do some experiments tommorow. Might solve all our problems. Not sure if we can use it from within visual studio code extensions or if it won’t choke on input with missing type definitions but it’s worth a try.

0reactions
rowanG077commented, Oct 30, 2017

@rizickus Sorry it took longer to implement. Had to try 3 different solutions to finally be able to support all to me known scenarios.

Fixed in pull request: https://github.com/christophschlosser/doxdocgen/pull/23

Read more comments on GitHub >

github_iconTop Results From Across the Web

Function pointer code not executing properly - Stack Overflow
Function pointers are weird. You don't need & in front of the function name to take its address; you can also use *...
Read more >
What is wrong with a function pointer?
I am working on a library in C, where the user can define a function and pass a pointer to a structure. The...
Read more >
Function pointer removal doesn't handle NULL pointers correctly
It seems there are a number of problems here: function pointer removal doesn't account for the possibility of NULL. Maybe we should create...
Read more >
Compiler Error CS8812 - Microsoft Learn
The address of an expression (e.g., &M ) has no type and thus cannot be assigned to a non-function pointer variable. To correct...
Read more >
CX51: 'far' Function Pointers for Philips MX - Arm Developer
The program code above compiles without warnings and generates correct calls when using the ROM(HUGE) model. To stay in the ROM(LARGE) model, call...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found