gcc-patches@gcc.gnu.org
[Top] [All Lists]

Fix gcc.dg/format/unnamed-1.c on x86 [committed]

Subject: Fix gcc.dg/format/unnamed-1.c on x86 [committed]
From: Andreas Jaeger
Date: Fri, 04 Nov 2005 10:31:02 +0100
I got one extra warning running format/unnamed-1.c with -m32 on
Linux/x86-64:

/builds/gcc/misc/gcc/testsuite> /builds/gcc/misc/gcc/xgcc 
-B/builds/gcc/misc/gcc/ 
/cvs/gcc-svn/trunk/gcc/testsuite/gcc.dg/format/unnamed-1.c    -Wformat 
-fno-show-column -S  -m32 -o unnamed-1.s
/cvs/gcc-svn/trunk/gcc/testsuite/gcc.dg/format/unnamed-1.c: In function ʽfʼ:
/cvs/gcc-svn/trunk/gcc/testsuite/gcc.dg/format/unnamed-1.c:21: warning: format 
ʽ%dʼ expects type ʽintʼ, but argument 2 has type ʽlong intʼ
/cvs/gcc-svn/trunk/gcc/testsuite/gcc.dg/format/unnamed-1.c:22: warning: integer 
constant is too large for its type
/cvs/gcc-svn/trunk/gcc/testsuite/gcc.dg/format/unnamed-1.c:22: warning: integer 
constant is too large for ʽlongʼ type
/cvs/gcc-svn/trunk/gcc/testsuite/gcc.dg/format/unnamed-1.c:22: warning: format 
ʽ%dʼ expects type ʽintʼ, but argument 2 has type ʽ<unnamed-signed:128>ʼ
/cvs/gcc-svn/trunk/gcc/testsuite/gcc.dg/format/unnamed-1.c:22: warning: SSE 
vector argument without SSE enabled changes the ABI

The appended patch fixes all these issues, and has been tested in
64-bit mode on Linux/x86-64 as well.

Committed as obvious,

Andreas

2005-11-04  Andreas Jaeger  <aj@xxxxxxx>

        * gcc.dg/format/unnamed-1.c: Add -msse for x86 compilation to
        avoid extra warnings.

Index: /cvs/gcc-svn/trunk/gcc/testsuite/gcc.dg/format/unnamed-1.c
===================================================================
--- /cvs/gcc-svn/trunk/gcc/testsuite/gcc.dg/format/unnamed-1.c  (revision 
106481)
+++ /cvs/gcc-svn/trunk/gcc/testsuite/gcc.dg/format/unnamed-1.c  (working copy)
@@ -2,6 +2,8 @@
 /* Origin: Joseph Myers <joseph@xxxxxxxxxxxxxxxx> */
 /* { dg-do compile } */
 /* { dg-options "-Wformat" } */
+/* { dg-options "-Wformat -msse" { target { i?86-*-* && ilp32 } } } */
+/* { dg-options "-Wformat -msse" { target { x86_64-*-* && ilp32 } } } */
 
 #include "format.h"
 
-- 
 Andreas Jaeger, aj@xxxxxxx, http://www.suse.de/~aj
  SUSE Linux Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
   GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126
<Prev in Thread] Current Thread [Next in Thread>
  • Fix gcc.dg/format/unnamed-1.c on x86 [committed], Andreas Jaeger <=