Questions tagged [xlc]

xlc or xlC is the command to invoke IBM XL C or C++ compiler. It is used on IBMs proprietary platforms like Blue Gene, AIX, z/OS, and z/VM

113 questions
2
votes
4 answers

When is a>a true?

Right, I think I really am living a dream. I have the following piece of code which I compile and run on an AIX machine: AIX 3 5 PowerPC_POWER5 processor type IBM XL C/C++ for AIX, V10.1 Version: 10.01.0000.0003 #include #include…
Cricri
  • 1,524
  • 3
  • 12
  • 17
2
votes
2 answers

Determining compiler and version used to build a shared object on *ix operating system

I work on some software that loads a set of user specified shared objects. I'd like to add some code to our "loader" component that can query each specified shared object and find out what compiler and what compiler version was used to build/link…
fahrradler
  • 141
  • 1
  • 2
  • 9
2
votes
1 answer

xlC compilation issue in AIX 6.0 environment

I'm compiling a set of .C files and trying to create object files on AIX 6.0 using xlC compiler version 9.0. It's generating the following errors: 1540-1172 (S) More than one function "operator new" has non-C++ linkage. 1540-0424 (I) "operator…
2
votes
3 answers

Precision error in double

A large double value gets changed when printed with %Lf Values upto the following combination gives proper results 9 digits before decimal / 6 digits after decimal e.g. of a value with 9 digits before decimal printed with %Lf Input :…
Hudson Diniz
  • 43
  • 1
  • 2
  • 4
2
votes
3 answers

Initialization between types "const int** const" and "int**" is not allowed, why?

Using V1.8 z/OS XL C compiler, with warnings jacked-up using INFO(ALL), I get the following warning on line 4 of the code below: WARNING CCN3196 Initialization between types "const int** const" and "int**" is not allowed. 1 int…
Robert Groves
  • 7,574
  • 6
  • 38
  • 50
1
vote
1 answer

Loop optimization by the IBM xlC compiler with Altivec

I was just playing around with the Altivec extension on a power6 cluster we have. I noticed that when I compiled the code below without any optimizations, my speedup was 4 as I was expecting. However, when I compiled it again with the -O3 flag, I…
entitledX
  • 670
  • 1
  • 7
  • 13
1
vote
1 answer

Same source code, different executable size?

In AIX, can different versions of compiler makes executables(or libraries) size different? Questions What can affects on size of executable/libraries? Different version of compiler. Different compile options. Different os version and its…
samsee
  • 23
  • 6
1
vote
1 answer

Trying to make "bilingual macros" between z/OS HLASM and XL C/C++ metal C compiler

I am trying to figure out how to include both HLASM and Metal C definitions for the same DSECT/struct in a single dataset/file. Before trying this, I tried what I described in How do I go about making this work with a #include? It works fine when…
1
vote
1 answer

How do I go about making this work with a #include? It works fine when dropped straight into the code

I have a block of code that I want to #include in my z/OS Metal C program, it works fine when it's just part of the program, but when I put it into a .h file and #include it, the code won't compile. I have successfully gotten this code to work…
1
vote
1 answer

Can I change mangling for g++ to match xlC?

I'm trying to compile code on aix using g++ since xlC support of c++11 is very limited. I'm having trouble to link my code with aix shared libraries because of the different name mangling. xlC supports name mangling replacement (-qnamemangling=v13),…
SHR
  • 7,940
  • 9
  • 38
  • 57
1
vote
1 answer

What is the gcc equivilant for Xlc '-qthreaded' compiler option?

I am currently porting my compiler from AIX XLC compiler to GCC compiler on AIX. I want to know if there is an GCC equivalent compiler option available for the -qthreaded (XLC).
Nujufas
  • 676
  • 1
  • 9
  • 19
1
vote
0 answers

What is the gcc equivilant for Xlc '-qnotwolinkis' compiler option?

I am currently porting my compiler from AIX XLC compiler to GCC compiler on AIX. I want to know if there is an GCC equivalent compiler option available for the '-qnotwolinkis'(XLC).
Nujufas
  • 676
  • 1
  • 9
  • 19
1
vote
1 answer

sigsegv occured when posix_memalign immediately after free in some devices and compile option in AIX

I was assigned to a pointer and it was free immediately, but sigsegv occurs depending on some devices and xlc options. xlC_r -o cc.o c.c -lhm has sigsegv occurred, but xlC_r -o cc.o c.c works. ( lhm option is linking libhm.a libhu.a. ) ( malloc and…
1
vote
1 answer

The name lookup for "__rotatel4" did not find a declaration

I'm working on GCC111 from the compile farm. The machine is AIX 7.1, POWER7 with IBM XLC 12.1. I'm trying to use __rotatel4: $ cat test.cxx #include unsigned int Foo (unsigned int x) { return __rotatel4(x, 4U); } A compile results…
jww
  • 97,681
  • 90
  • 411
  • 885
1
vote
1 answer

What happened to IBM XL C/C++ preprocessor macros?

I'm working on GCC112 from the compile farm, which is a Linux ppc64-le machine. I'm testing IBM XL C/C++ and catching a compile failure on some AES code that uses POWER8. The code has worked for the last couple of years. The failure is new. The…
jww
  • 97,681
  • 90
  • 411
  • 885