The following test cases now fail on i686-apple-darwin10...

FAIL: gcc.c-torture/execute/builtins/sprintf.c compilation,  -O0                
FAIL: gcc.c-torture/execute/builtins/sprintf.c compilation,  -O1                
FAIL: gcc.c-torture/execute/builtins/sprintf.c compilation,  -O2               
                                                                   FAIL:
gcc.c-torture/execute/builtins/sprintf.c compilation,  -O3 -
fomit-frame-pointer                                                             
FAIL: gcc.c-torture/execute/builtins/sprintf.c compilation,  -O3 -g            
                                                                   FAIL:
gcc.c-torture/execute/builtins/sprintf.c compilation,  -Os    

Mike Stump says this is because the call to  sprintf is unportable code. The
library is free to define sprintf and when it does this can fail. He suggest we
use...

int
(sprintf) (char *buf, const char *fmt, ...)

instead of the current...

int
sprintf (char *buf, const char *fmt, ...)

I can confirm that this change to
gcc/testsuite/gcc.c-torture/execute/builtins/lib/sprintf.c eliminates the
compilation failure under i686-apple-darwin10.


-- 
           Summary: gcc/testsuite/gcc.c-
                    torture/execute/builtins/lib/sprintf.c unportable
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: testsuite
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: howarth at nitro dot med dot uc dot edu
 GCC build triplet: i686-apple-darwin10
  GCC host triplet: i686-apple-darwin10
GCC target triplet: i686-apple-darwin10


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38008

Reply via email to