On Jan 18, 2016, at 5:09 PM, Peter Maydell wrote: > On 18 January 2016 at 21:09, Programmingkid <programmingk...@gmail.com> wrote: >> >> On Jan 18, 2016, at 3:49 PM, Peter Maydell wrote: >>> Can you say what 'gcc --version' prints for you? That will >>> tell us the clang version number, which is more interesting >>> than what clang claims its gcc-compatibility is. >> >> $ gcc-4.9 --version >> gcc-4.9 (Homebrew gcc49 4.9.2_1) 4.9.2 >> Copyright (C) 2014 Free Software Foundation, Inc. >> This is free software; see the source for copying conditions. There is NO >> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > Ah, I misread your earlier message and I thought you said that > gcc-4.9 worked ok and it was plain 'gcc' that caused the warning. > Is that expansion of the macro the one produced by gcc-4.9, then?
Actually it should have but wasn't. It is of gcc 4.2.1. Here is gcc 4.9.2's output: char control[(((__darwin_size_t)((char *)(__darwin_size_t)(sizeof(struct cmsghdr)) + (sizeof(__uint32_t) - 1)) &~ (sizeof(__uint32_t) - 1)) + ((__darwin_size_t)((char *)(__darwin_size_t)(sizeof(int) * 16) + (sizeof(__uint32_t) - 1)) &~ (sizeof(__uint32_t) - 1)))] = { 0 }; This is gcc 4.2.1's output: char control[(((__darwin_size_t)((char *)(__darwin_size_t)(sizeof(struct cmsghdr)) + (sizeof(__uint32_t) - 1)) &~ (sizeof(__uint32_t) - 1)) + ((__darwin_size_t)((char *)(__darwin_size_t)(sizeof(int) * 16) + (sizeof(__uint32_t) - 1)) &~ (sizeof(__uint32_t) - 1)))] = { 0 }; They appear to be identical. > > Also, you're right that we should figure out why it seems to > be using the wrong C compiler. Can you use 'V=1' to look at > what command line make is using to compile this file, please? > (you'll probably want to dump the whole make output to a file > and then search through it). It says gcc-4.9 for the compiler. I wonder if the wrong header file is being used somewhere. > Also: > * what does your config-host.mak say (in particular about what > it's set CC, HOST_CC, CXX, etc to)? CC=gcc-4.9 HOST_CC=cc CXX=gcc-4.9 CPP=gcc-4.9 -E OBJCC=gcc-4.9 > * can you check your environment doesn't have CC set to anything? > ("env | grep CC" should tell you if it is) Nothing is returned.