www.digitalmars.com         C & C++   DMDScript  

D.gnu - BUG: dmd->gdc wrapper / compiling HTML sources

reply Thomas Kuehne <thomas-dloop kuehne.thisisspam.cn> writes:
There seem to be a bug in the wrapper.

Note: you have to apply at least the first patch I send earlier today to
this list, otherwise other bugs will hide this one.

Source file: http://svn.kuehne.cn/dstress/nocompile/html_entity_10.html

correct:
# > gdc -c html_entity_10.html ; echo $?
# html_entity_10.html:3: HTML Error: invalid numeric character reference
# 1

bug:
# > dmd -c html_entity_10.html ; echo $?
# 0

Thomas
Nov 18 2004
parent reply David Friedman <d3rdclsmail_a t_earthlink_d.t_net> writes:
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Thomas Kuehne wrote:
 There seem to be a bug in the wrapper.
 
 Note: you have to apply at least the first patch I send earlier today to
 this list, otherwise other bugs will hide this one.
 
 Source file: http://svn.kuehne.cn/dstress/nocompile/html_entity_10.html
 
 correct:
 # > gdc -c html_entity_10.html ; echo $?
 # html_entity_10.html:3: HTML Error: invalid numeric character reference
 # 1
 
 bug:
 # > dmd -c html_entity_10.html ; echo $?
 # 0
 
 Thomas

The wrapper did not recognize '.html' files as _source_ files. Patch for this and some other bugs is attached. David
Nov 18 2004
parent Thomas Kuehne <thomas-dloop kuehne.thisisspam.cn> writes:
David Friedman schrieb am Thu, 18 Nov 2004 09:05:30 -0500:
 The wrapper did not recognize '.html' files as _source_ files.  Patch 
 for this and some other bugs is attached.

 David

Thanks David, it's working like a charm. But an other problem occurred: dmd only returns 0(success) or 1(failure). Your patched script can "die" with a random return value. # > dmd -version123 test.d ; echo $? # unrecognized switch '-version123' at /tmp/svn.kuehne.cn/dstress/dmd line 95. # 9 Thomas
Nov 18 2004