[Llvm-bgq-discuss] Patches for r176829-20130309 (the current vesta version)

Michael Kruse MichaelKruse at meinersbur.de
Thu Apr 18 08:20:59 CDT 2013


2013/4/17 Hal Finkel <hfinkel at anl.gov>:
>> Is the inlining problem related to
>> http://clang.llvm.org/compatibility.html#inline?
>
> Yes, that's correct. Maybe we should turn on the gnu-style inline interpretation in the header file? FWIW, never versions of the glibc headers have fixed this issue, so our problem really is just that we have older system headers. Nevertheless, we should probably make this as easy as possible for the users.

Why glibc? The problem is the line

#ifndef __INLINE__
#define __INLINE__ extern inline __attribute__((always_inline))
#endif

in /bgsys/drivers/ppcfloor/hwi/include/common/compiler_support.h This
is gnu89-style inline. gcc should also use C99 semantics with the
switch -std=c99 or -std=gnu99 . Maybe it's the
__attribute__((always_inline)) that makes the difference? In my own
code I use

#if defined(__GNUC__) && !defined(__GNUC_STDC_INLINE__)
#define EXTERN_INLINE_DECLARATION extern inline
#define EXTERN_INLINE_DEFINITION inline
#else
#define EXTERN_INLINE_DECLARATION inline
#define EXTERN_INLINE_DEFINITION extern inline
#endif

to distinguish the cases.

Regards,
Michael

--
Tardyzentrismus verboten!


More information about the llvm-bgq-discuss mailing list