[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: -Werror flag set unconditionally

From: Arfrever Frehtes Taifersar Arahesis <arfrever.fta_at_gmail.com>
Date: Thu, 20 Dec 2012 04:31:02 +0100

2012-12-20 03:39:30 Branko Čibej napisał(a):
> I found the following in configure.ac which unconditionally adds a
> -Werror flag:
>
> dnl Add -Werror=implicit-function-declaration to CFLAGS
> CFLAGS_KEEP="$CFLAGS"
> CFLAGS="$CFLAGS_KEEP -Werror=implicit-function-declaration"
> AC_COMPILE_IFELSE([AC_LANG_SOURCE([[]])], [CFLAGS_KEEP="$CFLAGS"])
> CFLAGS="$CFLAGS_KEEP"
>
>
> I'm almost sure this should only be done in maintainer-mode?

-Werror != -Werror=implicit-function-declaration
We want to always use -Werror=implicit-function-declaration (if compiler supports it) to ensure that nobody forgets
to include required headers. (Implicit function declarations are always illegal in C++, so this flag is needed only
in CFLAGS.)

-- 
Arfrever Frehtes Taifersar Arahesis

Received on 2012-12-20 04:32:05 CET

This is an archived mail posted to the Subversion Dev mailing list.