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

Issue 5677058: [pph] Merge inline function definitions. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 2 months ago by Lawrence Crowl
Modified:
11 years, 10 months ago
Reviewers:
Diego Novillo
CC:
gcc-patches_gcc.gnu.org
Base URL:
svn+ssh://gcc.gnu.org/svn/gcc/branches/pph/
Visibility:
Public.

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+233 lines, -58 lines) Patch
M gcc/cp/pph-in.c View 8 chunks +171 lines, -55 lines 0 comments Download
A gcc/testsuite/g++.dg/pph/x0funcinl1.h View 1 chunk +8 lines, -0 lines 0 comments Download
A gcc/testsuite/g++.dg/pph/x0funcinl2.h View 1 chunk +9 lines, -0 lines 0 comments Download
A gcc/testsuite/g++.dg/pph/x0funcinl3.h View 1 chunk +14 lines, -0 lines 0 comments Download
A gcc/testsuite/g++.dg/pph/x3funcinl12.cc View 1 chunk +7 lines, -0 lines 0 comments Download
A gcc/testsuite/g++.dg/pph/x3funcinl13.cc View 1 chunk +7 lines, -0 lines 0 comments Download
A gcc/testsuite/g++.dg/pph/x4funcinl21.cc View 1 chunk +7 lines, -0 lines 0 comments Download
A gcc/testsuite/g++.dg/pph/x4funcinl31.cc View 1 chunk +7 lines, -0 lines 0 comments Download
M gcc/testsuite/lib/dg-pph.exp View 3 chunks +3 lines, -3 lines 0 comments Download

Messages

Total messages: 3
Lawrence Crowl
This patch merges inline functions where a plain declaration is read from a pph file ...
12 years, 2 months ago (2012-02-15 22:50:20 UTC) #1
Diego Novillo
With this patch, I'm getting: gcc/cp/pph-in.c: In function 'tree_node* pph_in_tree(pph_stream*)': gcc/cp/pph-in.c:1694:70: error: 'decl_declared_inline' may be ...
12 years, 2 months ago (2012-02-16 22:14:14 UTC) #2
Lawrence Crowl
12 years, 2 months ago (2012-02-16 23:56:57 UTC) #3
On 2/16/12, Diego Novillo <dnovillo@google.com> wrote:
> With this patch, I'm getting:
>
> gcc/cp/pph-in.c: In function 'tree_node* pph_in_tree(pph_stream*)':
> gcc/cp/pph-in.c:1694:70: error: 'decl_declared_inline' may be used
> uninitialized in this function
> [-Werror=maybe-uninitialized]gcc/cp/pph-in.c:1644:8: note:
> 'decl_declared_inline' was declared here
> gcc/cp/pph-in.c:1683:75: error: 'decl_comdat_group' may be used
> uninitialized in this function
> [-Werror=maybe-uninitialized]gcc/cp/pph-in.c:1643:8: note:
> 'decl_comdat_group' was declared here
> gcc/cp/pph-in.c:1682:50: error: 'decl_comdat' may be used
> uninitialized in this function
> [-Werror=maybe-uninitialized]gcc/cp/pph-in.c:1642:8: note:
> 'decl_comdat' was declared here
> cc1plus: all warnings being treated as errors
> make: *** [cp/pph-in.o] Error 1
>
> Could you take a look?

This patch avoids a false "used unititalized" error by assigning
values soon to be overwritten.

Tested on x64.

Index: gcc/cp/ChangeLog.pph

2012-02-16   Lawrence Crowl  <crowl@google.com>

	* pph-in.c (pph_in_merge_lang_indep_tree_body): Avoid a false "used
	uninitialized" error message.

Index: gcc/cp/pph-in.c
===================================================================
--- gcc/cp/pph-in.c	(revision 184290)
+++ gcc/cp/pph-in.c	(working copy)
@@ -1639,10 +1639,10 @@ static void
 pph_in_merge_lang_indep_tree_body (pph_stream *stream, tree expr)
 {
   enum tree_code code = TREE_CODE (expr);
-  bool decl_comdat;
-  tree decl_comdat_group;
-  bool decl_declared_inline;
-  tree decl_result;
+  bool decl_comdat = false;
+  tree decl_comdat_group = NULL;
+  bool decl_declared_inline = false;
+  tree decl_result = NULL;

   if (CODE_CONTAINS_STRUCT (code, TS_DECL_WITH_VIS))
     {

-- 
Lawrence Crowl
Sign in to reply to this message.

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