Showing posts with label Compilers. Show all posts
Showing posts with label Compilers. Show all posts
11 June 2015
20 May 2015
14 November 2014
26 March 2014
Solaris Studio 12.4 beta - refreshed
Really interesting update to the Solaris Studio compiler suite.
It looks like it might have lots of new C++11 support & upgrades to the performance analyser, code analyser and OpenMP 4.0 support, and updated debugger and IDE.
What's New in the Oracle Solaris Studio 12.4 Beta
Update:
A refreshed beta was released, update 14th July release.
http://www.oracle.com/technetwork/server-storage/solarisstudio/overview/index.html
It looks like it might have lots of new C++11 support & upgrades to the performance analyser, code analyser and OpenMP 4.0 support, and updated debugger and IDE.
What's New in the Oracle Solaris Studio 12.4 Beta
Update:
A refreshed beta was released, update 14th July release.
http://www.oracle.com/technetwork/server-storage/solarisstudio/overview/index.html
15 January 2014
How the HP-UX C/C++ compiler can help with 64-bit porting
I'm going to write up some notes about various modern UNIX compilers, first up is the HP-UX compiler.
The HP-UX C/C++ compiler is currently at version A.06.27, last updated in 2012. Since the creation of version 6, it seems to only have had a few tweaks made to it. For example, it lacks many new C++ features.
Nevertheless, it has some useful warning options that can help with migrating code to 64-bit goodness.
A very simple example:
Interesting options that could help us
External links:
HP aC++/HP C Online Programmer's Guide
Command-Line Options
The HP-UX C/C++ compiler is currently at version A.06.27, last updated in 2012. Since the creation of version 6, it seems to only have had a few tweaks made to it. For example, it lacks many new C++ features.
Nevertheless, it has some useful warning options that can help with migrating code to 64-bit goodness.
Compiler versions
$ cc -V
cc: HP C/aC++ B3910B A.06.27 [May 22 2012]
$ aCC -V
aCC: HP C/aC++ B3910B A.06.27 [May 22 2012]A very simple example:
#include stdio.h
#include stdlib.h
#include string.h
int main(int argc, char *argv[])
{
int len;
char str[] = "Hello world, is this string okay?";
len = strlen(str);
printf("strlen is %d\n", strlen(str));
return 0;
}
Interesting options that could help us
+w64bit - Enables warnings that help detection of potential problems in converting 32-bit applications to 64-bit
+wlint - Enables several warnings in the compiler that provide lint like functionality
+wperfadvice - Enables performance advisory messages.
+wsecurity - Enables compile-time diagnostics for potential security violations
+w - Warns about all questionable constructs
Some of these options are lint-like, some are useful performance tips, others help with code porting issues.
A normal compile gives no warning in the above example, but if we add these warning flags we get extra output:
$ cc strlen_example.c -o strlen_example +w64bit
"strlen_example.c", line 11: warning #4229-D: 64 bit migration: conversion
from "size_t" to "int" may truncate value
len = strlen(str);
^
more:
$ cc strlen_example.c -o strlen_example +w
"strlen_example.c", line 11: remark #4229-D: 64 bit migration: conversion from
"size_t" to "int" may truncate value
len = strlen(str);
^
"strlen_example.c", line 13: remark #2181-D: argument is incompatible with
corresponding format string conversion
printf("strlen is %d\n", strlen(str));
^
"strlen_example.c", line 8: remark #2550-D: variable "len" was set but never
used
int len;
^
Larger example output from some code that deals with large files:
"MyLargeFile.c", line 231: warning #4298-D: addition result could be truncated before cast to bigger sized type
"MyLargeFile.c", line 321: warning #4229-D: 64 bit migration: conversion from "size_t" to "int" may truncate value
"MyLargeFile.c", line 723: warning #4298-D: multiply result could be truncated before cast to bigger sized type
"MyLargeFile.c", line 3263: warning #4229-D: 64 bit migration: conversion from "unsigned long" to "unsigned int" may truncate value
"MyLargeFile.c", line 2423: warning #4229-D: 64 bit migration: conversion from "size_t" to "int" may truncate value
"MyLargeFile.c", line 3478: warning #4229-D: 64 bit migration: conversion from "unsigned long" to "int" may truncate value
"MyLargeFile.c", line 5134: warning #4229-D: 64 bit migration: conversion from "long" to "int" may truncate value
"MyLargeFile.c", line 5692: warning #4231-D: 64 bit migration: conversion between types of different sizes has occurred (from "int" to "void *" )
As you can see, the compiler can spot quite a few issues with this code that you might want to consider carefully when making a real 64-bit pure aware application.
External links:
HP aC++/HP C Online Programmer's Guide
Command-Line Options
02 October 2013
27 May 2009
Open64 compiler suite
x86 Open64 Compiler Suite v4.2.2 is now available.
It appears to be a complete & open compiler suite for x86 32-bit & 64-bit machines.
It looks very feature rich. The downloads are only for GNU/Linux.
Open64 compiler suite
It appears to be a complete & open compiler suite for x86 32-bit & 64-bit machines.
It looks very feature rich. The downloads are only for GNU/Linux.
Open64 compiler suite
Subscribe to:
Posts (Atom)