We were about to go implement the solution to "5011504 make -xstrconst the default" in the next revision/update of the Sun Studio C compiler. But then we realized this change is similar to the -m32/-m64 implementation in Sun Studio 12 where using -xarch=v9 causes a warning message to use -m64, but Sun Studio 11 has no such option. So, there is no way to fix your makefiles to switch between Sun Studio 11 and 12 without also adding/removing -m64.
If we change the default of -xstrconst to be on, if your code modifies a string literal (gasp!), you can recover by using the new option -features=no%conststrings. But the option -features=no%conststrings does not exist in Sun Studio 12. Thus you cannot switch between Sun Studio 12 cc and the next version of Sun Studio cc, without also adding/removing -features=no%conststrings. So, to avoid that issue, we intend on patching Sun Studio 12 to add -features=no%conststrings. Comments about what we are doing with the compiler options welcome. Comments about fools that modify string literals are not :-) Sun Studio 12 C project
