How to interpret "functions ... may also be defined as macros"?
0
votes
1
answer
76
views
For the sake of public record, I'm asking here at SE rather than on the standardization mailing list, so that it'd be more accessible to people.
With practically every headers that specify functions (or function-like interfaces), there's the following:
> The following shall be declared as functions and may also be defined as macros. Function prototypes shall be provided.
It's troubling me because it has the potential implication that some **functions** that I use may not be assignable to function pointers as they *may* have been defined as **macros**.
However, the second part ("prototypes shall be provided") seems to suggest, that, if those said **functions** are named differently from what the standard says, then that different name must have a **identical prototype** (or at least one compatible in every enumerable aspect) to that specified in the standard.
Is my interpretation correct? If not, what's the real interpretation? Can I assign the listed interfaces below that paragraph to function pointers?
Asked by DannyNiu
(692 rep)
Aug 8, 2022, 12:43 PM
Last activity: Aug 8, 2022, 05:49 PM
Last activity: Aug 8, 2022, 05:49 PM