From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16021 invoked by alias); 2 Nov 2012 14:24:50 -0000 Received: (qmail 16010 invoked by uid 22791); 2 Nov 2012 14:24:49 -0000 X-SWARE-Spam-Status: No, hits=-4.5 required=5.0 tests=AWL,BAYES_20,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_SPAMHAUS_DROP,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-wg0-f51.google.com (HELO mail-wg0-f51.google.com) (74.125.82.51) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 02 Nov 2012 14:24:44 +0000 Received: by mail-wg0-f51.google.com with SMTP id ed3so1888115wgb.8 for ; Fri, 02 Nov 2012 07:24:43 -0700 (PDT) Received: by 10.180.77.38 with SMTP id p6mr2847412wiw.1.1351866283058; Fri, 02 Nov 2012 07:24:43 -0700 (PDT) Received: from [192.168.1.26] ([80.28.65.157]) by mx.google.com with ESMTPS id eq2sm2862101wib.1.2012.11.02.07.24.40 (version=SSLv3 cipher=OTHER); Fri, 02 Nov 2012 07:24:41 -0700 (PDT) Message-ID: <5093D738.5040907@gmail.com> Date: Fri, 02 Nov 2012 14:24:00 -0000 From: =?UTF-8?B?w4FuZ2VsIEdvbnrDoWxleg==?= User-Agent: Thunderbird MIME-Version: 1.0 To: John Steele Scott CC: Thomas Martitz , gcc-help@gcc.gnu.org Subject: Re: Using GCC to verify code has no "functional change". References: <55bd4057-6c89-4139-ad61-6f76f6bd793e@email.android.com> <5090C341.2070302@toojays.net> <5090C3F8.3090206@toojays.net> In-Reply-To: <5090C3F8.3090206@toojays.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2012-11/txt/msg00006.txt.bz2 On 31/10/12 07:23, John Steele Scott wrote: > This code has quite a few places where __LINE__ is used when building error > messages. The frmat change results in some line numbers changing, and so I still > need to eyeball the diff t ensure that only line numbers are different. > > I tried forcing __LINE__ to be a constant on the command line (with > -D__LINE__=0), but thatfails with ': error: "__LINE__" redefined'. You could replace all uses of __LINE__ with LINE, and then use -DLINE=__LINE__ in the normal build, and -DLINE=123 in the comparison one. Note however that in some cases __LINE__ is used to force macro-generated identifiers to be different, so if your code base does that you could end up with symbols defined multiple times when setting it to a constant. Regards