r57326 malfunctions?

Looking back through the commits to llvm-gcc-4.2/trunk/gcc/config/i386/darwin.h,
I see a total backout of format related warnings in r56923 followed by the reapplication of
r569065 with a fix (r56946)...

-- llvm-gcc-4.2/trunk/gcc/config/i386/darwin.h 2008/10/01 17:38:40 56923
+++ llvm-gcc-4.2/trunk/gcc/config/i386/darwin.h 2008/10/02 06:16:08 56946
@@ -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 */

followed by a fixed that claims not to enable the formatting warnings by default on
darwin (r57326)...

--- llvm-gcc-4.2/trunk/gcc/config/i386/darwin.h 2008/10/02 06:16:08 56946
+++ llvm-gcc-4.2/trunk/gcc/config/i386/darwin.h 2008/10/09 20:56:07 57326
@@ -101,8 +101,13 @@
   %{!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} \
+ "/* APPLE LOCAL begin enable format security warnings */"\
+ %{!Wno-format:-Wformat \
+ %{!-Wno-format-security:-Wformat-security} \
+ %{!-Wformat-extra-args:-Wno-format-extra-args} \
+ %{!-Wformat-zero-length:-Wno-format-zero-length} \
+ %{!-Wnonnull:-Wno-nonnull}} \
+ "/* APPLE LOCAL end enable format security warnings */"\
   %{g: %{!fno-eliminate-unused-debug-symbols: -feliminate-unused-debug-symbols }}"

/* APPLE LOCAL AltiVec */

It would seem obvious that this last patch must not really be functional since
gfortran is being given this formatting flags by default. I think this may not
be obvious for the other compilers since they don't complain if these flags
are present like gfortran does...

f951: warning: command line option "-Wformat" is valid for C/C++/ObjC/ObjC++ but not for Fortran
f951: warning: command line option "-Wformat-security" is valid for C/C++/ObjC/ObjC++ but not for Fortran
f951: warning: command line option "-Wno-format-extra-args" is valid for C/C++/ObjC/ObjC++ but not for Fortran
f951: warning: command line option "-Wno-format-zero-length" is valid for C/C++/ObjC/ObjC++ but not for Fortran
f951: warning: command line option "-Wno-nonnull" is valid for C/C++/ObjC/ObjC++ but not for Fortran

Unless we need something like a F951_SPEC entry in darwin.h?
               Jack
ps Geoff, do you have any opinions on what could be going wrong here?

:frowning: Sounds like someone got it just a bit wrong.