[llvm-commits] [llvm-gcc-4.2] r56946 - in /llvm-gcc-4.2/trunk/gcc: c-common.c c.opt config/i386/darwin.h config/rs6000/darwin.h
Anton Korobeynikov
asl at math.spbu.ru
Wed Oct 1 23:16:09 PDT 2008
Author: asl
Date: Thu Oct 2 01:16:08 2008
New Revision: 56946
URL: http://llvm.org/viewvc/llvm-project?rev=56946&view=rev
Log:
Reapply r56905 with proper fix.
Modified:
llvm-gcc-4.2/trunk/gcc/c-common.c
llvm-gcc-4.2/trunk/gcc/c.opt
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=56946&r1=56945&r2=56946&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/c-common.c (original)
+++ llvm-gcc-4.2/trunk/gcc/c-common.c Thu Oct 2 01:16:08 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/c.opt
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/c.opt?rev=56946&r1=56945&r2=56946&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/c.opt (original)
+++ llvm-gcc-4.2/trunk/gcc/c.opt Thu Oct 2 01:16:08 2008
@@ -238,7 +238,7 @@
; APPLE LOCAL begin default to Wformat-security 5764921
Wformat-security
-C ObjC C++ ObjC++ Var(warn_format_security) Init(1)
+C ObjC C++ ObjC++ Var(warn_format_security) Init(0)
Warn about possible security problems with format functions
; APPLE LOCAL end default to Wformat-security 5764921
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=56946&r1=56945&r2=56946&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/config/i386/darwin.h (original)
+++ llvm-gcc-4.2/trunk/gcc/config/i386/darwin.h Thu Oct 2 01:16:08 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 -Wformat-security} \
%{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=56946&r1=56945&r2=56946&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/config/rs6000/darwin.h (original)
+++ llvm-gcc-4.2/trunk/gcc/config/rs6000/darwin.h Thu Oct 2 01:16:08 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 -Wformat-security} \
"/* APPLE LOCAL -fast or -fastf or -fastcp */"\
%{!mkernel:%{!static:%{!fast:%{!fastf:%{!fastcp:%{!mdynamic-no-pic:-fPIC}}}}}}"
More information about the llvm-commits
mailing list