Greg wrote:
Hi all. For starters, uname -a:
SunOS sol 5.10 Generic_137111-08 sun4u sparc SUNW,Sun-Fire-880

Something about my makefile and/or my environment is broken. When I compile 
this program:

#include <iostream>
main(){std::cout &lt;&lt; "Hello\n";}

(Note I'm not the biggest fan of C++, but I do have some relevant experience...)

This code is horribly broken. *Never* rely on implicit return types;
thankfully this was done away with in C99 and quite frankly I'm
surprised that GCC hasn't complained bitterly about the above.

Please rewrite this as:

#include <iostream>

int
main()
{
  std::cout << "Hello" << std::endl;
  return 0;
}

You appear to be using a GCC release that is bundled with Blastwave. Is there a particular reason for this? I wouldn't expect consistent results out of *any* compiler which is not directly supported by Sun.

Either way, I had no issues whatsoever compiling this on i86pc or sparcv9 using the build GCC which is bundled with Solaris.

Cheers,

Steve

_______________________________________________
opensolaris-code mailing list
opensolaris-code@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to