Hello Everyone,
        Here are the fixes to the patches as mentioned by H. J. . I am not 
attaching the patch, just cut and pasting it.

Thanks,

Balaji V. Iyer.

Here is the cp/ChangeLog

2011-09-09  Balaji V. Iyer  <balaji.v.i...@intel.com>

        * decl2.c (finish_objects): Replaced finish_function (0) with
        finish_function (SF_PRE_PARSED).
        (finish_static_storage_duration_function): Likewise.
        * decl.c (end_cleanup_fn): Likewise.
        * method.c (synthesize_method): Likewise.
        * optimize.c (maybe_clone_body): Likewise.
        * pt.c (instantiate_decl): Likewise.
        * parser.c (cp_parser_function_definition_after_declarator): Replaced
        finish_function ((ctor_initializer_p ? 1 : 0) | (inline_p ? 2 : 0))
        with finish_function ((ctor_initializer_p ? SF_PRE_PARSED : SF_DEFAULT)
        | (inline_p ? SF_INCLASS_INLINE : SF_DEFAULT)).
        * parser.c (cp_parser_lambda_body): Replaced finish_function (2) with
        finish_function (SF_INCLASS_INLINE).
        * semantics.c (maybe_add_lambda_conv_op): Likewise.

Here is the objcp/ChangeLog

2011-09-09  Balaji V. Iyer  <balaji.v.i...@intel.com>

        * objcp-decl.c (objcp_finish_function): Replaced finish_function (0)
        with finish_function (SF_DEFAULT).


diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index eed4535..b92f13b 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -6540,7 +6540,7 @@ start_cleanup_fn (void)
 static void
 end_cleanup_fn (void)
 {
-  expand_or_defer_fn (finish_function (0));
+  expand_or_defer_fn (finish_function (SF_DEFAULT));
 
   pop_from_top_level ();
 }
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index f05b0f8..5b3bcc0 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -2775,7 +2775,7 @@ finish_objects (int method_type, int initp, tree body)
 
   /* Finish up.  */
   finish_compound_stmt (body);
-  fn = finish_function (0);
+  fn = finish_function (SF_DEFAULT);
 
   if (method_type == 'I')
     {
@@ -2917,7 +2917,7 @@ finish_static_storage_duration_function (tree body)
 {
   /* Close out the function.  */
   finish_compound_stmt (body);
-  expand_or_defer_fn (finish_function (0));
+  expand_or_defer_fn (finish_function (SF_DEFAULT));
 }
 
 /* Return the information about the indicated PRIORITY level.  If no
diff --git a/gcc/cp/method.c b/gcc/cp/method.c
index 5b24f8f..97213f1 100644
--- a/gcc/cp/method.c
+++ b/gcc/cp/method.c
@@ -767,7 +767,7 @@ synthesize_method (tree fndecl)
     }
 
   finish_function_body (stmt);
-  expand_or_defer_fn (finish_function (0));
+  expand_or_defer_fn (finish_function (SF_DEFAULT));
 
   input_location = save_input_location;
 
diff --git a/gcc/cp/optimize.c b/gcc/cp/optimize.c
index 6a06988..2e1c7b6 100644
--- a/gcc/cp/optimize.c
+++ b/gcc/cp/optimize.c
@@ -415,7 +415,7 @@ maybe_clone_body (tree fn)
       cp_function_chain->can_throw = !TREE_NOTHROW (fn);
 
       /* Now, expand this function into RTL, if appropriate.  */
-      finish_function (0);
+      finish_function (SF_DEFAULT);
       BLOCK_ABSTRACT_ORIGIN (DECL_INITIAL (clone)) = DECL_INITIAL (fn);
       if (alias)
        {
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index 7d766d1..3fc6c75 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -7904,7 +7904,7 @@ cp_parser_lambda_body (cp_parser* parser, tree 
lambda_expr)
     finish_lambda_scope ();
 
     /* Finish the function and generate code for it if necessary.  */
-    expand_or_defer_fn (finish_function (/*inline*/2));
+    expand_or_defer_fn (finish_function (SF_INCLASS_INLINE));
   }
 
   parser->local_variables_forbidden_p = local_variables_forbidden_p;
@@ -20091,8 +20091,8 @@ cp_parser_function_definition_after_declarator 
(cp_parser* parser,
   finish_lambda_scope ();
 
   /* Finish the function.  */
-  fn = finish_function ((ctor_initializer_p ? 1 : 0) |
-                       (inline_p ? 2 : 0));
+  fn = finish_function ((ctor_initializer_p ? SF_PRE_PARSED : SF_DEFAULT) |
+                       (inline_p ? SF_INCLASS_INLINE : SF_DEFAULT));
   /* Generate code for it, if necessary.  */
   expand_or_defer_fn (fn);
   /* Restore the saved values.  */
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 1f43ff1..8a79262 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -18286,7 +18286,7 @@ instantiate_decl (tree d, int defer_ok,
       local_specializations = saved_local_specializations;
 
       /* Finish the function.  */
-      d = finish_function (0);
+      d = finish_function (SF_DEFAULT);
       expand_or_defer_fn (d);
     }
 
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index f782df9..b416135 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -9043,7 +9043,7 @@ maybe_add_lambda_conv_op (tree type)
   finish_compound_stmt (compound_stmt);
   finish_function_body (body);
 
-  expand_or_defer_fn (finish_function (2));
+  expand_or_defer_fn (finish_function (SF_INCLASS_INLINE));
 
   /* Generate the body of the conversion op.  */
 
@@ -9057,7 +9057,7 @@ maybe_add_lambda_conv_op (tree type)
   finish_compound_stmt (compound_stmt);
   finish_function_body (body);
 
-  expand_or_defer_fn (finish_function (2));
+  expand_or_defer_fn (finish_function (SF_INCLASS_INLINE));
 
   if (nested)
     pop_function_context ();
diff --git a/gcc/objcp/objcp-decl.c b/gcc/objcp/objcp-decl.c
index ecc2b2b..7d5a045 100644
--- a/gcc/objcp/objcp-decl.c
+++ b/gcc/objcp/objcp-decl.c
@@ -82,7 +82,7 @@ objcp_finish_function (void)
 {
   /* The C++ flavor of 'finish_function' does not generate RTL -- one has
      to call 'expand_or_defer_fn' to do that.  */
-  expand_or_defer_fn (finish_function (0));
+  expand_or_defer_fn (finish_function (SF_DEFAULT));
 }
 
 tree


-----Original Message-----
From: Tobias Burnus [mailto:bur...@net-b.de] 
Sent: Friday, September 09, 2011 10:19 AM
To: H.J. Lu
Cc: Iyer, Balaji V; gcc-patches@gcc.gnu.org
Subject: Re: [Patch][Master] Finish function using absolute value not #define 
value

On 09/09/2011 03:55 PM, H.J. Lu wrote:
> 1.  Remove [Master] in your email subject.
> 2.  Put ChangeLog entries like:
 > http://gcc.gnu.org/ml/gcc-patches/2011-09/msg00615.html

3. Do not attach patches with
Content-Type: application/octet-stream

(Email programs usually set the content-type automatically to text/* for 
extensions like .diff or .patch or .txt)

If you have application/octet-stream, others have to save the patch to a file 
in order to view it and and it also makes it much harder to reply with comments 
to the patch.

Tobias

PS: Some middle-end maintainers prefer if patches are not attached to an email 
but rather included in the email body as it makes it easier (with some emails 
clients) to comment on the patch. If you do so, please ensure that the tabs and 
the linebreaks of the patch remain intact.

Reply via email to