From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31063 invoked by alias); 20 Dec 2010 17:42:59 -0000 Received: (qmail 31011 invoked by uid 22791); 20 Dec 2010 17:42:57 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 20 Dec 2010 17:42:50 +0000 From: "joseph at codesourcery dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug other/46489] tree optimizer and frontend files use target macros X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: other X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: joseph at codesourcery dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Mon, 20 Dec 2010 17:42:00 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-12/txt/msg02385.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46489 --- Comment #6 from joseph at codesourcery dot com 2010-12-20 17:42:46 UTC --- On Mon, 20 Dec 2010, amylaar at gcc dot gnu.org wrote: > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46489 > > --- Comment #5 from Jorn Wolfgang Rennecke 2010-12-20 17:04:39 UTC --- > (In reply to comment #4) > > > This sounds like a nice approach for making sure it is safe to remove a > > tm.h include from a particular source file - if combined with generating a > > list of every target (every triplet with significant differences in how > > config.gcc / libgcc/config.host configure it, whether in the set of > > headers or the set of tm_defines) so you can run tests automatically for > > all targets - > > I fear our configure system is turing complete, and thus such a list is > not computable. One configuration for each case in config.gcc, at least, so that you cover every header that might go in tm_file (and every object in c_target_objs etc.). The effects of different macro values (such as the computation of FBSD_MAJOR from the target triplet for *-*-freebsd*) are less important. > But by testing at least one configuration per target architecture, we > already get a useful test coverage. > I can also make a script to search for every macro that is documented with > @defmac, so the remaining uncertainty would be for undocumented macros > that only appear in specific configuration variants. You could also check for every #define (note that some may have whitespace after the #) in config/*.h config/*/*.h.