On Thu, Sep 18, 2014 at 11:33 PM, Hans-Peter Nilsson <h...@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