www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 8696] New: Compiler reports incorrect dangling else with version attributes

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=8696

           Summary: Compiler reports incorrect dangling else with version
                    attributes
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: alex lycus.org



CEST ---
$ cat test.d
version (Posix):

version (linux)
{
}
else version (OSX)
{
}
else
{
}
$ <> dmd -w -lib test.d
test.d(9): Warning: else is dangling, add { } after condition at test.d(1)
test.d(6): Warning: else is dangling, add { } after condition at test.d(1)

I don't see any reason at all that this should be considered a dangling else
case.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 19 2012
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=8696


Iain Buclaw <ibuclaw ubuntu.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ibuclaw ubuntu.com



https://github.com/D-Programming-Language/dmd/pull/1129

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 19 2012
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=8696




Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/dc2aa0680f8d044a2e86032523d923f3631972df
Issue 8696 - Compiler reports incorrect dangling else with version attributes

https://github.com/D-Programming-Language/dmd/commit/ad9136cb89ab5cfdadd445e4ba86d6447dfd549d
Add unittest for issue 8696.

https://github.com/D-Programming-Language/dmd/commit/7eb566a1a81b458426dbadb3c069bcc6e5d0f584


Issue 8696 - Compiler reports incorrect dangling else with version():

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 19 2012
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=8696


Brad Roberts <braddr puremagic.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |braddr puremagic.com
         Resolution|                            |FIXED


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 19 2012
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=8696


kekeniro2 yahoo.co.jp changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |thecybershadow gmail.com



*** Issue 7601 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: -------
Sep 19 2012