www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Confirming if I've found a bug or not 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 I getting a linker error:

<Linker error msg>

propercase.obj(propercase) offset 00373H Record Type 0091
Error 1: Previous Definition Different:
_D3etc6nonstd5utils10propercase7isroman5ROMANAa
--- errorlevel 1

</Linker error msg>

Once I move the "const char[] ROMAN = "IVXLCDMivxlcdm";" line out of both of the
isroman() functions, everything then compiles and links nicely again with the
new dmd v0.93. Question, was I doing something wrong before under dmd v0.92? Or
is this a new bug that I should report?

# /************************************************
#  * 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[] )

-------------------------------------------------------------------
"Dare to reach for the Stars...Dare to Dream, Build, and Achieve!"
Jun 23 2004
parent "Walter" <newshound digitalmars.com> writes:
Yeah, it's a bug. Sigh.

"David L. Davis" <SpottedTiger yahoo.com> wrote in message
news:cbcf1b$s0g$1 digitaldaemon.com...
 The 'D' code below was compiling and linking just fine in dmd v0.92, but

 with v0.93 I getting a linker error:

 <Linker error msg>

 propercase.obj(propercase) offset 00373H Record Type 0091
 Error 1: Previous Definition Different:
 _D3etc6nonstd5utils10propercase7isroman5ROMANAa
 --- errorlevel 1

 </Linker error msg>

 Once I move the "const char[] ROMAN = "IVXLCDMivxlcdm";" line out of both

 isroman() functions, everything then compiles and links nicely again with

 new dmd v0.93. Question, was I doing something wrong before under dmd

 is this a new bug that I should report?

 # /************************************************
 #  * 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[] )

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

Jun 23 2004