Thread overview
[Issue 8898] New: false positive dangling else warning
Oct 26, 2012
dawg@dawgfoto.de
Feb 14, 2013
Martin Nowak
Feb 17, 2013
Kenji Hara
Feb 17, 2013
Kenji Hara
October 26, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8898

           Summary: false positive dangling else warning
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: dawg@dawgfoto.de


--- Comment #0 from dawg@dawgfoto.de 2012-10-26 11:47:58 PDT ---
cat > bug.d << CODE
static if (true):

version (Foo)
{
}
else
{
}
CODE

> dmd -w -c bug
bug.d(6): Warning: else is dangling, add { } after condition at bug.d(1)

----

Seems like the else is associated with the static if by the dangling counter.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
October 26, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8898


Alex Rønne Petersen <alex@lycus.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |alex@lycus.org


--- Comment #1 from Alex Rønne Petersen <alex@lycus.org> 2012-10-26 20:50:14 CEST ---
This is possibly related to issue #8696.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
November 05, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8898


Alex Rønne Petersen <alex@lycus.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|accepts-invalid             |rejects-valid


--- Comment #2 from Alex Rønne Petersen <alex@lycus.org> 2012-11-05 02:42:39 CET ---
This is not an accepts-invalid; it's a rejects-valid.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
February 14, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=8898



--- Comment #3 from Martin Nowak <code@dawg.eu> 2013-02-13 22:20:01 PST ---
> This is possibly related to issue #8696.

No it still happens.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
February 17, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=8898


Kenji Hara <k.hara.pg@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull


--- Comment #4 from Kenji Hara <k.hara.pg@gmail.com> 2013-02-16 23:22:48 PST ---
https://github.com/D-Programming-Language/dmd/pull/1668

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
February 17, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=8898



--- Comment #5 from github-bugzilla@puremagic.com 2013-02-17 06:42:46 PST ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/8cc8a41836ae504e587f6a952b1c1cbb5a2245a3 fix Issue 8898 - false positive dangling else warning

https://github.com/D-Programming-Language/dmd/commit/28e6cc14374a10be122346b0f3332cea57076234 Merge pull request #1668 from 9rnsr/fix8898

fix Issue 8898 - false positive dangling else warning

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
February 17, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=8898


Kenji Hara <k.hara.pg@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------