www.digitalmars.com         C & C++   DMDScript  

c++ - Bug: sc.ini CFLAGS macro name length - Examples.txt

Description: If CFLAGS="-DMACRO_NAME=" is used in dm\bin\sc.ini; problems occur
when the macro name length is 44-46, 50, or 51 characters.  Nope, I didn't test
all cases of 1-1024 character lengths.  I just got, er, lucky with a macro name
that caused me to look a tad further.

Expected results:  Using CFLAGS="-Dmacro=" should be the same as setting the
macro from the command line.
E.g. This command works fine:  dmc -v2
-DMACRO_NAME_THATS_44_CHARACTERS_XXXXXXXXXXXXX= test.cpp
See \dm\html\ctg\ctgLanguageImplementation.html#cpp_language, under the heading
"Internal Limits"
\dm\html\ctg\smake.html, under the heading "Defining Macros"
The above 2 docs are not _exactly_ concerning dmc.exe; but I'll make reference
to them none the less.

How to replicate:

1. In sc.ini, set CFLAGS="-DMACRO_NAME_THATS_44_CHARACTERS_XXXXXXXXXXXXX="
2. dmc -v2 test.cpp

OS: XP w/ sp 2
Compiler: Digital Mars CD v 8.42, with cd843.zip

Apologia if this turns out to be user misunderstanding.


begin 0644 Examples.txt


M+F-P<`T*<V-P<&X +41-04-23U].04U%7U1(05137S0T7T-(05)!0U1%4E-?
M6%A86%A86%A86%A86#T +78R(&QI8 T*1&EG:71A;"!-87)S($,O0RLK($-O


M96X 8GD 5V%L=&5R($)R:6=H=`T*=W=W+F1I9VET86QM87)S+F-O;0T*1F%T
M86P 97)R;W(Z('5N86)L92!T;R!O<&5N(&EN<'5T(&9I;&4 )VQI8B<-" T*

M7S0V7T-(05)!0U1%4E-?6%A86%A86%A86%A86%A8/2(-" T*/F1M8R`M=C( 

M15)37UA86%A86%A86%A86%A86#T +78R(&(-"BXN+B!%>'1R82!L:6YE<R!R
M96UO=F5D("XN+ T*1F%T86P 97)R;W(Z('5N86)L92!T;R!O<&5N(&EN<'5T



M05137S0W7T-(05)!0U1%4E-?6%A86%A86%A86%A86%A86#T +78R('1E<W0N


M($-&3$%'4STB+41-04-23U].04U%7U1(05137S4Q7T-(05)!0U1%4E-?,C,T
M-38W.#ED
M<&X +41-04-23U].04U%7U1(05137S4Q7T-(05)!0U1%4E-?,C,T-38W.#ED


+92`G.#EE
`
end
May 13 2005