OSX compile warning with pgcc

I’m encountering a compile warning with pgcc [perhaps due to a duplcate definition in pgi incude file]. I can workarround by commenting out the offending line.

Thanks,

balay@imav^~/junk $ sw_vers
ProductName: Mac OS X
ProductVersion: 10.9.2
BuildVersion: 13C64
balay@imav^~/junk $ clang --version
Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.1.0
Thread model: posix
balay@imav^~/junk $ pgcc --version

pgcc 14.3-0 64-bit target on Apple OS/X developer
The Portland Group - PGI Compilers and Tools
Copyright © 2014, NVIDIA CORPORATION. All rights reserved.
balay@imav^~/junk $ cat x.c
#include <stdio.h>
#include <stdarg.h>

int main(int argc,char **args)
{
printf(“testing\n”);
return 0;
}
balay@imav^~/junk $ pgcc x.c
PGC-W-0114-More than one type specified (/Applications/Free PGI.app/Contents/Resources/pgi/osx86-64/14.3/include/va_list.h: 34)
PGC-W-0143-Useless typedef declaration (no declarators present) (/Applications/Free PGI.app/Contents/Resources/pgi/osx86-64/14.3/include/va_list.h: 34)
PGC/x86-64 OSX 14.3-0: compilation completed with warnings
balay@imav^~/junk $ cat y.c
#include <stdarg.h>
#include <stdio.h>

int main(int argc,char **args)
{
printf(“testing\n”);
return 0;
}
balay@imav^~/junk $ pgcc y.c
PGC-W-0114-More than one type specified (/usr/include/sys/_types/_va_list.h: 31)
PGC-W-0143-Useless typedef declaration (no declarators present) (/usr/include/sys/_types/_va_list.h: 31)
PGC/x86-64 OSX 14.3-0: compilation completed with warnings
balay@imav^~/junk $

Looks like I need the following change to workarround this issue.

balay@imav^/Applications/Free PGI.app/Contents/Resources/pgi/osx86-64/14.3/include $ diff -u va_list.h.orig va_list.h
— va_list.h.orig 2014-04-18 15:59:51.000000000 -0500
+++ va_list.h 2014-04-18 16:01:03.000000000 -0500
@@ -31,7 +31,10 @@
} __pgi_va_list[1];
#endif

+#ifndef _VA_LIST_T /*sb /
+#define _VA_LIST_T
typedef __pgi_va_list va_list;
+#endif /
_VA_LIST_T */

#if defined(__cplusplus) && defined(_GNU_SOURCE) && __pgnu_vsn >= 40300

Hi sab,

Thanks for the report. I have filed a report on this with our developers. Will keep you posted as this is addressed.

Best regards,

+chris

TPR 20338 - OSX: FreePGI gives warning about header files when stdarg.h included

has been fixed in the latest FreePGI download.

regards,
dave