This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] genconfig.c: Tweak CC0_P.
- From: Kazu Hirata <kazu at cs dot umass dot edu>
- To: gcc-patches at gcc dot gnu dot org
- Cc: roger at eyesopen dot com
- Date: Fri, 30 Jan 2004 14:27:46 -0500 (EST)
- Subject: [patch] genconfig.c: Tweak CC0_P.
Hi,
Attached is a patch to tweak CC0_P.
We recently had a patch to to introduce a use of CC0_P with its
operand undeclared. The patch will help us avoid this kind of
oversight.
Tested on i686-pc-linux-gnu. OK to apply?
Kazu Hirata
2004-01-29 Kazu Hirata <kazu@cs.umass.edu>
* genconfig.c (main): Have CC0_P check its operand even on a
target without cc0.
Index: genconfig.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/genconfig.c,v
retrieving revision 1.50
diff -u -r1.50 genconfig.c
--- genconfig.c 1 Jun 2003 15:59:08 -0000 1.50
+++ genconfig.c 29 Jan 2004 20:38:53 -0000
@@ -336,7 +336,9 @@
}
else
{
- printf ("#define CC0_P(X) 0\n");
+ /* We output CC0_P this way to make sure that X is declared
+ somewhere. */
+ printf ("#define CC0_P(X) ((X) ? 0 : 0)\n");
}
if (have_cmove_flag)