public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH 0/5] New warning: -Wstring-plus-int (PR c++/62181)
@ 2017-02-22 11:01 Xi Ruoyao
  2017-02-22 16:06 ` Jeff Law
  0 siblings, 1 reply; 2+ messages in thread
From: Xi Ruoyao @ 2017-02-22 11:01 UTC (permalink / raw)
  To: gcc-patches; +Cc: ryxi

Hi,

I've implemented -Wstring-plus-int (like the one in CLANG) for GCC. I've
bootstrapped GCC with my patches and runned dejaGNU tests.

My patches are for both C and C++ (like CLANG).

Unlike CLANG, this option is not enabled by default (or GCC won't
bootstrap with -Werror).


Xi Ruoyao (5):
  Move char_type_p prototype into c-common.h
  c++: New warning option -Wstring-plus-int
  c: New warning option -Wstring-plus-int
  Document warning option -Wstring-plus-int
  New tests for option -Wstring-plus-int

 gcc/c-family/c-common.h                       |  3 +++
 gcc/c-family/c-warn.c                         | 34 ++++++++++++++++++++++++++
 gcc/c-family/c.opt                            |  5 ++++
 gcc/c/c-typeck.c                              | 32 +++++++++++++++++++++++-
 gcc/cp/call.c                                 | 35 +++++++++++++++++++++++++++
 gcc/cp/cp-tree.h                              |  1 -
 gcc/cp/tree.c                                 |  2 +-
 gcc/doc/invoke.texi                           |  8 +++++-
 gcc/testsuite/c-c++-common/Wstring-plus-int.c | 35 +++++++++++++++++++++++++++
 gcc/testsuite/g++.dg/Wstring-plus-int-1.C     | 20 +++++++++++++++
 gcc/testsuite/g++.dg/Wstring-plus-int-2.C     | 32 ++++++++++++++++++++++++
 gcc/testsuite/gcc.dg/Wstring-plus-int.c       | 17 +++++++++++++
 12 files changed, 220 insertions(+), 4 deletions(-)
 create mode 100644 gcc/testsuite/c-c++-common/Wstring-plus-int.c
 create mode 100644 gcc/testsuite/g++.dg/Wstring-plus-int-1.C
 create mode 100644 gcc/testsuite/g++.dg/Wstring-plus-int-2.C
 create mode 100644 gcc/testsuite/gcc.dg/Wstring-plus-int.c

-- 
Xi Ruoyao <ryxi@stu.xidian.edu.cn>
School of Aerospace Science and Technology, Xidian University

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-02-22 15:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-22 11:01 [PATCH 0/5] New warning: -Wstring-plus-int (PR c++/62181) Xi Ruoyao
2017-02-22 16:06 ` Jeff Law

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).