This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: How to add %' into gfc_fatal_error
- From: Martin Liška <mliska at suse dot cz>
- To: sgk at troutmask dot apl dot washington dot edu
- Cc: David Malcolm <dmalcolm at redhat dot com>, GCC Development <gcc at gcc dot gnu dot org>, Martin Sebor <msebor at gmail dot com>, fortran at gcc dot gnu dot org, GCC Patches <gcc-patches at gcc dot gnu dot org>, Alexander Monakov <amonakov at ispras dot ru>
- Date: Tue, 12 Mar 2019 16:09:37 +0100
- Subject: Re: How to add %' into gfc_fatal_error
- References: <aaf5a50d-b311-8fe6-c6ed-c26d432c9df5@suse.cz> <1552320475.18132.15.camel@redhat.com> <20190311172345.GA36938@troutmask.apl.washington.edu> <99e0d921-25b2-8e6e-2538-d2b39a305493@suse.cz> <20190312141733.GA67866@troutmask.apl.washington.edu>
On 3/12/19 3:17 PM, Steve Kargl wrote:
> On Tue, Mar 12, 2019 at 12:15:01PM +0100, Martin Liška wrote:
>> On 3/11/19 6:23 PM, Steve Kargl wrote:
>>> On Mon, Mar 11, 2019 at 12:07:55PM -0400, David Malcolm wrote:
>>>> On Mon, 2019-03-11 at 15:18 +0100, Martin Liška wrote:
>>>>> Hi.
>>>>>
>>>>> I would like to add %' into __gcc_gfc__ in order to handle:
>>>>>
>>>>> ./xgcc -B. /tmp/module.ii -Wformat -c
>>>>> /home/marxin/Programming/gcc/gcc/fortran/module.c: In function ‘void
>>>>> dump_module(const char*, int)’:
>>>>> /home/marxin/Programming/gcc/gcc/fortran/module.c:6205:19: warning:
>>>>> unknown conversion type character ‘'’ in format [-Wformat=]
>>>>> 6205 | gfc_fatal_error ("Can%'t delete module file %qs: %s",
>>>>> filename,
>>>>> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>>>>
>>>>> Can you please help me how to do that?
>>>
>>> Are you inserting "%" in front of "'"? Why?
>>> There are 18 occurences of "Can't" in gfc_error*
>>> messages in the fortran/*.c code. If you're going
>>> to touch all 18 locations, then change "Can't" to
>>> "Cannot".
>>
>> I'm addressing that with attached patch. The patch also touches Alexander's
>> note in a next email (i386.c change).
>>
>> Patch can bootstrap on x86_64-linux-gnu and survives regression tests.
>>
>> Ready to be installed?
>
> The Fortran parts are OK. The other parts look ok, but
Good.
> I don't know if I can approve those changes.
I'm going to install the patch as it's just a follow up of already
approved patches.
Martin