Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

warning: #ident is an extension of ANSI C

0 views
Skip to first unread message

Jeff Dickens

unread,
Jun 20, 2000, 3:00:00 AM6/20/00
to
Hi. We've been compiling our system on SCO Open Server 5.0.4 for some time.

Recently we moved to version 5.0.5. Now we get warnings like this:

"/usr/include/stdlib.h", line 226: warning: #ident is an extension of ANSI C
"/usr/include/stdlib.h", line 228: warning: #ident is an extension of ANSI C
"/usr/include/stdlib.h", line 230: warning: #ident is an extension of ANSI C
"/usr/include/CC/tinfo.h", line 264: warning: #ident is an extension of ANSI
C
"/usr/include/CC/tinfo.h", line 266: warning: #ident is an extension of ANSI
C

The odd thing is that it seems to indicate there is some directive in
stdlib.h and/or stdlib.h at those line numbers. There aren't. Stdlib.h is
only 227 lines long !

Also none of our code has any line like "#ident". Perhaps the "ident" is a
placeholder for something else ?

I've found that these warnings go away if I use "CC -Xt" for the
"transitional" level of ANSI compliance. But I'd sure like to know what's
going on there.

Anyone know ?

J. L. Schilling

unread,
Jun 20, 2000, 3:00:00 AM6/20/00
to
Jeff Dickens (jdic...@ersi.com.nospam) wrote:

: Recently we moved to version 5.0.5. Now we get warnings like this:

: "/usr/include/stdlib.h", line 226: warning: #ident is an extension of ANSI C

: [...]

This is a "feature" of the cc -w3 option (highest level warnings).
#ident is indeed not part of strict ANSI C, although warning you about
things inside system headers (which you have no control over) is
admittedly not very practical.

To eliminate these warnings, use cc -w2 or less.

--
Jonathan Schilling SCO, Inc. j...@sco.com

Jeff Dickens

unread,
Jun 22, 2000, 3:00:00 AM6/22/00
to
Thanks.

But any idea why it refers to line number beyond the end of the file ?


"J. L. Schilling" <j...@sco.com> wrote in message
news:8iojcc$nfl$1...@hobbes.sco.com...

Geoff Johnson

unread,
Jun 26, 2000, 3:00:00 AM6/26/00
to
Jeff Dickens wrote:
>
> Thanks.
>
> But any idea why it refers to line number beyond the end of the file ?

Does your make file preprocess the source with cpp. Ie is the line
number refering to the preproccessed source line number rather than the
original line numbers.

--

Geoff Johnson

0 new messages