From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13798 invoked by alias); 14 Dec 2010 07:28:52 -0000 Received: (qmail 13789 invoked by uid 22791); 14 Dec 2010 07:28:51 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-qy0-f175.google.com (HELO mail-qy0-f175.google.com) (209.85.216.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 14 Dec 2010 07:28:46 +0000 Received: by qyk8 with SMTP id 8so4483100qyk.20 for ; Mon, 13 Dec 2010 23:28:45 -0800 (PST) MIME-Version: 1.0 Received: by 10.229.229.200 with SMTP id jj8mr4571305qcb.295.1292311725103; Mon, 13 Dec 2010 23:28:45 -0800 (PST) Received: by 10.229.75.70 with HTTP; Mon, 13 Dec 2010 23:28:45 -0800 (PST) In-Reply-To: References: <1291979498-1604-1-git-send-email-dodji@redhat.com> <1291979498-1604-5-git-send-email-dodji@redhat.com> <4D063157.3050901@gnu.org> Date: Tue, 14 Dec 2010 08:19:00 -0000 Message-ID: Subject: Re: [PATCH 3/6] Emit macro expansion related diagnostics From: Gabriel Dos Reis To: Dodji Seketeli Cc: Paolo Bonzini , gcc-patches@gcc.gnu.org, tromey@redhat.com, joseph@codesourcery.com, lopezibanez@gmail.com Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2010-12/txt/msg01068.txt.bz2 On Tue, Dec 14, 2010 at 1:19 AM, Dodji Seketeli wrote: > Paolo Bonzini writes: > >> >> test.c:5:14: error: invalid operands to binary<< =A0(have =91double=92 a= nd =91int=92) >> test.c:2:9: note: while expanding macro 'OPERATE' >> test.c:5:14: note: while expanding macro 'SHIFTL' >> test.c:8:3: note: while expanding macro 'MULT' >> test.c:13:3: note: expanded from here >> > > In the absence of caret diagnostic I think it is useful to explicitely > make the difference between a location in the definition of the macro, > and the location of the macro expansion point, i.e: Agreed. But I also agree with Paolo's observation: the prefix ": no= te" has to precede the diagnostic message. I know there are other compilers that do it differently, but GCC convention has been to precede diagnostics with loci -- until we move to 2-dimensional diagnostic display (what is sometimes referred to as diagnostics with carets). -- Gaby