This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] [PR19090] Add -Wno-pointer-sign option


On Jan 9, 2005, at 7:55 PM, Andi Kleen wrote:
--- gcc/c-common.h 20 Dec 2004 20:11:17 -0000 1.273
+++ gcc/c-common.h 10 Jan 2005 03:33:42 -0000
@@ -444,6 +444,9 @@

extern int warn_main;

+/* Warn if pointer differs in signedness */
+
+extern int warn_pointer_sign;
I'm thinking you don't need this if options.h is included and c.opt is done differently.

/* ObjC language option variables. */

Index: gcc/c-opts.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/c-opts.c,v
retrieving revision 1.133
diff -u -u -r1.133 c-opts.c
--- gcc/c-opts.c 30 Nov 2004 14:10:08 -0000 1.133
+++ gcc/c-opts.c 10 Jan 2005 03:33:43 -0000
@@ -501,6 +501,10 @@
 warn_write_strings = value;
 break;

+ case OPT_Wpointer_sign:
+ warn_pointer_sign = value;
+ break;
I'm thinking you don't need this if c.opt is done differently.

--- gcc/c-typeck.c 5 Jan 2005 15:22:38 -0000 1.407
+++ gcc/c-typeck.c 10 Jan 2005 03:33:47 -0000
@@ -63,6 +63,9 @@
 /* The level of nesting inside "typeof". */
 int in_typeof;

+/* Warn when a pointer differs in signedness. */
+int warn_pointer_sign = 1;
I'm thinking you don't need this, if c.opt is done differently.

+Wpointer-sign
+C ObjC +Warn when a pointer differs in signedness in an assignment.
+
I thinking you can add Var(warn_pointer_sign,1)...

--- gcc/intl.c 23 Jul 2004 06:59:34 -0000 1.11
+++ gcc/intl.c 10 Jan 2005 03:33:48 -0000
@@ -59,27 +59,6 @@

 /* Closing quotation mark. */
 close_quote = _("'");
-
- if (!strcmp (open_quote, "`") && !strcmp (close_quote, "'"))
- {
-#if defined HAVE_LANGINFO_CODESET
- const char *encoding;
-#endif
- /* Untranslated quotes that it may be possible to replace with
-  U+2018 and U+2019; but otherwise use "'" instead of "`" as
-  opening quote. */
- open_quote = "'";
-#if defined HAVE_LANGINFO_CODESET
- encoding = nl_langinfo (CODESET);
- if (encoding != NULL
- && (!strcasecmp (encoding, "utf-8")
- || !strcasecmp (encoding, "utf8")))
- {
- open_quote = "\xe2\x80\x98";
- close_quote = "\xe2\x80\x99";
- }
-#endif
- }
 }
?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]