[Patch][Review][Commit] Fix for PR19024
Dmitri Gribenko
gribozavr at gmail.com
Mon Mar 3 07:44:56 PST 2014
On Mon, Mar 3, 2014 at 1:59 PM, Jonathan 'Rynn' Sauer
<jonathan.sauer at gmx.de> wrote:
> Hello,
>
> attached is a small patch to fix PR19024, "#define __FLOAT_H is likely to clash in float.h"
> (<http://llvm.org/bugs/show_bug.cgi?id=19024>). Please review and, if ok, commit.
Which header file did this clash with? Was it a part of libc? If so,
then the change makes sense to me. While the identifier is reserved
for the implementation, apart from the compiler there are other pieces
which are also part of the implementation. But if it was a normal
project, then using reserved identifiers is their fault.
If we want to go this way, please update the last line where __FLOAT_H
is duplicated. Also, it would make sense to make this change to *all*
headers that we ship, for consistency at least.
Dmitri
--
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/
More information about the cfe-commits
mailing list