[llvm-commits] [llvm-gcc-4.2] r56905 - in /llvm-gcc-4.2/trunk/gcc: c-common.c config/i386/darwin.h config/rs6000/darwin.h
Devang Patel
dpatel at apple.com
Tue Sep 30 18:26:22 PDT 2008
Author: dpatel
Date: Tue Sep 30 20:26:22 2008
New Revision: 56905
URL: http://llvm.org/viewvc/llvm-project?rev=56905&view=rev
Log:
Fix newbie hack that attempted to enable format security warnings by default on darwin platform.
Modified:
llvm-gcc-4.2/trunk/gcc/c-common.c
llvm-gcc-4.2/trunk/gcc/config/i386/darwin.h
llvm-gcc-4.2/trunk/gcc/config/rs6000/darwin.h
Modified: llvm-gcc-4.2/trunk/gcc/c-common.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/c-common.c?rev=56905&r1=56904&r2=56905&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/c-common.c (original)
+++ llvm-gcc-4.2/trunk/gcc/c-common.c Tue Sep 30 20:26:22 2008
@@ -302,8 +302,7 @@
/* Warn about format/argument anomalies in calls to formatted I/O functions
(*printf, *scanf, strftime, strfmon, etc.). */
-/* APPLE LOCAL default to Wformat-security 5764921 */
-int warn_format = 1;
+int warn_format;
/* Warn about using __null (as NULL in C++) as sentinel. For code compiled
with GCC this doesn't matter as __null is guaranteed to have the right
Modified: llvm-gcc-4.2/trunk/gcc/config/i386/darwin.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/i386/darwin.h?rev=56905&r1=56904&r2=56905&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/config/i386/darwin.h (original)
+++ llvm-gcc-4.2/trunk/gcc/config/i386/darwin.h Tue Sep 30 20:26:22 2008
@@ -101,6 +101,8 @@
%{!mmacosx-version-min=*: %{!miphoneos-version-min=*: %(darwin_cc1_minversion)}} \
"/* APPLE LOCAL ignore -mcpu=G4 -mcpu=G5 */"\
%<faltivec %<mno-fused-madd %<mlong-branch %<mlongcall %<mcpu=G4 %<mcpu=G5 \
+ "/* APPLE LOCAL enable format security warnings */"\
+ %{!Wno-format:-Wformat} \
%{g: %{!fno-eliminate-unused-debug-symbols: -feliminate-unused-debug-symbols }}"
/* APPLE LOCAL AltiVec */
Modified: llvm-gcc-4.2/trunk/gcc/config/rs6000/darwin.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/rs6000/darwin.h?rev=56905&r1=56904&r2=56905&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/config/rs6000/darwin.h (original)
+++ llvm-gcc-4.2/trunk/gcc/config/rs6000/darwin.h Tue Sep 30 20:26:22 2008
@@ -113,6 +113,8 @@
%{static: %{Zdynamic: %e conflicting code gen style switches are used}}\
"/* APPLE LOCAL ARM 5683689 */"\
%{!mmacosx-version-min=*: %{!miphoneos-version-min=*: %(darwin_cc1_minversion)}} \
+ "/* APPLE LOCAL enable format security warnings */"\
+ %{!Wno-format:-Wformat} \
"/* APPLE LOCAL -fast or -fastf or -fastcp */"\
%{!mkernel:%{!static:%{!fast:%{!fastf:%{!fastcp:%{!mdynamic-no-pic:-fPIC}}}}}}"
More information about the llvm-commits
mailing list