www.digitalmars.com Home | Search | C & C++ | D | DMDScript | News Groups | index | prev | next
Archives

D Programming
D
D.gnu
digitalmars.D
digitalmars.D.bugs
digitalmars.D.dtl
digitalmars.D.dwt
digitalmars.D.announce
digitalmars.D.learn
digitalmars.D.debugger

C/C++ Programming
c++
c++.announce
c++.atl
c++.beta
c++.chat
c++.command-line
c++.dos
c++.dos.16-bits
c++.dos.32-bits
c++.idde
c++.mfc
c++.rtl
c++.stl
c++.stl.hp
c++.stl.port
c++.stl.sgi
c++.stlsoft
c++.windows
c++.windows.16-bits
c++.windows.32-bits
c++.wxwindows

digitalmars.empire
digitalmars.DMDScript

D.gnu - [Issue 657] New: version(): ignored

↑ ↓ ← d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=657

           Summary: version(): ignored
           Product: GDC
           Version: unspecified
          Platform: Macintosh
        OS/Version: Mac OS X
            Status: NEW
          Severity: normal
          Priority: P2
         Component: glue layer
        AssignedTo: dvdfrdmn users.sf.net
        ReportedBy: csantander619 gmail.com


This compiles successfully, but I don't think it should.

//---------
void bar ()
{
        foo (); // should fail
}

version(none):
void foo () {}
//---------
$ gdmd -c test.d
//---------


-- 
Dec 06 2006
→ d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=657





------- Comment #1 from afb algonet.se  2006-12-07 08:41 -------
There is an error with that extra colon, after the version:

version(none)
void foo () {}

none.d:3: undefined identifier foo
none.d:3: function expected before (), not foo of type int

version(none)
{
void foo () {}
}

none.d:3: undefined identifier foo
none.d:3: function expected before (), not foo of type int

However, maybe having the colon should be made an error ?


-- 
Dec 07 2006
→ d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=657





------- Comment #2 from csantander619 gmail.com  2006-12-07 08:50 -------
(In reply to comment #1)
 There is an error with that extra colon, after the version:
 
 version(none)
 void foo () {}
 
 none.d:3: undefined identifier foo
 none.d:3: function expected before (), not foo of type int
 
 version(none)
 {
 void foo () {}
 }
 
 none.d:3: undefined identifier foo
 none.d:3: function expected before (), not foo of type int
 
 However, maybe having the colon should be made an error ?
 

I know. This bug is actually very old, but has been ignored: 2004-10-06: http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=2039 2004-12-31: http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=2631 2006-06-20: http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=7625 --
Dec 07 2006