[PATCH util-macros 1/6] Fix the test for -Werror=attributes
Alan Coopersmith
alan.coopersmith at oracle.com
Tue Nov 1 14:39:47 PDT 2011
On 11/01/11 13:56, Jeremy Huddleston wrote:
> Thanks for the catch.
>
> I've also added -errwarn=E_NO_IMPLICIT_DECL_ALLOWED
>
> Do you want to add corresponding SunCC flags for the other -Werror=?
You mean the ones from patch 6 that you're suggesting to add to the
base flags, right?
Unfortunately, I don't know of any handy translation table for gcc -Werror=*
to Studio cc -errwarn=* flags, so I'm going to have to do some guessing here
based on the gcc docs I see at
http://gcc.gnu.org/onlinedocs/gcc-4.5.3/gcc/Warning-Options.html
+XORG_TESTSET_CFLAG(BASE_CFLAGS, -Werror=implicit)
Which gcc expands to -Wimplicit-int and -Wimplicit-function-declaration
So the Studio versions would be:
-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED
+XORG_TESTSET_CFLAG(BASE_CFLAGS, -Werror=nonnull)
That requires support for gcc's attribute(nonnull), which Studio doesn't have.
+XORG_TESTSET_CFLAG(BASE_CFLAGS, -Werror=init-self)
+XORG_TESTSET_CFLAG(BASE_CFLAGS, -Werror=main)
+XORG_TESTSET_CFLAG(BASE_CFLAGS, -Werror=missing-braces)
+XORG_TESTSET_CFLAG(BASE_CFLAGS, -Werror=sequence-point)
+XORG_TESTSET_CFLAG(BASE_CFLAGS, -Werror=trigraphs)
+XORG_TESTSET_CFLAG(BASE_CFLAGS, -Werror=array-bounds)
+XORG_TESTSET_CFLAG(BASE_CFLAGS, -Werror=address)
I don't see any Studio equivalent to these.
+XORG_TESTSET_CFLAG(BASE_CFLAGS, -Werror=return-type)
The closest I see is -errwarn=E_OLD_STYLE_DECL_OR_BAD_TYPE
and -errwarn=E_FUNC_HAS_NO_RETURN_STMT
+XORG_TESTSET_CFLAG(BASE_CFLAGS, -Werror=write-strings)
I've fixed a lot of those, but there's a lot unfixed, so I don't
think we're ready for this to be a fatal error in the default set.
I also don't see a Studio equivalent.
+XORG_TESTSET_CFLAG(BASE_CFLAGS, -Werror=int-to-pointer-cast)
+XORG_TESTSET_CFLAG(BASE_CFLAGS, -Werror=pointer-to-int-cast)
Looks like -errwarn=E_BAD_PTR_INT_COMBINATION
--
-Alan Coopersmith- alan.coopersmith at oracle.com
Oracle Solaris Platform Engineering: X Window System
More information about the xorg-devel
mailing list