Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src Use -Wno-error to compile a file with Duff's device and docu...



details:   https://anonhg.NetBSD.org/src/rev/c6da25a84356
branches:  trunk
changeset: 554353:c6da25a84356
user:      simonb <simonb%NetBSD.org@localhost>
date:      Mon Oct 27 07:26:17 2003 +0000

description:
Use -Wno-error to compile a file with Duff's device and document this as
a hack.

diffstat:

 doc/HACKS                          |  15 ++++++++++++++-
 sys/arch/pc532/conf/Makefile.pc532 |   5 ++++-
 sys/arch/pc532/conf/files.pc532    |   6 ++++--
 3 files changed, 22 insertions(+), 4 deletions(-)

diffs (70 lines):

diff -r 5d1071b12127 -r c6da25a84356 doc/HACKS
--- a/doc/HACKS Mon Oct 27 07:14:25 2003 +0000
+++ b/doc/HACKS Mon Oct 27 07:26:17 2003 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: HACKS,v 1.12 2003/10/26 16:35:18 mycroft Exp $
+# $NetBSD: HACKS,v 1.13 2003/10/27 07:26:17 simonb Exp $
 #
 # This file is intended to document workarounds for currently unsolved
 # (mostly) compiler bugs.
@@ -213,3 +213,16 @@
                newsyslog: config line 7: bad flags
        solved when compiled with -fno-gcse-lm
 kcah
+
+hack   gcc-pc532-duffs_device
+cdate  Mon Oct 27 07:23:05 UTC 2003
+who    simonb
+port   pc532
+file   sys/arch/pc532/conf/Makefile.pc532 : 1.71
+file   sys/arch/pc532/conf/files.pc532 : 1.52
+descr
+       gcc incorrectly gives an "unreachable code at beginning of switch
+       statement" for a Duff's device construct in arch/pc532/dev/ncr.c.
+       There is now way to disable just this warning, so -Wno-error is
+       turned on for this file.
+kcah
diff -r 5d1071b12127 -r c6da25a84356 sys/arch/pc532/conf/Makefile.pc532
--- a/sys/arch/pc532/conf/Makefile.pc532        Mon Oct 27 07:14:25 2003 +0000
+++ b/sys/arch/pc532/conf/Makefile.pc532        Mon Oct 27 07:26:17 2003 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.pc532,v 1.70 2002/07/09 12:55:47 simonb Exp $
+#      $NetBSD: Makefile.pc532,v 1.71 2003/10/27 07:26:17 simonb Exp $
 
 # Makefile for NetBSD
 #
@@ -50,6 +50,9 @@
 # egcs-1.1.2 bug fix; see doc/HACKS - egcs-pc532-ip6_mroute
 CC_OPT1=       ${NORMAL_C:C/-O[0-9]+/-O1/}
 
+# gcc-3.3.2 bug fix; see doc/HACKS - gcc-pc532-duffs_device
+CC_NOERROR=    ${NORMAL_C:C/-Werror/-Wno-error/}
+
 locore.o: ${PC532}/pc532/locore.s assym.h
        ${NORMAL_S}
 
diff -r 5d1071b12127 -r c6da25a84356 sys/arch/pc532/conf/files.pc532
--- a/sys/arch/pc532/conf/files.pc532   Mon Oct 27 07:14:25 2003 +0000
+++ b/sys/arch/pc532/conf/files.pc532   Mon Oct 27 07:26:17 2003 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: files.pc532,v 1.51 2003/07/27 01:19:29 thorpej Exp $
+#      $NetBSD: files.pc532,v 1.52 2003/10/27 07:26:17 simonb Exp $
 #
 # new style config file for pc532 architecture
 #
@@ -36,7 +36,8 @@
 
 device ncr: scsi, ncr5380sbc
 attach ncr at mainbus
-file   arch/pc532/dev/ncr.c            ncr needs-flag
+# gcc-3.3.2 bug fix; see doc/HACKS - gcc-pc532-duffs_device
+file   arch/pc532/dev/ncr.c            ncr needs-flag compile-with "${CC_NOERROR}"
 #device        aic: scsi
 #attach        aic at mainbus
 #file  arch/pc532/dev/aic.c            aic needs-flag
@@ -78,4 +79,5 @@
 # egcs-1.1.2 bug fix; see doc/HACKS - egcs-pc532-ip6_mroute
 file   netinet6/ip6_mroute.c           compile-with "${CC_OPT1}"
 
+
 include "arch/pc532/conf/majors.pc532"



Home | Main Index | Thread Index | Old Index