Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #8422

Re: Compiler bug in lcc-win32

From Eric Sosman <esosman@ieee-dot-org.invalid>
Newsgroups comp.lang.c, comp.compilers.lcc
Subject Re: Compiler bug in lcc-win32
Date 2011-07-18 07:32 -0400
Organization A noiseless patient Spider
Message-ID <j015k4$2fo$1@dont-email.me> (permalink)
References (2 earlier) <25745e00-7d1a-46c1-87ac-fcba0a9bfd04@j25g2000vbr.googlegroups.com> <ivv72s$df3$1@dont-email.me> <7cca7deb-9bdc-49b2-93d1-342c0745da36@l18g2000yql.googlegroups.com> <ivvd4m$m3a$1@dont-email.me> <j00pan$74f$1@online.de>

Cross-posted to 2 groups.

Show all headers | View raw


On 7/18/2011 4:02 AM, Joachim Schmitz wrote:
> Eric Sosman wrote:
>> [...]
>> Run the compiler(s) in a conforming mode, and they'll tell you
>> about one instance of U.B. (the diagnostic is required). I don't
>> know about lcc, but gcc will tell you about the other instance, too,
>> if you ask it politely. The instance of implementation-defined
>> behavior has already been brought to your attention. (It occurs
>> to me that there are other instances of I-D behavior in your code,
>> but they're of the extremely far-fetched and nit-picky variety.)
>
> Please tell us more. I did compile it with a 2 usually very strict
> compilers, for C89 and C99 (non of them gcc though) and neither
> complained nor showed the problem the OP described.

gcc -Wall -W -std=c99 testlcc.c
testlcc.c: In function 'main':
testlcc.c:56: warning: pointer targets in passing argument 1 of 
'get_ident' differ in signedness
testlcc.c:16: note: expected 'unsigned char *' but argument is of type 
'char *'
testlcc.c:52: warning: unused parameter 'argc'
testlcc.c:52: warning: unused parameter 'argv'

     To my surprise, gcc did *not* complain about the other instance
of undefined behavior.  I'm surprised; usually it catches that sort
of thing.

-- 
Eric Sosman
esosman@ieee-dot-org.invalid

Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Compiler bug in lcc-win32 tm <thomas.mertes@gmx.at> - 2011-07-17 02:58 -0700
  Re: Compiler bug in lcc-win32 James Kuyper <jameskuyper@verizon.net> - 2011-07-17 08:39 -0400
    Re: Compiler bug in lcc-win32 tm <thomas.mertes@gmx.at> - 2011-07-17 09:46 -0700
      Re: Compiler bug in lcc-win32 Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-07-17 13:44 -0400
        Re: Compiler bug in lcc-win32 tm <thomas.mertes@gmx.at> - 2011-07-17 11:23 -0700
          Re: Compiler bug in lcc-win32 tm <thomas.mertes@gmx.at> - 2011-07-17 11:37 -0700
          Re: Compiler bug in lcc-win32 Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-07-17 15:27 -0400
            Re: Compiler bug in lcc-win32 "Joachim Schmitz" <nospam.jojo@schmitz-digital.de> - 2011-07-18 10:02 +0200
              Re: Compiler bug in lcc-win32 Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-07-18 07:32 -0400
                Re: Compiler bug in lcc-win32 gwowen <gwowen@gmail.com> - 2011-07-18 05:07 -0700
          Re: Compiler bug in lcc-win32 Keith Thompson <kst-u@mib.org> - 2011-07-17 13:19 -0700
            Re: Compiler bug in lcc-win32 glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2011-07-17 20:59 +0000
              Re: Compiler bug in lcc-win32 Keith Thompson <kst-u@mib.org> - 2011-07-17 14:22 -0700
            Re: Compiler bug in lcc-win32 tm <thomas.mertes@gmx.at> - 2011-07-17 14:08 -0700
              Re: Compiler bug in lcc-win32 Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-07-18 20:51 -0400
                Re: Compiler bug in lcc-win32 tm <thomas.mertes@gmx.at> - 2011-07-18 23:46 -0700
                Re: Compiler bug in lcc-win32 Keith Thompson <kst-u@mib.org> - 2011-07-19 08:33 -0700
      Re: Compiler bug in lcc-win32 jacob navia <jacob@spamsink.net> - 2011-07-17 21:04 +0200
        Re: Compiler bug in lcc-win32 tm <thomas.mertes@gmx.at> - 2011-07-17 12:13 -0700
      Re: Compiler bug in lcc-win32 James Kuyper <jameskuyper@verizon.net> - 2011-07-17 16:44 -0400
        Re: Compiler bug in lcc-win32 tm <thomas.mertes@gmx.at> - 2011-07-17 23:48 -0700
          Re: Compiler bug in lcc-win32 gwowen <gwowen@gmail.com> - 2011-07-18 03:46 -0700
            Re: Compiler bug in lcc-win32 "BartC" <bc@freeuk.com> - 2011-07-18 12:07 +0100
          Re: Compiler bug in lcc-win32 James Kuyper <jameskuyper@verizon.net> - 2011-07-18 09:28 -0400
            Re: Compiler bug in lcc-win32 Ben Bacarisse <ben.usenet@bsb.me.uk> - 2011-07-18 14:37 +0100
              Re: Compiler bug in lcc-win32 Keith Thompson <kst-u@mib.org> - 2011-07-18 08:55 -0700
            Re: Compiler bug in lcc-win32 tm <thomas.mertes@gmx.at> - 2011-07-18 07:42 -0700
              Re: Compiler bug in lcc-win32 jacob navia <jacob@spamsink.net> - 2011-07-18 18:45 +0200
              Re: Compiler bug in lcc-win32 James Kuyper <jameskuyper@verizon.net> - 2011-07-19 07:42 -0400
                Re: Compiler bug in lcc-win32 gazelle@shell.xmission.com (Kenny McCormack) - 2011-07-19 11:52 +0000
              Re: Compiler bug in lcc-win32 James Kuyper <jameskuyper@verizon.net> - 2011-07-20 06:26 -0400
                Re: Compiler bug in lcc-win32 Noob <root@127.0.0.1> - 2011-07-20 14:25 +0200

csiph-web