delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/04/20/05:15:42

From: brianp AT ic DOT owatonna DOT mn DOT us (Brian Peterson)
Newsgroups: comp.os.msdos.djgpp
Subject: Compiler bug or am I just really stupid?
Date: 19 Apr 1997 03:34:38 GMT
Organization: Internet Connections
Lines: 36
Message-ID: <5j9ege$no@oak.Internet-Connections.net>
NNTP-Posting-Host: s7.ic.owatonna.mn.us
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

I have encountered what SEEMS to be a compiler bug. I know that this is
incredibly unlikely, however, so maybe it's just a fluke, but none the less,
I need your help.

I've been writing an RPG construction kit called VERGE for a while. (you
can check it out at http://www.inlink.com/~vecna/crs.html) I use a C-like
script language (VergeC :D) to control the events and flow of each maps,
and those scripts are precompiled into a sort of Pcode and tacked onto the
end of a MAP file. Lately, some strange things have been happening with that
script language.

Well, to make a long story short, I looked at the "compiled" code in a
hex editor, and after about a week of searching for some determinable pattern,
I have concluded that every time a byte 10 is produced, a 13 is tacked
before it, which throws off the code offsets.

It hardly seems a coincidence that 13,10 is the CR/LF sequence, and it seems
vaguely possible that perhaps DJGPP could've been modified from GCC to
"fix" the output of 10s to be 13,10s to be proper on MSDOS systems, since
UNIX systems are different, to make porting easier? (In this case, it would
be more of a design flaw than a bug) I'm probably dead wrong since I
know little of the internals of GCC, but I've searched my code top to bottom
and can find nothing responsible for the outputting of these extraneous bytes.
If so, is this known about? Is there a magical switch I can use to turn it
off?

I'm really desperate here. :) There are a fair amount of people interesting
in my project, and this bug is a major hinderance. I can post and/or
email the VCC source to someone/anyone, if so desired, it's fairly small.
Your help is immensely appreciated. Thanks in advance,
 - vecna

(BTW, send any email replies to vecna AT inlink DOT com, not this address - I can
never seem to get any usenet access to work from my account, so I had to
beg for help from a friend :)

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019