How to add %' into gfc_fatal_error

Martin Liška mliska@suse.cz
Tue Mar 12 11:15:00 GMT 2019


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".
> 

Hi.

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?
Thanks,
Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Replace-can-t-in-error-messages-for-Fortran.patch
Type: text/x-patch
Size: 30699 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20190312/fe546df0/attachment.bin>


More information about the Fortran mailing list