delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2003/07/29/08:40:53

From: "News Reader" <nospam AT aol DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: integer overflow
Date: Tue, 29 Jul 2003 11:41:11 +0200
Organization: UTA/netway (Customer)
Lines: 68
Message-ID: <bg5fkn$vtn$1@newsreader1.netway.at>
References: <3F246120 DOT 63C3753C AT worldnet DOT att DOT net> <Z6_Ua.375$%S6 DOT 105 AT newsread1 DOT news DOT atl DOT earthlink DOT net> <3F24AA4B DOT 589D3482 AT worldnet DOT att DOT net> <bg3d1h$d30$1 AT newsreader1 DOT netway DOT at> <7458-Mon28Jul2003184701+0300-eliz AT elta DOT co DOT il> <bg4dkh$8er$1 AT newsreader1 DOT netway DOT at> <uoezd3kqs DOT fsf AT elta DOT co DOT il>
NNTP-Posting-Host: pat-ei.lucent.wellcom.at
X-Trace: newsreader1.netway.at 1059471831 32695 195.230.174.18 (29 Jul 2003 09:43:51 GMT)
X-Complaints-To: abuse AT netway DOT at
NNTP-Posting-Date: 29 Jul 2003 09:43:51 GMT
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Thanks for your explanations and sorry for
using probably too "egocentric" wording.



"Eli Zaretskii" <eliz AT elta DOT co DOT il> wrote in message
news:uoezd3kqs DOT fsf AT elta DOT co DOT il...
> > From: "News Reader" <nospam AT aol DOT com>
> > Newsgroups: comp.os.msdos.djgpp
> > Date: Tue, 29 Jul 2003 02:00:54 +0200
> >
> > Being human and therefore being prone to making mistakes
> > from time to time, I will not allow any of my programs to run
> > if the compiler output produces a single warning as a matter
> > of principle.
>
> That's fine, but it's not really an issue here, although it sounds
> like you were mistaken to think it was (or else failed to make it
> clear what did ``won't work'' mean).
>
> > Compilation of your code produces the following output:
> >
> >    x.c: In function `main':
> >    x.c:7: warning: unknown conversion type character `U' in format
> >    x.c:7: warning: too many arguments for format
>
> Right, I also saw those messages under -Wall, and I expect to see
> them, as GCC doesn't know about %U.
>
> > Therefore %U won't work (for me). The same applies to
> > %D and %O although even here program outputs appear
> > to be correct.
>
> You see, this is why it's important to explain what does it mean
> ``won't work'': your definition of that might be perfectly correct
> and clear for you, but not for others, nor, as it happens to be, is
> it correct objectively.  The program does work and produces the
> correct results, while using -Wall is optional and is not required to
> compile a valid program.  (In fact, some prominent programmers, such
> as Richard Stallman, are opposed to using -Wall in principle, because
> it sometimes flags perfectly valid code.  I do use -Wall as a matter
> of routine, btw.)
>
> > I am well aware of the differences between signed and unsigned,
> > thanks, I was just cutting into this thread to get the %U mystery
> > solved.
>
> I hope it is solved now.  If not, please ask more questions.
>
> > (Still wondering why %U was ever documented if it is non-standard
> > and produces warnings?)
>
> Because DJGPP wants to be compatible to old DOS compilers, like
> Borland's one and the old MSC.
>
> Note that your original message said ``why is %U documented if it
> doesn't work'', which is quite a different story.  If your wording was
> as above to begin with, it would have saved me quite some time that I
> wasted to (1) look at the library sources in search of a possible bug,
> (2) write a test program to see if %U really worked like the sources
> seem to claim, and (3) post a message that explained in so many words
> what I thought might be the source of your confusion.  Instead of all
> that, I could simply tell you about the compatibility issue, and
> that's all.
>


- Raw text -


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