Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(114)

Issue 4442075: [google] Port self-assign warning to google/main branch (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 2 months ago by Le-Chun Wu
Modified:
13 years, 2 months ago
Reviewers:
Diego Novillo
CC:
gcc-patches_gcc.gnu.org
Visibility:
Public.

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+742 lines, -37 lines) Patch
M gcc/c-family/c.opt View 1 chunk +4 lines, -0 lines 0 comments Download
M gcc/c-family/c-common.h View 1 chunk +1 line, -0 lines 0 comments Download
M gcc/c-family/c-common.c View 1 chunk +17 lines, -0 lines 0 comments Download
M gcc/c-parser.c View 2 chunks +12 lines, -1 line 0 comments Download
M gcc/common.opt View 1 chunk +4 lines, -0 lines 0 comments Download
M gcc/cp/init.c View 1 chunk +8 lines, -2 lines 0 comments Download
M gcc/cp/parser.c View 3 chunks +24 lines, -0 lines 0 comments Download
gcc/doc/invoke.texi View 3 chunks +61 lines, -2 lines 0 comments Download
M gcc/fold-const.c View 13 chunks +127 lines, -26 lines 0 comments Download
M gcc/testsuite/g++.dg/plugin/selfassign.c View 2 chunks +2 lines, -2 lines 0 comments Download
A gcc/testsuite/g++.dg/warn/Wself-assign-1.C View 1 chunk +54 lines, -0 lines 0 comments Download
A gcc/testsuite/g++.dg/warn/Wself-assign-2.C View 1 chunk +31 lines, -0 lines 0 comments Download
A gcc/testsuite/g++.dg/warn/Wself-assign-3.C View 1 chunk +35 lines, -0 lines 0 comments Download
A gcc/testsuite/g++.dg/warn/Wself-assign-4.C View 1 chunk +48 lines, -0 lines 0 comments Download
A gcc/testsuite/g++.dg/warn/Wself-assign-5.C View 1 chunk +38 lines, -0 lines 0 comments Download
A gcc/testsuite/g++.dg/warn/Wself-assign-non-pod-1.C View 1 chunk +54 lines, -0 lines 0 comments Download
A gcc/testsuite/g++.dg/warn/Wself-assign-non-pod-2.C View 1 chunk +31 lines, -0 lines 0 comments Download
A gcc/testsuite/g++.dg/warn/Wself-assign-non-pod-3.C View 1 chunk +35 lines, -0 lines 0 comments Download
A gcc/testsuite/g++.dg/warn/Wself-assign-non-pod-4.C View 1 chunk +48 lines, -0 lines 0 comments Download
A gcc/testsuite/g++.dg/warn/Wself-assign-non-pod-5.C View 1 chunk +38 lines, -0 lines 0 comments Download
M gcc/testsuite/gcc.dg/plugin/selfassign.c View 2 chunks +2 lines, -2 lines 0 comments Download
A gcc/testsuite/gcc.dg/wself-assign-1.c View 1 chunk +27 lines, -0 lines 0 comments Download
A gcc/testsuite/gcc.dg/wself-assign-2.c View 1 chunk +24 lines, -0 lines 0 comments Download
M gcc/tree.h View 4 chunks +17 lines, -2 lines 0 comments Download

Messages

Total messages: 4
Le-Chun Wu
2011-04-22 Le-Chun Wu <lcwu@google.com> gcc/c-family/ChangeLog: * c-common.c (check_for_self_assign): New function. * c-common.h: New function declaration. ...
13 years, 2 months ago (2011-04-22 20:08:16 UTC) #1
Le-Chun Wu
Hi Diego, This patch is to port self-assign warning to the google/main branch. Bootstrapped and ...
13 years, 2 months ago (2011-04-22 20:10:44 UTC) #2
Le-Chun Wu
This patch ports the implementation of -Wself-assign warning from a GCC-4.4.3 based tree to google/main ...
13 years, 2 months ago (2011-04-22 20:41:28 UTC) #3
Diego Novillo
13 years, 2 months ago (2011-04-26 12:58:56 UTC) #4
On Fri, Apr 22, 2011 at 16:08, Le-Chun Wu <lcwu@google.com> wrote:
> 2011-04-22  Le-Chun Wu  <lcwu@google.com>
>
> gcc/c-family/ChangeLog:
>        * c-common.c (check_for_self_assign): New function.
>        * c-common.h: New function declaration.
>        * c.opt: New option.
>
> gcc/ChangeLog:
>        * c-parser.c (c_parser_declaration_or_fndef): Check for self-assign.
>        (c_parser_expr_no_commas): Check for self-assign.
>        * common.opt: New option.
>        * doc/invoke.texi: Documentation for new options.
>        * fold-const.c (operand_equal_p): Allow operands without typres to
>        compare.
>        (fold_unary_loc_1): Renamed from fold_unary_loc.
>        (fold_unary_loc): New wrapper function.
>        (fold_binary_loc_1): Renamed from fold_binary_loc.
>        (fold_binary_loc): New wrapper function.
>        (fold_ternary_loc_1): Renamed from fold_ternary_loc.
>        (fold_ternary_loc): New wrapper function.
>        * tree.h (struct tree_base): New flag for folded expr.
>        (enum operand_equal_flag): New flags.
>
> gcc/cp/ChangeLog:
>        * init.c (perform_member_init): Check for self-assign.
>        * parser.c (expr_is_pod): New function.
>        (cp_parser_assignment_expression): Check for self-assign.
>        (cp_parser_init_declarator): Check for self-assign.
>
> gcc/testsuite/ChangeLog:
>        * testsuite/g++.dg/plugin/selfassign.c (check_self_assign): Renamed
>        from warn_self_assign.
>        (execute_warn_self_assign): Call a function by its new name.
>        * testsuite/g++.dg/warn/Wself-assign-1.C: New test case.
>        * testsuite/g++.dg/warn/Wself-assign-2.C: Likewise.
>        * testsuite/g++.dg/warn/Wself-assign-3.C: Likewise.
>        * testsuite/g++.dg/warn/Wself-assign-4.C: Likewise.
>        * testsuite/g++.dg/warn/Wself-assign-5.C: Likewise.
>        * testsuite/g++.dg/warn/Wself-assign-non-pod-1.C: Likewise.
>        * testsuite/g++.dg/warn/Wself-assign-non-pod-2.C: Likewise.
>        * testsuite/g++.dg/warn/Wself-assign-non-pod-3.C: Likewise.
>        * testsuite/g++.dg/warn/Wself-assign-non-pod-4.C: Likewise.
>        * testsuite/g++.dg/warn/Wself-assign-non-pod-5.C: Likewise.
>        * testsuite/gcc.dg/plugin/selfassign.c (check_self_assign): Renamed
>        from warn_self_assign.
>        (execute_warn_self_assign): Call a function by its new name.:
>        * testsuite/gcc.dg/wself-assign-1.c: New test case.
>        * testsuite/gcc.dg/wself-assign-2.c: Likewise.

OK.


Diego.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b