[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: FTBFS on powerpc/ppc64el

* Daniel Lintott <daniel@serverb.co.uk> [141208 08:43]:
> > (Though it is also quite bad that "_unused" is in global scope in
> > the first place IMHO.)
> Can anyone elaborate on this? I understand the what is being said
> here, but my C skills aren't at that level! Can the scope be
> changed, so it's not in the global scope... or would it be a matter
> of choosing a different name for that definition.


I referred to the fact that asm/sigcontext.h introduces a field named
"_unused". This can break the build on every upstream code that uses
"_unused" somewhere (like dynamips in this case).

GCC makes it possible to declare anonymous struct members so it would
be possible to fix the problem on the other side by changing the
"unsigned long _unused[4];" field declaration by just "unsigned
long[4];", which does not pollute the scope by claiming the "_unused"

The C standard actually has a word on this: identifiers starting by an
underscore and a lowercase letter are "reserved" to file scope, see

For your particular problem, I think that renaming the macro was the
correct course of action; but if you rename it, the safe side is to
completely remove the leading underscore (or use something like
DYNAMIPS_UNUSED). Underscore + capital letter is always reserved
according to [1].

Hope this clarifies my previous remark, and thanks for fixing the

[1]: http://c-faq.com/decl/namespace.html
(this is based on C89; not sure about later versions)

Etienne Millon

Attachment: signature.asc
Description: Digital signature

Reply to: