This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PR libfortran/62768] Handle filenames with embedded nulls
- From: Janne Blomqvist <blomqvist dot janne at gmail dot com>
- To: Hans-Peter Nilsson <hp at bitrange dot com>
- Cc: FX <fxcoudert at gmail dot com>, Fortran List <fortran at gcc dot gnu dot org>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 30 Sep 2014 23:12:15 +0300
- Subject: Re: [PR libfortran/62768] Handle filenames with embedded nulls
- Authentication-results: sourceware.org; auth=none
- References: <CAO9iq9E75dJ2AEMfnB_Ro68FBEpYz=BjS2-fxqWNUznbCtpH+Q at mail dot gmail dot com> <CAO9iq9GP7x_sYFAzRYZryw8LEJxSBY_nrXcHHQG+BQPGJTFcZQ at mail dot gmail dot com> <F7035948-4928-4A65-90DF-1B12D7316FEB at gmail dot com> <CAO9iq9EENvbr-BSEOPZeV9325xn8=GX02z8y46_6cvHvL9-weg at mail dot gmail dot com> <alpine dot BSF dot 2 dot 02 dot 1409170720140 dot 97960 at arjuna dot pair dot com> <CAO9iq9H2ApQJP-k0a3A-MOGGqPvaGNd1UMhBy2NahfUTGnKNqw at mail dot gmail dot com> <alpine dot BSF dot 2 dot 02 dot 1409171203330 dot 89896 at arjuna dot pair dot com> <alpine dot BSF dot 2 dot 02 dot 1409171424450 dot 96402 at arjuna dot pair dot com> <alpine dot BSF dot 2 dot 02 dot 1409171634100 dot 96402 at arjuna dot pair dot com> <CAO9iq9GRf9z3538RbDxv6_E5gcC7JC08kBynpYSf3mbfauYfrQ at mail dot gmail dot com> <alpine dot BSF dot 2 dot 02 dot 1409171753590 dot 96402 at arjuna dot pair dot com> <CAO9iq9Ez0-vrHsBhy-YHmLQ6KmwNmxAqgAtLOZS_3-soCsOZoQ at mail dot gmail dot com> <alpine dot BSF dot 2 dot 02 dot 1409172151260 dot 83306 at arjuna dot pair dot com> <alpine dot BSF dot 2 dot 02 dot 1409180401530 dot 54493 at arjuna dot pair dot com> <CAO9iq9FPrhaXvcoGeY4cXmCEspLVAD93_OnV+=cP4f7do4RjjA at mail dot gmail dot com> <alpine dot BSF dot 2 dot 02 dot 1409181624570 dot 1162 at arjuna dot pair dot com>
On Thu, Sep 18, 2014 at 11:33 PM, Hans-Peter Nilsson <hp@bitrange.com> wrote:
> On Thu, 18 Sep 2014, Janne Blomqvist wrote:
>> > If you look back at the patch I posted, there's a
>> > typo. :-} Duly warned about, but I'd rather expect the build to
>> > fail.
>>
>> Yes, strange that it didn't fail. There's no prototype for cf_fstrcpy,
>> and since we use std=gnu11 prototypes should be mandatory. Also, since
>> there's no symbol called cf_fstrcpy so at least the linking should
>> fail. Unless the link picked up some old inquire.o file?
>
> For closure: no linking certainly *did* fail and no executable
> was created for those tests; failing linking correctly counts as
> a fail too.
>
>> > Apparently libgfortran is not compiled with -Werror, at least
>> > not for crosses. Maybe -Werror is there for native but I'm not
>> > sure as I see some "warning: array subscript has type 'char'
>> > [-Wchar-subscripts]" which seems generic and also some others.
>> > Though no more than can be fixed or excepted, IMHO.
>>
>> No, Werror isn't used. It was tried, but apparently caused issues.
>
> 'k. Maybe -Werror=implicit-function-declaration is a middle
> way.
Good idea. I committed r215741 as obvious which adds this to the compile flags.
I'm sure there are other warnings that can be enabled with -Werror=...
in a similar fashion, but this is a start at least. Another approach
would be to enable -Werror if some conditions are met. Such as
- native build
- --enable-maintainer-mode
- glibc target
I'm not in the mood to torture myself with autofoo to do this ATM, but
food for thought..
--
Janne Blomqvist