<div dir="ltr">On 25 September 2013 12:07, Rafael Espindola <span dir="ltr"><<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: rafael<br>
Date: Wed Sep 25 14:07:08 2013<br>
New Revision: 191394<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=191394&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=191394&view=rev</a><br>
Log:<br>
Produce an error for unknown -f options.<br></blockquote><div><br></div><div>Err, we aren't ready for this. If we're going to do this, could you stage it such that the gcc flags are added but ignored, then we error on unknown options? Then we can work on reducing that list of known-but-ignored gcc flags. But for now, this breaks the world. Please revert.</div>
<div><br></div><div>Nick</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Modified:<br>
cfe/trunk/include/clang/Driver/Options.td<br>
cfe/trunk/test/Driver/no-objc-default-synthesize-properties.m<br>
cfe/trunk/test/Driver/unknown-arg.c<br>
<br>
Modified: cfe/trunk/include/clang/Driver/Options.td<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/Options.td?rev=191394&r1=191393&r2=191394&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/Options.td?rev=191394&r1=191393&r2=191394&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/include/clang/Driver/Options.td (original)<br>
+++ cfe/trunk/include/clang/Driver/Options.td Wed Sep 25 14:07:08 2013<br>
@@ -822,7 +822,6 @@ def fdata_sections : Flag <["-"], "fdata<br>
HelpText<"Place each data in its own section (ELF Only)">;<br>
def fdebug_types_section: Flag <["-"], "fdebug-types-section">, Group<f_Group>,<br>
Flags<[CC1Option]>, HelpText<"Place debug types in their own section (ELF Only)">;<br>
-def f : Joined<["-"], "f">, Group<f_Group>;<br>
def g_Flag : Flag<["-"], "g">, Group<g_Group>,<br>
HelpText<"Generate source level debug information">, Flags<[CC1Option]>;<br>
def gline_tables_only : Flag<["-"], "gline-tables-only">, Group<g_Group>,<br>
<br>
Modified: cfe/trunk/test/Driver/no-objc-default-synthesize-properties.m<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/no-objc-default-synthesize-properties.m?rev=191394&r1=191393&r2=191394&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/no-objc-default-synthesize-properties.m?rev=191394&r1=191393&r2=191394&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/Driver/no-objc-default-synthesize-properties.m (original)<br>
+++ cfe/trunk/test/Driver/no-objc-default-synthesize-properties.m Wed Sep 25 14:07:08 2013<br>
@@ -1,4 +1,4 @@<br>
-// RUN: %clang -fsyntax-only -fno-objc-default-synthesize-properties -fobjc-default-synthesize-properties %s 2>&1 | FileCheck %s<br>
+// RUN: not %clang -fsyntax-only -fno-objc-default-synthesize-properties -fobjc-default-synthesize-properties %s 2>&1 | FileCheck %s<br>
<br>
@interface I<br>
@property int P;<br>
@@ -6,5 +6,5 @@<br>
<br>
@implementation I<br>
@end<br>
-// CHECK: warning: argument unused during compilation: '-fno-objc-default-synthesize-properties'<br>
-// CHECK: warning: argument unused during compilation: '-fobjc-default-synthesize-properties'<br>
+// CHECK: error: unknown argument: '-fno-objc-default-synthesize-properties'<br>
+// CHECK: error: unknown argument: '-fobjc-default-synthesize-properties'<br>
<br>
Modified: cfe/trunk/test/Driver/unknown-arg.c<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/unknown-arg.c?rev=191394&r1=191393&r2=191394&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/unknown-arg.c?rev=191394&r1=191393&r2=191394&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/Driver/unknown-arg.c (original)<br>
+++ cfe/trunk/test/Driver/unknown-arg.c Wed Sep 25 14:07:08 2013<br>
@@ -1,4 +1,4 @@<br>
-// RUN: not %clang %s -cake-is-lie -%0 -%d -HHHH -munknown-to-clang-option -print-stats 2>&1 | \<br>
+// RUN: not %clang %s -cake-is-lie -%0 -%d -HHHH -munknown-to-clang-option -print-stats -funknown-to-clang-option 2>&1 | \<br>
// RUN: FileCheck %s<br>
<br>
// CHECK: unknown argument: '-cake-is-lie'<br>
@@ -7,9 +7,9 @@<br>
// CHECK: unknown argument: '-HHHH'<br>
// CHECK: unknown argument: '-munknown-to-clang-option'<br>
// CHECK: unknown argument: '-print-stats'<br>
+// CHECK: unknown argument: '-funknown-to-clang-option'<br>
<br>
<br>
-// RUN: %clang -S %s -o %t.s -funknown-to-clang-option -Wunknown-to-clang-option 2>&1 | FileCheck --check-prefix=IGNORED %s<br>
+// RUN: %clang -S %s -o %t.s -Wunknown-to-clang-option 2>&1 | FileCheck --check-prefix=IGNORED %s<br>
<br>
-// IGNORED: warning: argument unused during compilation: '-funknown-to-clang-option'<br>
// IGNORED: warning: unknown warning option '-Wunknown-to-clang-option'<br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
</blockquote></div><br></div></div>