delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2011/05/23/03:00:21

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
From: Jim Michaels <jmichae3 AT yahoo DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: issue with 4.5.3 beta, 4.5.2 beta
Date: Sun, 22 May 2011 23:49:22 -0700 (PDT)
Organization: http://groups.google.com
Lines: 68
Message-ID: <4cb26d54-1e44-4416-9382-5b84b976fb22@q14g2000prh.googlegroups.com>
References: <1b5aeeeb-ffaa-42ce-88c4-ec8773bcceef AT j13g2000pro DOT googlegroups DOT com>
<4DD9EDE0 DOT 3040904 AT iki DOT fi>
NNTP-Posting-Host: 24.22.56.37
Mime-Version: 1.0
X-Trace: posting.google.com 1306133363 10234 127.0.0.1 (23 May 2011 06:49:23 GMT)
X-Complaints-To: groups-abuse AT google DOT com
NNTP-Posting-Date: Mon, 23 May 2011 06:49:23 +0000 (UTC)
Complaints-To: groups-abuse AT google DOT com
Injection-Info: q14g2000prh.googlegroups.com; posting-host=24.22.56.37; posting-account=05hOMwoAAAB6R8xtiQKzEljSMzgOhVF1
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows NT 5.1; rv:2.0.1) Gecko/20100101 Firefox/4.0.1,gzip(gfe)
Bytes: 4055
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

On May 22, 10:17=A0pm, Andris Pavenis <andris DOT pave DOT  DOT  DOT  AT iki DOT fi> wrote:
> On 05/23/2011 07:30 AM, Jim Michaels wrote:
>
> > I have a program and small library that I recently worked the bugs out
> > of to my best understanding.
> > I included a lot of debug output using #if defined(_DEBUG).
> > that debug ouput is flushed at every instance.
> > the library output shows with -g compiler switch, but not without.
> > the main program's debug output always shows.
>
> > can someone explain this? =A0I have the #define on in both the library
> > file and the main source and the header file.
> > I think I am running into a compiler bug.
>
> Most often (but not always) compiler is not the reason of problems.
>
> > and this doesn't happen with mingw-w64 (a gnu compiler for windows).
>
> There could be some hidden bugs that only appear in one environment
> (for example due to cleaning or not cleaning memory content on malloc()).
>
> I suggest to try to compile using GCC command line parameters:
> =A0 =A0 -O2 -Wall -Wextra -Werror
> (at -O0 not all warnings are generated) and eliminate all warnings,
> which would with these parameters treated as errors. From my experience:
> it is rather common to get written application crash at the begin
> if these parameters are forgotten while development. Adding them often
> reveals then the reason of crash).
>
> You can also try other GCC version for DJGPP
>
> Andris

buildnum.cpp:26:8: warning: unused parameter '_argument'
buildnum.cpp: In function 'int main(int, char**)':
buildnum.cpp:362:12: warning: unused variable 'llin'
atoi64.cpp: In function 'uint64_t atou64_(const char*)':
atoi64.cpp:904:33: warning: comparison between signed and unsigned
integer expressions
atoi64.cpp:924:33: warning: comparison between signed and unsigned
integer expressions
atoi64.cpp:944:33: warning: comparison between signed and unsigned
integer expressions
atoi64.cpp:964:33: warning: comparison between signed and unsigned
integer expressions

your suggestion doesn't work for me (-Werror).  also, I have already
used free() on the string that I allocated at the beginning of the
function.

I was incorrect about one thing.
-s or -g alone causes SIGILL and SIGSEGV in 4.5.2 beta and 4.5.3
beta.  only thing that works is adding -fstack-check.
I had the -fstack-check in my compiler wrapper batch file for both
djgpp and mingw-w64.
unlike mingw-w64, with <tr1/stdint.h> I do not have to use -lstdc++,
but the problem was fixed when I did.
are there any shared libraries I must include with my files to use stdc
++?

1. I should not have to do a stack check.  I did not have to with
mingw-w64.
2. I should not have to do -lstdc++, I did not have to with mingw-w64,
but this is really implementation-dependent.  all stdint.h is is a
series of header filles I assume.



- Raw text -


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