#ident query

Barry Clarkson cheekyscamp@yahoo.co.uk
Wed Dec 22 07:39:00 GMT 2004


I'm in the process of porting some code to a Linux
based platform that is using gcc 3.2.2.  I am trying
to enforce ansi C (as near as possible!) but there are
#ident directives within the code for third party
source control. What can I modify within the source
(not ideal) or on the command line to get ansi C and
safely ignore the '#ident' directives (tried

Thanks in advance,


GCC version...

$ gcc -v
Reading specs from
Configured with: ../configure --prefix=/usr
--mandir=/usr/share/man --infodir=/usr/share/info
--enable-shared --enable-threads=posix
--disable-checking --with-system-zlib
--enable-__cxa_atexit --host=i386-redhat-linux
Thread model: posix
gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5)

Command line...

gcc -c -g -ansi -std=c99 -pedantic-errors -Wall
-Wundef -Wshadow -Wunreachable-code -Wno-long-long
-Werror -fno-ident -I../inc -I../proto aps_log_err.c
-o ../obj/aps_log_err.o
aps_log_err.c:31:2: #ident is a GCC extension

Example #ident...

#ident "@(#) SCCS aps_log_err.c 1.7 - 04/10/13

ALL-NEW Yahoo! Messenger - all new features - even more fun! http://uk.messenger.yahoo.com

More information about the Gcc-help mailing list