link-warning.h

00001 /* GL_LINK_WARNING("literal string") arranges to emit the literal string as
00002  a linker warning on most glibc systems.
00003  We use a linker warning rather than a preprocessor warning, because
00004  #warning cannot be used inside macros. */
00005 #ifndef GL_LINK_WARNING
00006 /* This works on platforms with GNU ld and ELF object format.
00007  Testing __GLIBC__ is sufficient for asserting that GNU ld is in use.
00008  Testing __ELF__ guarantees the ELF object format.
00009  Testing __GNUC__ is necessary for the compound expression syntax. */
00010 # if defined __GLIBC__ && defined __ELF__ && defined __GNUC__
00011 # define GL_LINK_WARNING(message) \
00012  GL_LINK_WARNING1 (__FILE__, __LINE__, message)
00013 # define GL_LINK_WARNING1(file, line, message) \
00014  GL_LINK_WARNING2 (file, line, message) /* macroexpand file and line */
00015 # define GL_LINK_WARNING2(file, line, message) \
00016  GL_LINK_WARNING3 (file ":" #line ": warning: " message)
00017 # define GL_LINK_WARNING3(message) \
00018  ({ static const char warning[sizeof (message)] \
00019  __attribute__ ((__unused__, \
00020  __section__ (".gnu.warning"), \
00021  __aligned__ (1))) \
00022  = message "\n"; \
00023  (void)0; \
00024  })
00025 # else
00026 # define GL_LINK_WARNING(message) ((void) 0)
00027 # endif
00028 #endif
[フレーム]

Generated on Tue Feb 15 21:31:40 2011 by doxygen 1.6.1

AltStyle によって変換されたページ (->オリジナル) /