From patchwork Wed Jul 28 21:20:14 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roland McGrath X-Patchwork-Id: 60177 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id F15E7B6EEF for ; Thu, 29 Jul 2010 07:20:26 +1000 (EST) Received: (qmail 6399 invoked by alias); 28 Jul 2010 21:20:22 -0000 Received: (qmail 6390 invoked by uid 22791); 28 Jul 2010 21:20:22 -0000 X-SWARE-Spam-Status: No, hits=-4.4 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_HI, SPF_HELO_PASS, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 28 Jul 2010 21:20:17 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o6SLKFY0004790 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 28 Jul 2010 17:20:15 -0400 Received: from patootie.office.frob.com ([10.3.121.2]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o6SLKF9J021365 for ; Wed, 28 Jul 2010 17:20:15 -0400 Received: from magilla.sf.frob.com (magilla.office.frob.com [198.49.250.228]) by patootie.office.frob.com (Postfix) with ESMTP id 018DD263; Wed, 28 Jul 2010 14:20:14 -0700 (PDT) Received: by magilla.sf.frob.com (Postfix, from userid 5281) id 1E5D9400DE; Wed, 28 Jul 2010 14:20:14 -0700 (PDT) MIME-Version: 1.0 From: Roland McGrath To: gcc-patches@gcc.gnu.org Subject: [PATCH] include macro name in "ISO C99 requires rest arguments to be used" Message-Id: <20100728212014.1E5D9400DE@magilla.sf.frob.com> Date: Wed, 28 Jul 2010 14:20:14 -0700 (PDT) Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org The libcpp -pedantic warning "ISO C99 requires rest arguments to be used" does not say which macro it refers to, which can make it harder than necessary to navigate a deep nest of macros to find the problem. Include the macro name in the error message. Thanks, Roland libcpp/ 2010-07-28 Roland McGrath * macro.c (_cpp_arguments_ok): Include macro name in -pedantic warning. diff --git a/libcpp/macro.c b/libcpp/macro.c index 31de415..0000000 100644 --- a/libcpp/macro.c +++ b/libcpp/macro.c @@ -562,7 +562,8 @@ _cpp_arguments_ok (cpp_reader *pfile, cp { if (CPP_PEDANTIC (pfile) && ! macro->syshdr) cpp_error (pfile, CPP_DL_PEDWARN, - "ISO C99 requires rest arguments to be used"); + "macro %s: ISO C99 requires rest arguments to be used", + NODE_NAME (node)); return true; }