[cfe-dev] build fails on Solaris 11.2 with g++ 4.8.2

Vladimir Voskresensky - Oracle vladimir.voskresensky at oracle.com
Fri Apr 17 11:40:55 PDT 2015


On 04/17/15 05:17 PM, C Bergström wrote:
> is SEC conflicting with something?
>
> +#undef SEC
>
> Wouldn't renaming it be better?
I don't know how important to have enumerator named SEC in enum ArchExtKind (in 
file llvm/lib/Target/ARM/ARMArchExtName.h).
But it includes llvm/lib/Target/ARM/ARMArchExtName.def as
namespace llvm {
namespace ARM {

enum ArchExtKind {
   INVALID_ARCHEXT = 0

#define ARM_ARCHEXT_NAME(NAME, ID) , ID
#include "ARMArchExtName.def"
};

} // namespace ARM
} // namespace llvm

I just see ARMArchExtName.def has:
ARM_ARCHEXT_NAME("sec", SEC)

And it conflicts with system macro SEC on Solaris

So, someone should decide, i.e. by analyzing usage of SEC enumerator in
llvm/lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp: GetArchExtName

May be it make sense to prefix all IDs in ARMArchExtName.def with ARM_EXT_ or 
similar, like
ARM_ARCHEXT_NAME("sec", ARM_EXT_SEC)

Vladimir.





More information about the cfe-dev mailing list