I just noticed that sunCC in 12.6 supports the warn_unused_result attribute (yay!), but not suncc. It seems like an odd restriction; is it intentional?
Quick test case:
__attribute__((__warn_unused_result__))
int test_unused_result(void) {
return 1729;
}
int main(int argc, char* argv[]) {
(void) argc;
(void) argv;
test_unused_result();
if (test_unused_result() != 1729)
return EXIT_FAILURE;
return EXIT_SUCCESS;
}