clang warnings with unregisterised

Gabor Greif ggreif at
Fri Aug 29 00:56:01 UTC 2014


I have built an UNREGISTERISED GHC, and the C-compiler used behind the
scenes is clang. Now I get literally millions of warnings of the below

+     warning: attribute declaration must precede definition
+     note: expanded from macro 'II_'
+#define II_(X)          static StgWordArray (X) GNU_ATTRIBUTE(aligned (8))
+                                                              ^
+     note: expanded from macro 'GNU_ATTRIBUTE'
+#define GNU_ATTRIBUTE(at) __attribute__((at))
+                                         ^
+     note: previous definition is here
+static StgWord s4Vv_closure[] = {
+               ^

It seems like the "II_" and "EI_" prototypes *follow* the real thing,
and because clang is more picky with attribute placement, we get all
those warnings.

compiler/cmm/PprC.hs:pprExternDecl is the function that puts together
the "II_(...)" and "EI_(...)", but where does the "static StgWord
s4Vv_closure[] = {" come from?

I just want to flip the order of their occurrence.



More information about the ghc-devs mailing list