Questions tagged [suncc]

SunCC, the Sun C Compiler, now part of Oracle Solaris Studio

SunCC is Sun's C and C++ compiler, now part of Oracle Solaris Studio (formerly Sun Studio). The compiler runs on and can compile code for Solaris and Linux on x86 and Sparc processors.

13 questions
4
votes
0 answers

SunCC std::allocator and size_type max_size(size_type) const member function?

We use a custom allocator that zeroizes memory. There's not much to it. It has the types and member functions described at std::allocator. I recently used the custom allocator for a std::vector (with A the allocator), which is a new…
jww
  • 97,681
  • 90
  • 411
  • 885
4
votes
1 answer

Should function template of base class be assignable to pointer-to-member-function

Should the following code compile in C++98/03? struct Base { template void func () { } void norm() { } }; struct Derived : public Base { }; template struct Usage { typedef void (U::*Method)(); …
Michael Price
  • 8,088
  • 1
  • 17
  • 24
3
votes
2 answers

"Deprecated" notation for Sun's C++ compiler?

Does the Sun compiler have a notation to mark functions as deprecated, like GCC's __attribute__ ((deprecated)) or MSVC's __declspec(deprecated)?
Drew Dormann
  • 59,987
  • 13
  • 123
  • 180
2
votes
1 answer

What causes SunCC crash in bfd_asm.c?

I'm trying to track down the cause of a SunCC compiler crash. It has been around since the early SunCC 12.x days, and it is present in the latest SunCC 12.6. The crash happens when attempting to multiply polynomials on x86 systems. The code below is…
jww
  • 97,681
  • 90
  • 411
  • 885
2
votes
3 answers

Sun C++ Compilers and Boost

I am currently developing on OpenSolaris 2009-06. The Boost::MPL Documentation seems to suggest that sun compilers are not supported (the document was last updated in 2004 ). Boost's top level documentation seems to suggest that the sun compilers…
Hassan Syed
  • 20,075
  • 11
  • 87
  • 171
1
vote
0 answers

Sun CC not linking to or compiling in fstream template in Shared Object

I have an issue with Sun CC (6.2 mainly, but also seems to happen with 12.1) where by I cannot seem to either compile in or link to the fstream template in a Shared Object. I've pulled this out of the legacy system I am working and reproduced it…
jmc
  • 813
  • 10
  • 18
1
vote
1 answer

Invalid reference to argument 'N' in GASM Inlining

I'm building Botan on Solaris 11.3 with the SunCC compiler that comes with Developer Studio 12.5. I'm not too familiar with the library or Solaris, and it takes me some effort to track down issues. The compile is dying on a relatively benign file…
jww
  • 97,681
  • 90
  • 411
  • 885
1
vote
1 answer

What causes SunCC crash in g3mangler.cc when using `-std=XXX`?

I'm trying to determine what is causing SunCC 5.11 - 5.13 to die with ../lnk/g3mangler.cc, line 825 (message from SunCC 5.13). Here's what it looks like during a compile. The machine is a 4th gen Core i5, so its got the features which correspond to…
jww
  • 97,681
  • 90
  • 411
  • 885
0
votes
1 answer

Override hwcap_2 in mapfile on Solaris x86 platforms

We have a library that guards runtime paths. If a cpu feature is available then a faster code path is taken. We are trying to add an AVX2 code path on Solaris 11.3. On an old, downlevel machine without AVX2 we are experiencing: $ ./cryptest.exe…
jww
  • 97,681
  • 90
  • 411
  • 885
0
votes
1 answer

Need for -xarch=XXX when an instruction is used in byte code form?

I have a x86 RDRAND implementation like below. I have a similar implementation for RDSEED. inline void RDRAND32(void* output) { #if defined(HAVE_GCC_RDRAND_ASM) __asm__ ( "1:\n" ".byte 0x0f, 0xc7, 0xf0;\n" "jnc…
jww
  • 97,681
  • 90
  • 411
  • 885
0
votes
2 answers

How to have CHECK_CXX_COMPILER_FLAG fail on illegal value?

Our CMakeFile.txt contains the following for SunCC code paths. SunCC uses -xarch=XXX rather than GCC style -mXXX. CHECK_CXX_COMPILER_FLAG("-xarch=sha" CRYPTOPP_IA32_SHA) When we run CMake under Sun's compiler it results in: -- Detecting CXX…
jww
  • 97,681
  • 90
  • 411
  • 885
0
votes
1 answer

Handling the utf8 encoded char* array

A file contains non-latin content and is encoded in UTF8. Currently the existing code uses "fopen" to open the file, parses it and calls my validate function with the non-latin content and passes data as char*. void validate(const char* str) { …
NJMR
  • 1,886
  • 1
  • 27
  • 46
0
votes
1 answer

Performance of parallel OpenMP code with and without compiler optimization (Sun CC)

I am working on a project where we were asked to write a simple OpenMP code to parallelize a program that works with differential equations. We were also asked to test the performance of the code with and without compiler optimizations. I'm working…
papafe
  • 2,959
  • 4
  • 41
  • 72