[llvmlinux] Multiple storage class error
renato.golin at linaro.org
Sun Nov 17 16:31:38 UTC 2013
On 17 November 2013 15:45, Behan Webster <behanw at converseincode.com> wrote:
> So, in that case, you could have an #elif __gcc with the GCC case and an
> #else with an error message "Compiler doesnt support builtin_whatever".
> Once the builtin is accepted on both compilers, you can merge them all, but
> still leave the #error, so that new compilers will have a very nice message
> telling them to implement the builtin.
> Hm. I see what you're suggesting. I suppose that would work.
I believe all compilers that claim GCC compatibility, including older
versions of GCC, will set the same flags, so #ifs and #ifdefs should work
with them. If the kernel is currently compiled with the "alternatives", it
should just continue to do so.
The problem arises if there are other compilers building the kernel that
don't define __gcc etc BUT implement the necessary GCC-extensions
(proprietary ones, like icc). My guess is that there aren't that many
proprietary compilers that try to compile the kernel, but that could be an
All that said, this is just bad practice, not broken code. So don't sweat
too much about it. ;)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the LLVMLinux