From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32119 invoked by alias); 22 Apr 2009 19:14:50 -0000 Received: (qmail 31983 invoked by uid 22791); 22 Apr 2009 19:14:49 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_PASS,WEIRD_PORT X-Spam-Check-By: sourceware.org Received: from mail-ew0-f157.google.com (HELO mail-ew0-f157.google.com) (209.85.219.157) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 22 Apr 2009 19:14:44 +0000 Received: by ewy1 with SMTP id 1so154986ewy.8 for ; Wed, 22 Apr 2009 12:14:39 -0700 (PDT) Received: by 10.210.66.13 with SMTP id o13mr104729eba.49.1240427679576; Wed, 22 Apr 2009 12:14:39 -0700 (PDT) Received: from ?82.6.108.62? (cpc2-cmbg8-0-0-cust61.cmbg.cable.ntl.com [82.6.108.62]) by mx.google.com with ESMTPS id 5sm729039eyh.10.2009.04.22.12.14.38 (version=SSLv3 cipher=RC4-MD5); Wed, 22 Apr 2009 12:14:38 -0700 (PDT) Message-ID: <49EF6F29.2000601@gmail.com> Date: Wed, 22 Apr 2009 19:14:00 -0000 From: Dave Korn User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: java-patches@gcc.gnu.org Subject: [RFC] Fix PR38892: "--enable-libgcj-debug" breaks bootstrap. Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Mailing-List: contact java-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-patches-owner@gcc.gnu.org X-SW-Source: 2009-q2/txt/msg00024.txt.bz2 [ Not subbed, please CC me on replies. ] Hello Java team, This is the second point at which bootstrap fails for me with libgcj debug-enabled: In file included from /gnu/gcc/gcc/libjava/gnu/classpath/natConfiguration.cc:17: /gnu/gcc/gcc/libjava/gnu/classpath/Configuration.h:32: error: expected unqualified-id before numeric constant make[3]: *** [gnu/classpath/natConfiguration.lo] Error 1 If you look at the relevant source: 21 class gnu::classpath::Configuration : public ::java::lang::Object 22 { 23 24 Configuration(); 25 static ::java::lang::String * classpath_home(); 26 static jboolean debug(); 27 static ::java::lang::String * toolkit(); 28 static ::java::lang::String * ecj(); 29 public: 30 static ::java::lang::String * CLASSPATH_HOME; 31 static ::java::lang::String * CLASSPATH_VERSION; 32 static jboolean DEBUG; ... you can probably guess immediately what went wrong: 8592 static jboolean 1; owing to a "#define DEBUG 1" in include/config.h, autogenerated by configure. So there's a preprocessor macro DEBUG that is tested by #ifdefs in classpath/native and the toplevel intepret*.cc files, and there are a number of these DEBUG member vars scattered through the java sources. One solution that occurred to me was to rename the preprocesser macro to (e.g.) "__GCJ_DEBUG" throughout. Another solution that occurred to me was to rename the java class members to (e.g.) "JDEBUG" throughout. What would the maintainers prefer? Either, both, or perhaps some other option? cheers, DaveK