Reputation: 317
I would like to know what does the following piece of code do, when a user predefined macro __FLOATP__
is available
#ifdef __FLOATP__
#pragma alias atanl = atanf
#pragma alias atan = atanf
#endif
So does the piece of code compile usages the of atanl and atan to atanf, when the macro __FLOATP__
is available?
Upvotes: 2
Views: 514
Reputation: 419
The #pragma
directive is defined by the ANSI C standard for implementing directives that provide the compiler with various instructions. The presence of certain #pragma
directives depends on the compiler.
In this case, as you correctly noted, #pragma alias
acts when defining the __FLOATP__
macro. The #pragma alias
indicates the linker that two identifier names are equivalent. I found this information here: #pragma alias.
Upvotes: 1