www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - Same Bug in dmd v0.94 as it was in v0.93

reply David L. Davis <SpottedTiger yahoo.com> writes:
The 'D' code below was compiling and linking just fine in dmd v0.92, but now
with v0.93 and now v0.94 I'm getting a linker error:

<Linker error msg>

C:\dmd>bin\dmd ex1\main_roman.d ex1\roman.d
C:\dmd\bin\..\..\dm\bin\link.exe main_roman+roman,,,user32+kernel32/noi;
OPTLINK (R) for Win32  Release 7.50B1
Copyright (C) Digital Mars 1989 - 2001  All Rights Reserved

roman.obj(roman)  Offset 00148H Record Type 0091
Error 1: Previous Definition Different : _D5roman7isroman5ROMANAa
--- errorlevel 1

</Linker error msg>

Once I move the "const char[] ROMAN = "IVXLCDMivxlcdm";" line out of both of the
isroman() functions and to the top of the code, everything then compiles and
links nicely again within dmd v0.93 and now v0.94. Walter has already agreed
that this is a bug, so I placing it here. 

# // ** roman.d **
#
# import std.string;
#
# //const char[] ROMAN = "IVXLCDMivxlcdm";
#
# /************************************************
#  * Function      : bool isroman( in char )
#  * Created Date  : 03.Jun.04 
#  * Modified Date : (none)
#  * Requirements  : std.string
#  ************************************************
#  *
#  * Note: Needs std.string for the find() function.
#  */ 
# bool isroman
# (
#     in char cChar
# )
# {
#     const char[] ROMAN = "IVXLCDMivxlcdm";
#       
#     return ( find( ROMAN, cast(char)cChar ) != -1 ) ? true : false;
#
# } // end bool isroman( in char )
#
# /************************************************
#  * Function      : bool isroman( in char[] )
#  * Created Date  : 03.Jun.04 
#  * Modified Date : (none)
#  * Requirements  : std.string
#  ************************************************
#  *
#  * Note: Needs std.string for the find() function.
#  */ 
# bool isroman
# (
#     in char[] sStr
# )
# {
#     const char[] ROMAN = "IVXLCDMivxlcdm";
#      
#     foreach( int iStrPos, char cChar; sStr )
#     {
#         if ( find( ROMAN, cast(char)cChar ) == -1 ) return false;
#     } 
#      
#     return true;
#        
# } // end bool isroman( in char[] )


# // ** main_roman.d **
#
# import std.c.stdio;
#
# import roman;
#
# int main()
# {
#
#     printf( "isroman(\'M\')=%d\n", isroman( 'M' ) );
#     printf( "isroman(\"MMLV\")=%d\n", isroman( "MMLV" ) );
#    
#     return 0;
#    
# } // end int main()

-------------------------------------------------------------------
"Dare to reach for the Stars...Dare to Dream, Build, and Achieve!"
Jun 27 2004
parent reply Regan Heath <regan netwin.co.nz> writes:
I am not sure whether you realised this, or maybe it's a bug on my end, 
but I just got 3 copies of this message by you, dated:

Date: Sun, 27 Jun 2004 23:03:11 +0000 (UTC)
Date: Sun, 27 Jun 2004 23:03:15 +0000 (UTC)
Date: Sun, 27 Jun 2004 23:03:19 +0000 (UTC)

Regan.

