2008-01-25 H.J. Lu <hongjiu.lu@intel.com>
authorH.J. Lu <hjl.tools@gmail.com>
Fri, 25 Jan 2008 17:34:29 +0000 (17:34 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Fri, 25 Jan 2008 17:34:29 +0000 (17:34 +0000)
PR ld/5670
* ldlang.c (process_insert_statements): Silence gcc 4.1 alias
warning.

ld/ChangeLog
ld/ldlang.c

index ec540adc7a409ab00425d7283d5b618f80cd4d79..071e5b9902014d8f67cba0093aae50064038b693 100644 (file)
@@ -1,3 +1,9 @@
+2008-01-25  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR ld/5670
+       * ldlang.c (process_insert_statements): Silence gcc 4.1 alias
+       warning.
+
 2008-01-25  Alan Modra  <amodra@bigpond.net.au>
 
        * ld.texinfo (INSERT): Describe.
index de3f64b7fb08e2dd888cbec909223435db689d5b..7ef8838ae50407c71e0694e3e73c1783ee7814c4 100644 (file)
@@ -3390,19 +3390,26 @@ process_insert_statements (void)
          if (last_os != NULL)
            {
              asection *first_sec, *last_sec;
+             struct lang_output_section_statement_struct **next;
 
              /* Snip out the output sections we are moving.  */
              first_os->prev->next = last_os->next;
              if (last_os->next == NULL)
-               lang_output_section_statement.tail
-                 = (union lang_statement_union **) &first_os->prev->next;
+               {
+                 next = &first_os->prev->next;
+                 lang_output_section_statement.tail
+                   = (lang_statement_union_type **) next;
+               }
              else
                last_os->next->prev = first_os->prev;
              /* Add them in at the new position.  */
              last_os->next = where->next;
              if (where->next == NULL)
-               lang_output_section_statement.tail
-                 = (union lang_statement_union **) &last_os->next;
+               {
+                 next = &last_os->next;
+                 lang_output_section_statement.tail
+                   = (lang_statement_union_type **) next;
+               }
              else
                where->next->prev = last_os;
              first_os->prev = where;