http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48209
--- Comment #3 from dave at hiauly1 dot hia.nrc.ca 2011-03-21 23:03:11 UTC --- > It looks like this is broken for HP-UX 11.11 and 11.23. On 11.31 there is a > object that can be linked in (unix2003.o) to fix this. Just like we > currently > link in unix95.0 or unix98.o for UNIX 1995 or UNIX 1998 standards, if you link > in unix2003.o then you will get the UNIX 2003 standard and the correct C99 > handling of snprintf. That's good to know. We should add 11.31 support and make lonking with unix2003.o the default. So, we have: HP-UX 10.*: no snprintf HP-UX 11.[0-2]*": non standard snprintf HP-UX 11.31: C99 snprintf with unix2003.o In my opinion, the testcase should be testing the GCC implementation of snprintf. If any of the four cases are not optimized by GCC, they should be removed. The HP-UX issues with snprintf aren't unique from what I see on the net. Dave