On 26.03.2015 20:48, Jung-uk Kim wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA256 > > On 03/26/2015 15:25, Michal Necasek wrote: >> Sorry, I wasn't clear. By "what is the semantic difference" I meant >> "under what circumstances will the conditional behave differently". >> There must be some difference because otherwise what would be the >> point of a warning? > > As I said, it does not behave differently under any circumstances. It > just shuts up compiler warnings. I think the warning is to make sure > its author is using a correct variable, i.e., "A variable of type foo > is used where type bar should be used. Do you really want me to > convert it to type bar?" or something like that. > > Some people say it's too noisy but I didn't write the compiler. :-P
I wonder whether it would not make sense to at least get in touch with the compiler people here to find out their rationale for the warning and potentially open a bug report with them - "if (ptr)" is a very well-established convention in C and C++ programming. Regards, Michael -- ORACLE Deutschland B.V. & Co. KG Michael Thayer Werkstrasse 24 VirtualBox engineering 71384 Weinstadt, Germany mailto:[email protected] Hauptverwaltung: Riesstr. 25, D-80992 München Registergericht: Amtsgericht München, HRA 95603 Geschäftsführer: Jürgen Kunz Komplementärin: ORACLE Deutschland Verwaltung B.V. Hertogswetering 163/167, 3543 AS Utrecht, Niederlande Handelsregister der Handelskammer Midden-Niederlande, Nr. 30143697 Geschäftsführer: Alexander van der Ven, Astrid Kepper, Val Maher _______________________________________________ vbox-dev mailing list [email protected] https://www.virtualbox.org/mailman/listinfo/vbox-dev
