[Issue 5409] Disallow (!x & y)
https://issues.dlang.org/show_bug.cgi?id=5409 Iain Buclaw changed: What|Removed |Added Priority|P2 |P4 --
[Issue 5409] Disallow (!x & y)
https://issues.dlang.org/show_bug.cgi?id=5409 Dlang Bot changed: What|Removed |Added Keywords||pull --- Comment #10 from Dlang Bot --- @wolframw created dlang/dmd pull request #11077 "Fix Issue 5409 - Disallow (!x & y)" fixing this issue: - Fix Issue 5409 - Disallow (!x & y) https://github.com/dlang/dmd/pull/11077 --
[Issue 5409] Disallow (!x & y)
https://issues.dlang.org/show_bug.cgi?id=5409 Dmitry Olshanskychanged: What|Removed |Added Keywords||bootcamp CC||dmitry.o...@gmail.com --- Comment #9 from Dmitry Olshansky --- Seems like a natural extension to our & and && being not allowed in the same expression w/o parens. --
[Issue 5409] Disallow (!x y)
http://d.puremagic.com/issues/show_bug.cgi?id=5409 --- Comment #8 from bearophile_h...@eml.cc 2013-06-26 10:57:01 PDT --- The Visual Studio 2012 warning: http://msdn.microsoft.com/en-us/library/z01etkwy.aspx -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 5409] Disallow (!x y)
http://d.puremagic.com/issues/show_bug.cgi?id=5409 --- Comment #7 from bearophile_h...@eml.cc 2012-04-23 18:29:55 PDT --- One more example found in the Blender code: http://www.gamasutra.com/blogs/AndreyKarpov/20120423/169021/Analyzing_the_Blender_project_with_PVSStudio.php #define DEFAULT_STREAM \ m[dC] = RAC(ccel,dC); \ \ if((!nbored CFBnd)) { \ \ -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 5409] Disallow (!x y)
http://d.puremagic.com/issues/show_bug.cgi?id=5409 --- Comment #6 from bearophile_h...@eml.cc 2011-11-25 15:55:36 PST --- One more example found in the Doom3 sources: http://www.viva64.com/en/b/0120/ #define BIT( num ) ( 1 ( num ) ) const int BUTTON_ATTACK = BIT(0); void idTarget_WaitForButton::Think( void ) { ... if ( player ( !player-oldButtons BUTTON_ATTACK ) ( player-usercmd.buttons BUTTON_ATTACK ) ) { ... } I hope people like Kenji Hara will create a patch to fix this situation in D language. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 5409] Disallow (!x y)
http://d.puremagic.com/issues/show_bug.cgi?id=5409 --- Comment #5 from bearophile_h...@eml.cc 2011-11-13 09:57:46 PST --- I think one of those bugs are present in DMD sources too: http://article.gmane.org/gmane.comp.lang.d.dmd.devel/2648 dmd\src\backend\cgreg.c(51): void cgreg_init() { if (!config.flags4 CFG4optimized) return; .\backend\cgreg.c(53) : warning C4806: '' : unsafe operation: no value of type 'bool' promoted to type 'int' can equal the given constant -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 5409] Disallow (!x y)
http://d.puremagic.com/issues/show_bug.cgi?id=5409 timon.g...@gmx.ch changed: What|Removed |Added CC||timon.g...@gmx.ch --- Comment #4 from timon.g...@gmx.ch 2011-10-23 01:19:22 PDT --- (In reply to comment #3) A related case (Fragment N4), that I think too is worth catching (probably it's a less common bug): bool GetPlatformFileInfo(...) { ... info-is_directory = file_info.dwFileAttributes FILE_ATTRIBUTE_DIRECTORY != 0; ... } That is already caught with the current compiler. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 5409] Disallow (!x y)
http://d.puremagic.com/issues/show_bug.cgi?id=5409 --- Comment #3 from bearophile_h...@eml.cc 2011-10-19 15:35:52 PDT --- One more case found here, in the source code of the Chrome browser: http://www.viva64.com/en/b/0113/ Fragment N3: #define SEC_ASN1_CHOICE0x10 typedef struct sec_ASN1Template_struct { unsigned long kind; ... } SEC_ASN1Template; PRBool SEC_ASN1IsTemplateSimple( const SEC_ASN1Template *theTemplate) { ... if (!theTemplate-kind SEC_ASN1_CHOICE) { ... } A related case (Fragment N4), that I think too is worth catching (probably it's a less common bug): bool GetPlatformFileInfo(...) { ... info-is_directory = file_info.dwFileAttributes FILE_ATTRIBUTE_DIRECTORY != 0; ... } The probably right code for Fragment N4: info-is_directory = (file_info.dwFileAttributes FILE_ATTRIBUTE_DIRECTORY) != 0; -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 5409] Disallow (!x y)
http://d.puremagic.com/issues/show_bug.cgi?id=5409 --- Comment #2 from bearophile_h...@eml.cc 2011-07-09 11:08:24 PDT --- *** Issue 5814 has been marked as a duplicate of this issue. *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 5409] Disallow (!x y)
http://d.puremagic.com/issues/show_bug.cgi?id=5409 --- Comment #1 from bearophile_h...@eml.cc 2011-05-06 10:14:02 PDT --- Don seems to agree in catching this bug statically: http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.Darticle_id=135741 http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.Darticle_id=135746 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---