public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: using #ident or #pragma ident
@ 2004-08-11  8:38 Marty Leisner
  0 siblings, 0 replies; 3+ messages in thread
From: Marty Leisner @ 2004-08-11  8:38 UTC (permalink / raw)
  To: gcc-help; +Cc: leisner

Eljay Love-Jensen <eljay@adobe.com> writes  on Mon, 09 Aug 2004 07:08:19 CDT
     > Hi Marty,
     > 
     > Try:
     > #ident "This is an ident"
     > And don't forget the -fident switch on your compile line.
     > 
     > --Eljay


3.3.2 worked, 3.4.0 started to have problems....

3.4.0 gives a parse error:
: leisner@soyata;gcc-3.4.0 -save-temps -s foo.c 
foo.c:1:10: warning: extra tokens at end of #ident directive

marty

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: using #ident or #pragma ident
  2004-08-09 12:06 Marty Leisner
@ 2004-08-09 12:19 ` Eljay Love-Jensen
  0 siblings, 0 replies; 3+ messages in thread
From: Eljay Love-Jensen @ 2004-08-09 12:19 UTC (permalink / raw)
  To: Marty Leisner, gcc-help; +Cc: leisner

Hi Marty,

Try:
#ident "This is an ident"

And don't forget the -fident switch on your compile line.

--Eljay

^ permalink raw reply	[flat|nested] 3+ messages in thread

* using #ident or #pragma ident
@ 2004-08-09 12:06 Marty Leisner
  2004-08-09 12:19 ` Eljay Love-Jensen
  0 siblings, 1 reply; 3+ messages in thread
From: Marty Leisner @ 2004-08-09 12:06 UTC (permalink / raw)
  To: gcc-help; +Cc: leisner


I'm using 3.4.1 on linux

I found documentation on #pragma ident and #ident skimpy -- I tried
to use them and can't have them mark the output files...

Can someone show me an example where these are used?

: leisner@gateway;gcc -v foo.c -save-temps -c
Reading specs from /usr/gnu/lib/gcc/i686-pc-linux-gnu/3.4.1/specs
Configured with: /usr/local/src/gnu/gcc-3.4.1/configure --prefix=/usr/gnu 
--prog
ram-suffix=-3.4.1 --enable-shared --enable-__cxa_atexit --with-system-zlib 
--ena
ble-threads=posix --disable-checking
Thread model: posix
gcc version 3.4.1
 /usr/gnu/libexec/gcc/i686-pc-linux-gnu/3.4.1/cc1 -E -quiet -v foo.c 
-mtune=pent
iumpro -o foo.i
ignoring nonexistent directory "/usr/gnu/lib/gcc/i686-pc-linux-gnu/3.4.1/../../
.
./../i686-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /usr/gnu/include
 /usr/gnu/lib/gcc/i686-pc-linux-gnu/3.4.1/include
 /usr/include
End of search list.
 /usr/gnu/libexec/gcc/i686-pc-linux-gnu/3.4.1/cc1 -fpreprocessed foo.i -quiet 
-d
umpbase foo.c -mtune=pentiumpro -auxbase foo -version -o foo.s
GNU C version 3.4.1 (i686-pc-linux-gnu)
        compiled by GNU C version 3.4.1.
GGC heuristics: --param ggc-min-expand=72 --param ggc-min-heapsize=80392
foo.c:1:10: warning: extra tokens at end of #ident directive
 /usr/gnu/lib/gcc/i686-pc-linux-gnu/3.4.1/../../../../i686-pc-linux-gnu/bin/as 
-
V -Qy -o foo.o foo.s
GNU assembler version 2.15 (i686-pc-linux-gnu) using BFD version 2.15

: leisner@gateway;cat foo.c
#ident "this is an ident"
#pragma ident "this is a pragma"

main()
{
}
: leisner@gateway;cat foo.i
# 1 "foo.c"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "foo.c"
#ident ""this is an ident""
#pragma ident "this is a pragma"

main()
{
}
: leisner@gateway;cat foo.s
        .file   "foo.c"
        .ident  ""
        .text
.globl main
        .type   main, @function
main:
        pushl   %ebp
        movl    %esp, %ebp
        subl    $8, %esp
        andl    $-16, %esp
        movl    $0, %eax
        addl    $15, %eax
        addl    $15, %eax
        shrl    $4, %eax
        sall    $4, %eax
        subl    %eax, %esp
        leave
        ret
        .size   main, .-main
        .section        .note.GNU-stack,"",@progbits
        .ident  "GCC: (GNU) 3.4.1"

marty


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-08-11  1:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-11  8:38 using #ident or #pragma ident Marty Leisner
  -- strict thread matches above, loose matches on Subject: below --
2004-08-09 12:06 Marty Leisner
2004-08-09 12:19 ` Eljay Love-Jensen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).