PERFORCE change 60098 for review
Marcel Moolenaar
marcel at FreeBSD.org
Thu Aug 19 17:13:26 PDT 2004
http://perforce.freebsd.org/chv.cgi?CH=60098
Change 60098 by marcel at marcel_nfs on 2004/08/20 00:12:43
Diff reduction. The IFC already partially removed the GCC
mods on this branch.
Affected files ...
.. //depot/projects/ia64/contrib/amd/conf/trap/trap_default.h#3 edit
.. //depot/projects/ia64/contrib/gcc/c-common.c#11 edit
.. //depot/projects/ia64/contrib/gcc/c-common.h#9 edit
.. //depot/projects/ia64/contrib/gcc/c-typeck.c#12 edit
Differences ...
==== //depot/projects/ia64/contrib/amd/conf/trap/trap_default.h#3 (text+ko) ====
@@ -1,2 +1,3 @@
+/* $FreeBSD: src/contrib/amd/conf/trap/trap_default.h,v 1.3 2004/07/06 14:14:26 mbr Exp $ */
/* $srcdir/conf/trap/trap_default.h */
#define MOUNT_TRAP(type, mnt, flags, mnt_data) mount(type, mnt->mnt_dir, flags, mnt_data)
==== //depot/projects/ia64/contrib/gcc/c-common.c#11 (text+ko) ====
@@ -372,11 +372,6 @@
/* C/ObjC language option variables. */
-/* Nonzero means message about casts with integer/pointer size mismatches;
- 1 means warning; 2 means error. */
-
-int mesg_bad_pointer_cast = 1;
-
/* Nonzero means message about use of implicit function declarations;
1 means warning; 2 means error. */
==== //depot/projects/ia64/contrib/gcc/c-common.h#9 (text+ko) ====
@@ -535,10 +535,6 @@
/* C/ObjC language option variables. */
-/* Warn about bad pointer casts. 1 = warning, 2 = error. */
-
-extern int mesg_bad_pointer_cast;
-
/* Nonzero means message about use of implicit function declarations;
1 means warning; 2 means error. */
==== //depot/projects/ia64/contrib/gcc/c-typeck.c#12 (text+ko) ====
@@ -3128,16 +3128,7 @@
&& TREE_CODE (otype) == POINTER_TYPE
&& TYPE_PRECISION (type) != TYPE_PRECISION (otype)
&& !TREE_CONSTANT (value))
-#if 1 /* mostly harmless */
warning ("cast from pointer to integer of different size");
-#else
- {
- if (mesg_bad_pointer_cast == 2)
- error ("cast from pointer to integer of different size");
- else if (mesg_bad_pointer_cast == 1)
- warning ("cast from pointer to integer of different size");
- }
-#endif
if (warn_bad_function_cast
&& TREE_CODE (value) == CALL_EXPR
@@ -3149,12 +3140,7 @@
&& TYPE_PRECISION (type) != TYPE_PRECISION (otype)
/* Don't warn about converting any constant. */
&& !TREE_CONSTANT (value))
- {
- if (mesg_bad_pointer_cast == 2)
- error ("cast to pointer from integer of different size");
- else if (mesg_bad_pointer_cast == 1)
- warning ("cast to pointer from integer of different size");
- }
+ warning ("cast to pointer from integer of different size");
if (TREE_CODE (type) == POINTER_TYPE
&& TREE_CODE (otype) == POINTER_TYPE
@@ -3676,11 +3662,8 @@
&& TREE_CODE (TREE_TYPE (rhs)) == INTEGER_TYPE
&& TREE_CODE (TREE_OPERAND (rhs, 0)) == INTEGER_CST
&& integer_zerop (TREE_OPERAND (rhs, 0))))
- if (mesg_bad_pointer_cast == 2)
- error ("%s makes pointer from integer without a cast", errtype);
- else
- warn_for_assignment ("%s makes pointer from integer without a cast",
- errtype, funname, parmnum);
+ warn_for_assignment ("%s makes pointer from integer without a cast",
+ errtype, funname, parmnum);
return convert (type, rhs);
}
More information about the p4-projects
mailing list