[Bug 211818] contrib/ntp/ntpdc/ntpdc.h redefines machine/frame.h's MOREARGS macro (TARGET_ARCH=powerpc example)

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sat Aug 13 21:26:19 UTC 2016


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=211818

            Bug ID: 211818
           Summary: contrib/ntp/ntpdc/ntpdc.h redefines machine/frame.h's
                    MOREARGS macro (TARGET_ARCH=powerpc example)
           Product: Base System
           Version: 11.0-STABLE
          Hardware: ppc
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: bin
          Assignee: freebsd-bugs at FreeBSD.org
          Reporter: markmi at dsl-only.net

In file included from
/usr/src/usr.sbin/ntp/ntpdc/../../../contrib/ntp/ntpdc/ntpdc.c:22:
/usr/src/usr.sbin/ntp/ntpdc/../../../contrib/ntp/ntpdc/ntpdc.h:14:9: warning:
'MOREARGS' macro redefined [-Wmacro-redefined]
#define MOREARGS 10
        ^
/usr/obj/clang_world/powerpc.powerpc/usr/src/tmp/usr/include/machine/frame.h:112:9:
note: previous definition is here
#define MOREARGS(sp)    ((caddr_t)((uintptr_t)(sp) + \
        ^

machine/frame.h for powerpc seems to have chosen a name (MOREARGS) that is not
that unlikely for having conflicts with other code: a form of name space
pollution.

Context:

# svnlite info /usr/src/ | grep "Rev[i:]"
Revision: 304029
Last Changed Rev: 304029

# uname -apKU
FreeBSD FreeBSDx64 11.0-PRERELEASE FreeBSD 11.0-PRERELEASE #4 r304029M: Sat Aug
13 00:40:30 PDT 2016    
markmi at FreeBSDx64:/usr/obj/clang/amd64.amd64/usr/src/sys/GENERIC-NODBG  amd64
amd64 1100500 1100500

I noticed the warnings while cross compiling buildworld for TARGET_ARCH=powerpc
via the system clang 3.8.0 . (Not that the result respects the FreeBSD powerpc
ABI requirements for stack pointer handling: the generated code requires a
so-called red-zone. It has other problems as well.)

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list