xlc

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

纵然是瞬间 提交于 2020-01-06 02:27:26
问题 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 without #include. I'm sure I'm overlooking something having to do with #include... This code works: #pragma margins(2,72) *#if 0!=0 Test DSECT Test@ DS A TestINT DS F TestChar DS C .ago end *#endif *struct Test { * void *Test1; * int TestInt; * char

When is a>a true?

三世轮回 提交于 2019-12-20 03:09:15
问题 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 <stdio.h> #include <math.h> #define RADIAN(x) ((x) * acos(0.0) / 90.0) double nearest_distance(double radius,double lon1, double lat1, double lon2, double lat2){ double rlat1=RADIAN(lat1); double rlat2=RADIAN(lat2); double rlon1=lon1; double rlon2=lon2; double a=0,b=0,c=0; a

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

两盒软妹~` 提交于 2019-12-14 02:18:18
问题 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 foo = 0; 2 int *ptr = &foo; 3 const int * const fixed_readonly_ptr = ptr; 4 const int ** const fixed_ptr_to_readonly_ptr = &ptr; I can't wrap my head around why I'm getting this warning. If I can assign an int pointer to a const pointer to const int (line 3), then why

How to disable a specific IBM XL C++ compiler warning?

倖福魔咒の 提交于 2019-12-13 17:53:22
问题 Given tmp.cpp: #include <stdio.h> #pragma report(disable, CCN8826) int main(int argc, const char *argv[]) { const char * hi = "hi\n"; printf(hi); return 0; } Despite I use #pragma report that is supposed to suppress the warning, I still get: bash-3.1$ xlC -qformat=all tmp.cpp "tmp.cpp", line 8.12: 1540-2826 (W) The format string is not a string literal and format arguments are not given. How do I get rid of that warning? The error message numbers are here and the #pragma report description is

static compilation of proftpd on AIX

谁说我不能喝 提交于 2019-12-07 07:38:59
问题 I'd like to compile proftpd on AIX to make it deployable on other server without having to reinstall all gnu lib library on each server. I already manage to compile it dynamicaly, but I can't manage to get it compile with the option LDFLAG="-Wl,-static" like advise in the official proftpd documentation. here the config.log error I get This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by configure, which

static compilation of proftpd on AIX

跟風遠走 提交于 2019-12-05 17:16:48
I'd like to compile proftpd on AIX to make it deployable on other server without having to reinstall all gnu lib library on each server. I already manage to compile it dynamicaly, but I can't manage to get it compile with the option LDFLAG="-Wl,-static" like advise in the official proftpd documentation. here the config.log error I get This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by configure, which was generated by GNU Autoconf 2.61. Invocation command line was $ ./configure LDFLAGS=-Wl,-static -

static function lookup from a template function issue with xlC

╄→гoц情女王★ 提交于 2019-11-30 19:28:32
While I was searching for clues about a compilation problem I have had in my source, I have come across this bug report (against Mozilla's JavaScript engine source) related to functions lookup. Quoting from the bug report: TypedArrayTemplate is (obviously) a template, and it is referencing INT_TO_JSVAL, a static inline function, without prefixing it with "::". This breaks xlC because it can not resolve INT_TO_JSVAL. The standard does not require that statics be considered if the unqualified name is not found in the context of the template arguments. g++ does this fallback, xlC does not.

static function lookup from a template function issue with xlC

依然范特西╮ 提交于 2019-11-30 03:36:58
问题 While I was searching for clues about a compilation problem I have had in my source, I have come across this bug report (against Mozilla's JavaScript engine source) related to functions lookup. Quoting from the bug report: TypedArrayTemplate is (obviously) a template, and it is referencing INT_TO_JSVAL, a static inline function, without prefixing it with "::". This breaks xlC because it can not resolve INT_TO_JSVAL. The standard does not require that statics be considered if the unqualified