On Sun, 27 Jun 2004 23:03:19 +0000 (UTC), David L. Davis 
<SpottedTiger yahoo.com> wrote:

 The 'D' code below was compiling and linking just fine in dmd v0.92, but 
 now
 with v0.93 and now v0.94 I'm getting a linker error:

 <Linker error msg>

 C:\dmd>bin\dmd ex1\main_roman.d ex1\roman.d
 C:\dmd\bin\..\..\dm\bin\link.exe main_roman+roman,,,user32+kernel32/noi;
 OPTLINK (R) for Win32  Release 7.50B1
 Copyright (C) Digital Mars 1989 - 2001  All Rights Reserved

 roman.obj(roman)  Offset 00148H Record Type 0091
 Error 1: Previous Definition Different : _D5roman7isroman5ROMANAa
 --- errorlevel 1

 </Linker error msg>

 Once I move the "const char[] ROMAN = "IVXLCDMivxlcdm";" line out of 
 both of the
 isroman() functions and to the top of the code, everything then compiles 
 and
 links nicely again within dmd v0.93 and now v0.94. Walter has already 
 agreed
 that this is a bug, so I placing it here.

 # // ** roman.d **
 #
 # import std.string;
 #
 # //const char[] ROMAN = "IVXLCDMivxlcdm";
 #
 # /************************************************
 #  * Function      : bool isroman( in char )
 #  * Created Date  : 03.Jun.04
 #  * Modified Date : (none)
 #  * Requirements  : std.string
 #  ************************************************
 #  *
 #  * Note: Needs std.string for the find() function.
 #  */
 # bool isroman
 # (
 #     in char cChar
 # )
 # {
 #     const char[] ROMAN = "IVXLCDMivxlcdm";
 #
 #     return ( find( ROMAN, cast(char)cChar ) != -1 ) ? true : false;
 #
 # } // end bool isroman( in char )
 #
 # /************************************************
 #  * Function      : bool isroman( in char[] )
 #  * Created Date  : 03.Jun.04
 #  * Modified Date : (none)
 #  * Requirements  : std.string
 #  ************************************************
 #  *
 #  * Note: Needs std.string for the find() function.
 #  */
 # bool isroman
 # (
 #     in char[] sStr
 # )
 # {
 #     const char[] ROMAN = "IVXLCDMivxlcdm";
 #
 #     foreach( int iStrPos, char cChar; sStr )
 #     {
 #         if ( find( ROMAN, cast(char)cChar ) == -1 ) return false;
 #     }
 #
 #     return true;
 #
 # } // end bool isroman( in char[] )


 # // ** main_roman.d **
 #
 # import std.c.stdio;
 #
 # import roman;
 #
 # int main()
 # {
 #
 #     printf( "isroman(\'M\')=%d\n", isroman( 'M' ) );
 #     printf( "isroman(\"MMLV\")=%d\n", isroman( "MMLV" ) );
 #
 #     return 0;
 #
 # } // end int main()

 -------------------------------------------------------------------
 "Dare to reach for the Stars...Dare to Dream, Build, and Achieve!"

-- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
Jun 27 2004
parent reply David L. Davis <SpottedTiger yahoo.com> writes:
Regan Heath: Sorry about that...I made the mistake of clicking on IE's "Refresh
icon" twice. :( Is it possible to delete the other two copies?

Again, sorry!

David

In article <opr991lydn5a2sq9 digitalmars.com>, Regan Heath says...
I am not sure whether you realised this, or maybe it's a bug on my end, 
but I just got 3 copies of this message by you, dated:

Date: Sun, 27 Jun 2004 23:03:11 +0000 (UTC)
Date: Sun, 27 Jun 2004 23:03:15 +0000 (UTC)
Date: Sun, 27 Jun 2004 23:03:19 +0000 (UTC)

Regan.

On Sun, 27 Jun 2004 23:03:19 +0000 (UTC), David L. Davis 
<SpottedTiger yahoo.com> wrote:

 The 'D' code below was compiling and linking just fine in dmd v0.92, but 
 now
 with v0.93 and now v0.94 I'm getting a linker error:

 <Linker error msg>

 C:\dmd>bin\dmd ex1\main_roman.d ex1\roman.d
 C:\dmd\bin\..\..\dm\bin\link.exe main_roman+roman,,,user32+kernel32/noi;
 OPTLINK (R) for Win32  Release 7.50B1
 Copyright (C) Digital Mars 1989 - 2001  All Rights Reserved

 roman.obj(roman)  Offset 00148H Record Type 0091
 Error 1: Previous Definition Different : _D5roman7isroman5ROMANAa
 --- errorlevel 1

 </Linker error msg>

 Once I move the "const char[] ROMAN = "IVXLCDMivxlcdm";" line out of 
 both of the
 isroman() functions and to the top of the code, everything then compiles 
 and
 links nicely again within dmd v0.93 and now v0.94. Walter has already 
 agreed
 that this is a bug, so I placing it here.

 # // ** roman.d **
 #
 # import std.string;
 #
 # //const char[] ROMAN = "IVXLCDMivxlcdm";
 #
 # /************************************************
 #  * Function      : bool isroman( in char )
 #  * Created Date  : 03.Jun.04
 #  * Modified Date : (none)
 #  * Requirements  : std.string
 #  ************************************************
 #  *
 #  * Note: Needs std.string for the find() function.
 #  */
 # bool isroman
 # (
 #     in char cChar
 # )
 # {
 #     const char[] ROMAN = "IVXLCDMivxlcdm";
 #
 #     return ( find( ROMAN, cast(char)cChar ) != -1 ) ? true : false;
 #
 # } // end bool isroman( in char )
 #
 # /************************************************
 #  * Function      : bool isroman( in char[] )
 #  * Created Date  : 03.Jun.04
 #  * Modified Date : (none)
 #  * Requirements  : std.string
 #  ************************************************
 #  *
 #  * Note: Needs std.string for the find() function.
 #  */
 # bool isroman
 # (
 #     in char[] sStr
 # )
 # {
 #     const char[] ROMAN = "IVXLCDMivxlcdm";
 #
 #     foreach( int iStrPos, char cChar; sStr )
 #     {
 #         if ( find( ROMAN, cast(char)cChar ) == -1 ) return false;
 #     }
 #
 #     return true;
 #
 # } // end bool isroman( in char[] )


 # // ** main_roman.d **
 #
 # import std.c.stdio;
 #
 # import roman;
 #
 # int main()
 # {
 #
 #     printf( "isroman(\'M\')=%d\n", isroman( 'M' ) );
 #     printf( "isroman(\"MMLV\")=%d\n", isroman( "MMLV" ) );
 #
 #     return 0;
 #
 # } // end int main()

 -------------------------------------------------------------------
 "Dare to reach for the Stars...Dare to Dream, Build, and Achieve!"

-- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

------------------------------------------------------------------- "Dare to reach for the Stars...Dare to Dream, Build, and Achieve!"
Jun 27 2004
parent J C Calvarese <jcc7 cox.net> writes:
David L. Davis wrote:
 Regan Heath: Sorry about that...I made the mistake of clicking on IE's "Refresh
 icon" twice. :( Is it possible to delete the other two copies?

If you were using a newsreader (such as Thunderbird or Outlook) you should be able to delete your own message by clicking on "Cancel" when the message is highlighed. But since it was posted using the web interface, I think we're stuck with them. Don't worry about it. We all make mistakes. :)
 
 Again, sorry!
 
 David
 
 In article <opr991lydn5a2sq9 digitalmars.com>, Regan Heath says...
 
I am not sure whether you realised this, or maybe it's a bug on my end, 
but I just got 3 copies of this message by you, dated:

Date: Sun, 27 Jun 2004 23:03:11 +0000 (UTC)
Date: Sun, 27 Jun 2004 23:03:15 +0000 (UTC)
Date: Sun, 27 Jun 2004 23:03:19 +0000 (UTC)

Regan.

On Sun, 27 Jun 2004 23:03:19 +0000 (UTC), David L. Davis 
<SpottedTiger yahoo.com> wrote:


The 'D' code below was compiling and linking just fine in dmd v0.92, but 
now
with v0.93 and now v0.94 I'm getting a linker error:

<Linker error msg>

C:\dmd>bin\dmd ex1\main_roman.d ex1\roman.d
C:\dmd\bin\..\..\dm\bin\link.exe main_roman+roman,,,user32+kernel32/noi;
OPTLINK (R) for Win32  Release 7.50B1
Copyright (C) Digital Mars 1989 - 2001  All Rights Reserved

roman.obj(roman)  Offset 00148H Record Type 0091
Error 1: Previous Definition Different : _D5roman7isroman5ROMANAa
--- errorlevel 1

</Linker error msg>

Once I move the "const char[] ROMAN = "IVXLCDMivxlcdm";" line out of 
both of the
isroman() functions and to the top of the code, everything then compiles 
and
links nicely again within dmd v0.93 and now v0.94. Walter has already 
agreed
that this is a bug, so I placing it here.

# // ** roman.d **
#
# import std.string;
#
# //const char[] ROMAN = "IVXLCDMivxlcdm";
#
# /************************************************
#  * Function      : bool isroman( in char )
#  * Created Date  : 03.Jun.04
#  * Modified Date : (none)
#  * Requirements  : std.string
#  ************************************************
#  *
#  * Note: Needs std.string for the find() function.
#  */
# bool isroman
# (
#     in char cChar
# )
# {
#     const char[] ROMAN = "IVXLCDMivxlcdm";
#
#     return ( find( ROMAN, cast(char)cChar ) != -1 ) ? true : false;
#
# } // end bool isroman( in char )
#
# /************************************************
#  * Function      : bool isroman( in char[] )
#  * Created Date  : 03.Jun.04
#  * Modified Date : (none)
#  * Requirements  : std.string
#  ************************************************
#  *
#  * Note: Needs std.string for the find() function.
#  */
# bool isroman
# (
#     in char[] sStr
# )
# {
#     const char[] ROMAN = "IVXLCDMivxlcdm";
#
#     foreach( int iStrPos, char cChar; sStr )
#     {
#         if ( find( ROMAN, cast(char)cChar ) == -1 ) return false;
#     }
#
#     return true;
#
# } // end bool isroman( in char[] )


# // ** main_roman.d **
#
# import std.c.stdio;
#
# import roman;
#
# int main()
# {
#
#     printf( "isroman(\'M\')=%d\n", isroman( 'M' ) );
#     printf( "isroman(\"MMLV\")=%d\n", isroman( "MMLV" ) );
#
#     return 0;
#
# } // end int main()

-------------------------------------------------------------------
"Dare to reach for the Stars...Dare to Dream, Build, and Achieve!"

-- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

------------------------------------------------------------------- "Dare to reach for the Stars...Dare to Dream, Build, and Achieve!"

-- Justin (a/k/a jcc7) http://jcc_7.tripod.com/d/
Jun 27 2004