I have C code that is being called from C ++.
The title resembles the following:
#ifndef CLibH
#define CLibH
#ifdef __cplusplus
extern "C" {
#endif
void foo(void);
#ifdef __cplusplus
}
#endif
#endif
Since I already use extern C,
is there any use for adding a compiler attribute nothrow?
#ifndef CLibH
#define CLibH
#ifdef __cplusplus
extern "C" {
#endif
void foo(void) __attribute__((nothrow));
#ifdef __cplusplus
}
#endif
#endif
Is it extern Credundant?
Are there still advantages for use in these conditions?
source
share