Hi,

cc returns 
xlc seem to returns an output more similar to make
there are several other "compiler" binaries that comes with IBM XL C/C++ 
but none of them seems to give a better result (xlc_r, c99, etc.)

root@aix71tst ==> egrep -v "^#" /tmp/tar.output > /tmp/foo.c
root@aix71tst ==> cc /tmp/foo.c
"/tmp/foo.c", line 2663.1: 1506-485 (S) Parameter declaration list is 
incompatible with declarator for inline.
"/tmp/foo.c", line 2665.1: 1506-276 (S) Syntax error: possible missing 
'{'?
"/tmp/foo.c", line 2668.69: 1506-045 (S) Undeclared identifier s.
"/tmp/foo.c", line 2668.75: 1506-045 (S) Undeclared identifier n.
"/tmp/foo.c", line 2672.1: 1506-485 (S) Parameter declaration list is 
incompatible with declarator for inline.
"/tmp/foo.c", line 2674.1: 1506-276 (S) Syntax error: possible missing 
'{'?
"/tmp/foo.c", line 2677.69: 1506-045 (S) Undeclared identifier s.
"/tmp/foo.c", line 2677.75: 1506-045 (S) Undeclared identifier n.
"/tmp/foo.c", line 2679.20: 1506-045 (S) Undeclared identifier p.
"/tmp/foo.c", line 2683.1: 1506-277 (S) Syntax error: possible missing ';' 
or ','?
"/tmp/foo.c", line 2681.1: 1506-485 (S) Parameter declaration list is 
incompatible with declarator for inline.
"/tmp/foo.c", line 2688.13: 1506-045 (S) Undeclared identifier n.
"/tmp/foo.c", line 2692.32: 1506-045 (S) Undeclared identifier s.
"/tmp/foo.c", line 2696.3: 1506-046 (S) Syntax error.

root@aix71tst ==> xlc /tmp/foo.c
"/tmp/foo.c", line 4966.16: 1506-045 (S) Undeclared identifier 
SYSINT_BUFSIZE.
"/tmp/foo.c", line 4966.15: 1506-1324 (S) Array size must have integer 
type.
"/tmp/foo.c", line 4967.16: 1506-045 (S) Undeclared identifier 
SYSINT_BUFSIZE.
"/tmp/foo.c", line 4967.15: 1506-1324 (S) Array size must have integer 
type.
"/tmp/foo.c", line 5058.17: 1506-045 (S) Undeclared identifier 
SYSINT_BUFSIZE.
"/tmp/foo.c", line 5058.16: 1506-1324 (S) Array size must have integer 
type.


Best regards, and Happy Holidays

Yannick Bergeron
Advisory IT Specialist



From:   Paul Eggert <egg...@cs.ucla.edu>
To:     Yannick Y Bergeron/Bromont/IBM@IBMCA, 
Cc:     bug-tar@gnu.org
Date:   12/24/2013 12:54 PM
Subject:        Re: [Bug-tar] tar 1.27.1 compile error on AIX 7.1 TL2 SP3 
and AIX 6.1 TL8 SP3 with IBM XL C/C++



yaber...@ca.ibm.com wrote:
> tar.output is kinda big, and so is the enum to get the SYSINT_BUFSIZE 
> value...

True, but SYSINT_BUFSIZE is being declared.
And it's being used on the next line
(line 4602 of tar-1.output).

So why is SYSINT_BUFSIZE "undeclared" later?  It's
a global identifier; once that's declared,
it should never become undeclared.

Could be a compiler bug.

What happens if you remove every line starting with "#"
from tar-1.output, put the result into a file called
"foo.c", and compile foo.c?  Here's what happens on
my Ubuntu 13.10 host when I run "gcc -c foo.c"
(these warnings may be due to architectural differences).
I don't see a problem with SYSINT_BUFSIZE here.

foo.c: In function ‘append_incremental_renames’:
foo.c:4706:170: warning: cast from pointer to integer of different size 
[-Wpointer-to-int-cast]
   ( (&stk)->temp.tempint = (char *) (0) - (char *) (&stk)->chunk, 
((((&stk)->temp.tempint > 0 && (&stk)->temp.tempint < (&stk)->chunk_limit 
- (char *) (&stk)->chunk)) ? (int) ((&stk)->next_free = 
(&stk)->object_base = (&stk)->temp.tempint + (char *) (&stk)->chunk) : 
(((obstack_free) ((&stk), (&stk)->temp.tempint + (char *) (&stk)->chunk), 
0), 0)));
                       ^
foo.c: In function ‘read_incr_db_2’:
foo.c:4942:180: warning: cast from pointer to integer of different size 
[-Wpointer-to-int-cast]
       ( (&stk)->temp.tempint = (char *) (content) - (char *) 
(&stk)->chunk, ((((&stk)->temp.tempint > 0 && (&stk)->temp.tempint < 
(&stk)->chunk_limit - (char *) (&stk)->chunk)) ? (int) ((&stk)->next_free 
= (&stk)->object_base = (&stk)->temp.tempint + (char *) (&stk)->chunk) : 
(((obstack_free) ((&stk), (&stk)->temp.tempint + (char *) (&stk)->chunk), 
0), 0)));
                                 ^



Reply via email to