[Patch] Fix for PR9812

Dmitri Gribenko gribozavr at gmail.com
Fri Dec 20 16:42:29 PST 2013


On Sat, Dec 14, 2013 at 5:31 AM, Erik Verbruggen <erik.verbruggen at me.com> wrote:
> This is a fix for PR9812, and I have to say that I don't know what more to say in the commit message than "warn about bool instead of _Bool", so feedback is welcome! I sometimes run into this, hence the patch.
>
> Two notes: I have to say that the patch feels a bit intrusive, but I didn't find a better way to do this. Also, in MS mode, it will warn about __wchar_t v.s. wchar_t. I haven't extensively tested this on Windows, but to me it looks like the correct thing. Again, feedback welcome!

Thank you for working on this!  This is a strict improvement for C++,
the issue still remains for C.  In that case, we should do something
like Sema::getPrintingPolicy().  We should not be printing 'bool' in C
unless the said macro exists -- we need tests for both cases.  Will
you fix the C case as well?

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