Making a new GCC routine visible
Jonathan Wakely
jwakely.gcc@gmail.com
Sat May 19 22:11:00 GMT 2012
On 19 May 2012 20:00, Amittai Aviram wrote:
> On May 19, 2012, at 2:16 PM, Jonathan Wakely wrote:
>
>> It's better to make the header self-sufficient:
>>
>> #ifdef __cplusplus
>> extern "C" {
>> #endif
>> void * domp_malloc(size_t);
>> #ifdef __cplusplus
>> extern "C" {
>> #endif
Oops, sorry for the careless copy & paste, this second one should
close the scope
#ifdef __cplusplus
}
#endif
> Thank you--I'll do that. It says here
> http://gcc.gnu.org/onlinedocs/cpp/Standard-Predefined-Macros.html
> that "__cplusplus" is a standard symbol, so it should work even with other compilers.
Yes, the macro is required by the C++ standard.
More information about the Gcc-help
mailing list