I hate conditionally compiled code :(

Many ports in config-list.mk are currently failing to build with -Werror because a recent varasm.c change introduces parameter that is conditionally not used.

One day we won't have these kinds of problems, or at least we'll have lot fewer of them.

I've verified the various ports from config-all.mk that just stopped building are building again with this patch applied:

hppa2.0-hpux10.1
hppa2.0-hpux11.9
m68k-openbsd
pdp11-aout
powerpc64-darwin
powerpc-darwin7
powerpc-darwin8
rs6000-ibm-aix4.3
rs6000-ibm-aix5.1.0
rs6000-ibm-aix5.2.0
rs6000-ibm-aix5.3.0
rs6000-ibm-aix6.0
vax-openbsd

An x86_64 bootstrap & regression test are in progress.

Committing as obvious.

Jeff
commit d92dbc67ffd5c1a77d12c427c313da2a513a3ed3
Author: law <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Date:   Wed Oct 21 04:57:56 2015 +0000

    [PATCH]Fix various ports failing due to unused parameter
    
        * varasm.c (handle_vtv_comdat_section): Mark 2nd parameter with
        ATTRIBUTE_UNUSED.
    
    git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229109 
138bc75d-0d04-0410-961f-82ee72b054a4

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 1c80d94..a626aa4 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2015-10-21  Jeff Law  <l...@redhat.com>
+
+       * varasm.c (handle_vtv_comdat_section): Mark 2nd parameter with
+       ATTRIBUTE_UNUSED.
+
 2015-10-21  Richard Biener  <rguent...@suse.de>
            Naveen H.S  <naveen.hurugalaw...@caviumnetworks.com>
 
diff --git a/gcc/varasm.c b/gcc/varasm.c
index 2b6da59..9cb7ac1 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -7747,7 +7747,7 @@ default_asm_output_ident_directive (const char *ident_str)
    a single call to "switch_to_section (sect)".  */
 
 static void
-handle_vtv_comdat_section (section *sect, const_tree decl)
+handle_vtv_comdat_section (section *sect, const_tree decl ATTRIBUTE_UNUSED)
 {
 #if defined (OBJECT_FORMAT_ELF)
   targetm.asm_out.named_section (sect->named.name,

Reply via email to