[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-gnulib] Re: gcc options for testing dist?
From: |
Simon Josefsson |
Subject: |
[Bug-gnulib] Re: gcc options for testing dist? |
Date: |
Sun, 28 Mar 2004 11:31:14 +0200 |
User-agent: |
Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux) |
address@hidden (Karl Berry) writes:
> What gcc options do you-all recommend when testing a distribution
> (before releasing it)?
I went over the GCC manual some time ago and settled with:
CFLAGS="-g -O -W -Wall -Wunused -Wno-unused-parameter
-Wimplicit-function-declaration -Wcomment -Wchar-subscripts -Wimplicit-int
-Wimplicit -Wmain -Wreturn-type -Wswitch -Wtrigraphs -Wunknown-pragmas
-Wmultichar -Wfloat-equal -Wpointer-arith -Wbad-function-cast -Wcast-align
-Wsign-compare -Waggregate-return -Wmissing-prototypes -Wmissing-declarations
-Wno-deprecated-declarations -Wpacked -Wpadded -Wnested-externs -Winline
-Wlong-long -Wparentheses -Wsequence-point -Wmissing-braces"
But I usually test with "-ansi -pedantic" as well, and test on a few
non-GCC compilers too (Sun, HP-UX, IRIX, AIX). My main problem with
"-ansi -pedantic" is that it (I think) gives warning about absent
initializers when declaring constant structs (such fields should,
IIRC, by the standard always be initialized to 0).