From: "Manuel López-Ibáñez" <lopezibanez@gmail.com>
To: Gcc Patch List <gcc-patches@gcc.gnu.org>
Cc: Jason Merrill <jason@redhat.com>,
"Joseph S. Myers" <joseph@codesourcery.com>,
Sylvestre Ledru <sylvestre@debian.org>
Subject: Re: [Patch] PR55189 enable -Wreturn-type by default
Date: Thu, 14 Aug 2014 18:49:00 -0000 [thread overview]
Message-ID: <CAESRpQD1yMx1R7Gcvefy5RBx7+1TMnpgVchFAYZKV1LoTkBUZQ@mail.gmail.com> (raw)
--- a/gcc/fortran/options.c
+++ b/gcc/fortran/options.c
@@ -693,6 +693,10 @@ gfc_handle_option (size_t scode, const char *arg,
int value,
gfc_option.warn_line_truncation = value;
break;
+ case OPT_Wmissing_return:
+ warn_missing_return = value;
+ break;
+
case OPT_Wrealloc_lhs:
gfc_option.warn_realloc_lhs = value;
break;
The entry in c.opt says this is a C/C++ option, why you need this?
+Wmissing-return
+C ObjC C++ ObjC++ Var(warn_missing_return) LangEnabledBy(C ObjC C++
ObjC++,Wreturn-type)
+Warn whenever control may reach end of non-void function
This should prevent that using -Wreturn-type in Fortran tries to
enable -Wmissing-return, if not that is a bug.
In any case, the work-around should be adding Wmissing-return to
fortran/lang.opt with a ??? comment, not there.
--- a/gcc/c-family/c.opt
+++ b/gcc/c-family/c.opt
@@ -472,7 +472,7 @@ C ObjC Var(warn_implicit_function_declaration)
Init(-1) Warning LangEnabledBy(C
Warn about implicit function declarations
Wimplicit-int
-C ObjC Var(warn_implicit_int) Warning LangEnabledBy(C ObjC,Wimplicit)
+C ObjC Var(warn_implicit_int) Warning
Warn when a declaration does not specify a type
Wimport
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 5ae910c..3f2019a 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -3615,7 +3615,7 @@ This warning is enabled by @option{-Wall} in C++.
@opindex Wimplicit-int
@opindex Wno-implicit-int
Warn when a declaration does not specify a type.
-This warning is enabled by @option{-Wall}.
+This warning is enabled by default.
@item -Wimplicit-function-declaration @r{(C and Objective-C only)}
@opindex Wimplicit-function-declaration
Does this patch actually enables -Wimplicit-int by default? The
default without Init() should be zero!
And according to this: https://gcc.gnu.org/ml/gcc-patches/2014-06/msg01367.html
we still want -Wno-implicit to disable -Wimplicit-int (and
-Werror=implicit to set -Werror=implicit-int), so the LangEnabledBy()
should stay. The documentation could say: "This warning is enabled by
default and it is also controlled by -Wimplicit."
Cheers,
Manuel.
next reply other threads:[~2014-08-14 18:49 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-14 18:49 Manuel López-Ibáñez [this message]
2014-08-15 16:28 ` Sylvestre Ledru
2014-08-19 22:03 ` Joseph S. Myers
2014-08-20 21:42 ` Sylvestre Ledru
2014-08-20 21:58 ` Joseph S. Myers
-- strict thread matches above, loose matches on Subject: below --
2014-06-04 19:49 Sylvestre Ledru
2014-06-04 22:35 ` Mike Stump
2014-06-04 23:31 ` Joseph S. Myers
2014-06-05 9:33 ` Sylvestre Ledru
2014-06-05 18:01 ` Joseph S. Myers
2014-06-17 16:52 ` Sylvestre Ledru
2014-06-17 17:15 ` Joseph S. Myers
2014-06-17 17:37 ` Sylvestre Ledru
2014-06-17 17:41 ` Joseph S. Myers
2014-07-07 17:18 ` Sylvestre Ledru
2014-07-20 19:20 ` Sylvestre Ledru
2014-07-30 22:10 ` Joseph S. Myers
2014-08-11 7:44 ` Sylvestre Ledru
2014-08-12 17:49 ` Joseph S. Myers
2014-08-12 17:53 ` Sylvestre Ledru
2014-08-14 17:01 ` Sylvestre Ledru
2013-12-20 17:54 Sylvestre Ledru
2013-12-27 5:26 ` Chung-Ju Wu
2013-12-27 5:32 ` Yury Gribov
2014-01-14 17:49 ` Sylvestre Ledru
2014-01-16 19:44 ` Jason Merrill
2014-01-23 6:44 ` Sylvestre Ledru
2014-01-23 18:48 ` Jason Merrill
2014-01-23 18:57 ` Sylvestre Ledru
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAESRpQD1yMx1R7Gcvefy5RBx7+1TMnpgVchFAYZKV1LoTkBUZQ@mail.gmail.com \
--to=lopezibanez@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jason@redhat.com \
--cc=joseph@codesourcery.com \
--cc=sylvestre@debian.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).