From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 77459 invoked by alias); 15 May 2015 11:48:14 -0000 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 Received: (qmail 77417 invoked by uid 89); 15 May 2015 11:48:09 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_40,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-wi0-f177.google.com Received: from mail-wi0-f177.google.com (HELO mail-wi0-f177.google.com) (209.85.212.177) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Fri, 15 May 2015 11:48:08 +0000 Received: by wibt6 with SMTP id t6so54793401wib.0 for ; Fri, 15 May 2015 04:48:05 -0700 (PDT) X-Received: by 10.194.192.166 with SMTP id hh6mr12179051wjc.127.1431690485144; Fri, 15 May 2015 04:48:05 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.103.70 with HTTP; Fri, 15 May 2015 04:47:24 -0700 (PDT) In-Reply-To: <86mw16utdv.fsf@redhat.com> References: <86h9rogn3z.fsf@redhat.com> <86mw16utdv.fsf@redhat.com> From: =?UTF-8?B?TWFudWVsIEzDs3Blei1JYsOhw7Fleg==?= Date: Fri, 15 May 2015 12:23:00 -0000 Message-ID: Subject: Re: [PATCH diagnostics/fortran] Handle two locations for the same diagnostic. Convert all gfc_warning_1 and gfc_notify_std_1 calls To: Dodji Seketeli Cc: Gcc Patch List Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-SW-Source: 2015-05/txt/msg01395.txt.bz2 On 15 May 2015 at 10:39, Dodji Seketeli wrote: > Manuel L=C3=B3pez-Ib=C3=A1=C3=B1ez writes: >> -/* Expand the location of this diagnostic. Use this function for consis= tency. */ >> +/* Return the location associated to this diagnostic. WHICH specifies > > Here, I think only the 'W' (in WHICH) should be uppercase. I'm following the convention that parameter names are uppercase in the description of functions. I can also say "Parameter WHICH specifies" to be more explicit. >> /* The type of a text to be formatted according a format specification >> along with a list of things. */ >> struct text_info >> { >> +public: > > As this is a struct, the 'public' here is not necessary, as the members > are public by default. I have a very poor memory for such details ;), since we are using 'private:' already, does it really hurt to be explicit and use 'public:' here? >> const char *format_spec; >> va_list *args_ptr; >> int err_no; /* for %m */ >> - location_t *locus; >> void **x_data; >> + >> + inline location_t & set_location (unsigned int index_of_location) > > I think it's less surprising to have the this function take two > parameters: The index_of_location and the new new location. OK. > OK to commit with the changes above. Thanks. If you insist on the two first changes, I'll do them, I just want to confirm those. Cheers, Manuel.