xlc compiler options versus gcc


 
Thread Tools Search this Thread
Operating Systems AIX xlc compiler options versus gcc
# 1  
Old 01-14-2011
xlc compiler options versus gcc

Hi all,

I would like to compile a program and get current errors and warnings report to me as « gcc -Wall ».

Does someone can give me these options to get an equivalent ?
Or the ommon option used to put them in a CFLAGS in a Makefile.

Something like :
Code:
xlc -O2 -Wall my_prog.c -o my_prog

Thanks,

-Dominique
# 2  
Old 01-14-2011
I believe the option "-qinfo=all" enables more verbose warnings.
# 3  
Old 01-14-2011
have you consulted the xlc documentation or use the help option?
# 4  
Old 01-19-2011
Yes, I've already look at the manual.

There are a lot of compiling options, and no global option for a "usefull" compilation Smilie

And with
Code:
-qinfo=all

I get a big list (more than 3000 lines!) of warning concerning headers in /usr/include/ directory like this : Smilie
Quote:
...
"/usr/include/unistd.h", line 950.2: 1506-456 (I) Stop skipping tokens.
"/usr/include/unistd.h", line 952.2: 1506-460 (I) endif nesting level is 1.
"manager02.c", line 8: 1506-733 (I) Processing #include file /usr/include/errno.h.
"/usr/include/errno.h", line 35.2: 1506-460 (I) ifndef nesting level is 1.
"/usr/include/errno.h", line 35.2: 1506-454 (I) ifndef condition evaluates to 1.
"/usr/include/errno.h", line 37.23: 1506-457 (I) File /usr/include/standards.h has already been included.
"/usr/include/errno.h", line 37: 1506-530 (I) Header /usr/include/standards.h not included again because it would have no effect due to conditional compilation.
"/usr/include/errno.h", line 48.2: 1506-460 (I) ifdef nesting level is 2.
"/usr/include/errno.h", line 48.2: 1506-454 (I) ifdef condition evaluates to 1.
"/usr/include/errno.h", line 50.2: 1506-460 (I) ifndef nesting level is 3.
"/usr/include/errno.h", line 50.2: 1506-454 (I) ifndef condition evaluates to 1.
"/usr/include/errno.h", line 52.2: 1506-460 (I) if nesting level is 4.
"/usr/include/errno.h", line 52.13: 1506-455 (I) defined(_THREAD_SAFE) evaluates to 0.
"/usr/include/errno.h", line 52.38: 1506-455 (I) defined(_THREAD_SAFE_ERRNO) evaluates to 0.
"/usr/include/errno.h", line 52.2: 1506-454 (I) if condition evaluates to 0.
"/usr/include/errno.h", line 52.2: 1506-464 (I) Begin skipping tokens.
"/usr/include/errno.h", line 60.2: 1506-460 (I) else nesting level is 4.
"/usr/include/errno.h", line 60.2: 1506-456 (I) Stop skipping tokens.
"/usr/include/errno.h", line 64.2: 1506-460 (I) endif nesting level is 4.
"/usr/include/errno.h", line 66.2: 1506-460 (I) endif nesting level is 3.
...
Does anyone can give me some usefull standards options of xlc to use with common project ?

Last edited by domiq44; 01-19-2011 at 10:43 AM..
# 5  
Old 01-19-2011
Quote:
Originally Posted by domiq44
[...] Does anyone can give me some usefull standards options of xlc to use with common project ?
Sure. Michael Perzl has a nice page on compiling software for AIX.
# 6  
Old 01-19-2011
Ok.
I've tested theses options.

So, there is no option for xlc, as simple as "gcc -Wall", that bring us warnings or erros about source code Smilie

Thanks
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Linux

Xlc compiler on Redhat Linux

Hi , Currently i have my c and pro*c code got compiled in IBM POWER - AIX machine with xlc compiler version 9. We are planning to migrate all our applications from IBM POWER - AIX to Redhat Linux. Can i use the same current (IBM AIX) xlc compiler with the same compiling... (3 Replies)
Discussion started by: mugunthanvh
3 Replies

2. AIX

AIX xlc compiler vs gcc

Hello, We are migrating some applications from previously running on an AIX system to a Linux RedHat system. I was tasked with recompiling some of the code. Unfortunatly I am a big novice on this. So i have the commands used to compile the code with xlc compiler in the AIX environment and i am... (0 Replies)
Discussion started by: spooksman
0 Replies

3. AIX

Checking xlc compiler version

Hi, Below is output of lslpp command. bash-3.00# lslpp -L | grep xlC xlC.aix50.rte 11.1.0.1 C F XL C/C++ Runtime for AIX 5.3 xlC.cpp 9.0.0.0 C F C for AIX Preprocessor xlC.msg.en_US.cpp 9.0.0.0 C F C for AIX... (2 Replies)
Discussion started by: manoj.solaris
2 Replies

4. UNIX for Dummies Questions & Answers

cc compiler and gcc compiler

hi, can we install gcc compiler in unix based OS(sun solar,IBM AIX,HP,etc) and also can we install sun cc compiler in AIX environment and vice versa. and more ..is linux support cc compiler regards Ajay (3 Replies)
Discussion started by: ajaysahoo
3 Replies

5. UNIX for Advanced & Expert Users

XLC compiler: enterprise edition VS XLC for AIX

Who can explain in a few words the difference between XLC for AIX and XLC enterprise Edition for AIX (0 Replies)
Discussion started by: fvaltat1
0 Replies

6. AIX

AIX Xlc compiler

Hi Team I have a native applicaiton built on AIX using the xLC v8 Which could be the possible impacts from a code change point of view if I'll compile with the xLC v10? Thanks Marco (0 Replies)
Discussion started by: antcos
0 Replies

7. UNIX for Dummies Questions & Answers

xl C/C++ compiler to GCC compiler

Hi, we are converting from IBM-AIX(xl c/c++ compiler) to Linux(GCC complier). As a part of this i need to change the CFLAGS. The xl c/c++ complier CFLAGS is CFLAGS := $(CDEBUG) $(PROJECT_INCLUDE_DIRS) $(COBJECT_MODE) -qcpluscmt -qmakedep -qcheck=all \ -qalign=bit_packed $(LINT_FLAGS)... (0 Replies)
Discussion started by: pbattu1
0 Replies

8. HP-UX

cc compiler options

hi , I am compiling a C program with ccopts and cflags . i am getting error message main ( Not referenced yet ! probably due -u option ) can you please adice , how to get rid of this error. Many thanks Narendra babu C (3 Replies)
Discussion started by: naren_chella
3 Replies
Login or Register to Ask a Question