Patrice Dumas wrote:
>> Is elektra currently portable to any other compiler than gcc? Besides, 
>> people who use a different compiler 1) are in the minority, and 2) know 
>> how to turn off -Wall.
> 
> I'd be curious to know how you do that... It is in AM_CFLAGS or even
> in *_la_*CFLAGS.

I don't know. I use gcc :). Besides, I try to keep my hands as far away 
from auto* as possible.

>  
>> Besides, having -Wall there serves a red flag for anyone compiling on a 
>> compiler which doesn't support it -- it means their compiler isn't 
>> explicitly supported and that they should beware.
> 
> Using the autotools allow the easy support of any compiler. Supporting
> new target is less obvious, but I don't see why we should complicate
> the task of those who want to use another compiler.
> 
>> Why? Warnings are things that should always be fixed or at the very 
>> least done explicitly(*) to avoid confusion about the programmer's intent.
> 
> I'm not the one to be convinced, look at my other mails. That's a separate 
> issue, though.
> 
>>  > For example a
>>>   user may ant to set -Werror but not -Wall
>> If they're going to set -Werror, they'll have to mess with CFLAGS anyway...
> 
> I really can't see why. They'll have to set the CFLAGS, but for the whole
> build, not per Makefile.am. They shouldn't have to modify the Makefile.am.
> Currently, not using -Wall means editing a lot of Makefile.am.
> 

Won't

    CFLAGS=blah ./configure ...

work? I've used that before, but admittedly it's been a long time since 
I've have to tweak the build process in such a way.

>> Well, I think removing -Wall is a Bad Idea. -Wall is a sensible default 
>> and I would want a much stronger argument than you've given for removing 
>> it. It doesn't prevent code from compiling, and we actually don't WANT 
>> code to compile when -Wall is not supported -- we want the developer 
> 
> Why "we actually don't WANT code to compile when -Wall is not supported"?

Because the compiler could have legitimate grounds for complaint that 
might go unnoticed. Example: The "Return value is ignored" warning from 
gcc 4.1.1 could highlight serious security problems which might 
otherwise go unnoticed. Consider how easy it is to accidentally forget 
checking return values of system calls like setuid().

> There were quite a lot of warnings with gcc 4.1.1.

So? Let's fix the warnings instead of just ignoring them wholesale.

> In case -Wall is to be the default, at least it should be hardcoded 
> in configure.ac, not scattered around in Makefile.am files. Would 
> that be acceptable?

Indeed. It should be in one place and one place only.

-- 
Bardur Arantsson
<[EMAIL PROTECTED]>

- Did you sleep well?
- No, I made a couple of mistakes.
                                                     Steven Wright


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Registry-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/registry-list

Reply via email to