You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The generate_stubs.pl script ignores all contents inside {} blocks. Unfortunately, for header files which are made C++-aware, it is typical to wrap C function calls in an extern "C" block which means it gets ignored by the tool. It does not understand the #ifdef __cplusplus surrounding it.
To Reproduce
Attempt to generate stubs against a header file which includes an extern "C" block. The prototypes inside the block are not processed.
Expected behavior
Should process prototypes inside the extern "C" block.
System observed on:
Ubuntu.
Additional context
Prototypes were expected to all occur at the top-most scope but the extern "C" keyword for C++ changes this. Really, the file needs to be run through the C (not C++) preprocessor first, so the #ifdef here has the intended effect.
Reporter Info
Joseph Hickey, Vantage Systems, Inc.
The text was updated successfully, but these errors were encountered:
Add feature to generate_stubs.pl input phase to recognize and
skip over `#ifdef __cplusplus` blocks. This makes it so it
can be used on C headers which are C++-enabled too.
jphickey
added a commit
to jphickey/osal
that referenced
this issue
Sep 28, 2021
Add feature to generate_stubs.pl input phase to recognize and
skip over `#ifdef __cplusplus` blocks. This makes it so it
can be used on C headers which are C++-enabled too.
Add feature to generate_stubs.pl input phase to recognize and
skip over `#ifdef __cplusplus` blocks. This makes it so it
can be used on C headers which are C++-enabled too.
Describe the bug
The
generate_stubs.pl
script ignores all contents inside{}
blocks. Unfortunately, for header files which are made C++-aware, it is typical to wrap C function calls in anextern "C"
block which means it gets ignored by the tool. It does not understand the#ifdef __cplusplus
surrounding it.To Reproduce
Attempt to generate stubs against a header file which includes an extern "C" block. The prototypes inside the block are not processed.
Expected behavior
Should process prototypes inside the extern "C" block.
System observed on:
Ubuntu.
Additional context
Prototypes were expected to all occur at the top-most scope but the
extern "C"
keyword for C++ changes this. Really, the file needs to be run through the C (not C++) preprocessor first, so the#ifdef
here has the intended effect.Reporter Info
Joseph Hickey, Vantage Systems, Inc.
The text was updated successfully, but these errors were encountered: