James Carlson <[EMAIL PROTECTED]> wrote:

> Joerg Schilling writes:
> > Thank you... but could you explain why:
> > 
> > #pragma ident "xxx <tab> yyy" is requiered?
> > 
> > #pragma ident is not accepted by GCC and Sun C converts "xxx <tab> yyy"
> > to "xxx \t yyy" which causes what(1) to stop output after "xxx ".
>
> I'm not sure what you're talking about here, as most things produced
> in ON have the release info inserted.  But I'll defer.

If you don't know what I am talking about, I did compile a file
with

#pragma ident   "%Z%%M% %I% %E% Copyright 2007 J. Schilling"

using gcc -Wall:

s.c:1: warning: ignoring #pragma ident

Now I use this file:

#pragma ident   "@(#)s.c        1.1 07/01/14 Copyright 2007 J. Schilling"

and compile with cc -c

If you then check what s.o, you get:

s.o:
        s.c     1.1 07/01/14 Copyright 2007 J. Schilling

Now I compile the same file using the optimizer.....

and here you get:

s.o:
        s.c

With the first case, mcs -p s.o:

s.o:

@(#)s.c 1.2 07/01/14 Copyright 2007 J. Schilling

With cc -c -O, you get:

s.o:

@(#)s.c\t1.2 07/01/14 Copyright 2007 J. Schilling

Do you see the \t instead of a TAB?

what(1) stops printing a "@(#)... string at '"', '\\', '>', and '\n'.

We either need to think about using tab chars in ID strings or
call this a compiler bug that needs fixing.

Jörg

-- 
 EMail:[EMAIL PROTECTED] (home) Jörg Schilling D-13353 Berlin
       [EMAIL PROTECTED]                (uni)  
       [EMAIL PROTECTED]     (work) Blog: http://schily.blogspot.com/
 URL:  http://cdrecord.berlios.de/old/private/ ftp://ftp.berlios.de/pub/schily
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to