Ron <[EMAIL PROTECTED]> writes: > On Wed, Mar 15, 2006 at 09:04:19AM -0800, Ben Pfaff wrote: >> Ron <[EMAIL PROTECTED]> writes: >> >> The "realism" that Autoconf emphasizes is that if something works >> in a test, it should work later when compiling real code as >> well. -Werror goes far beyond that: it breaks the tests *and* >> the real code too. > > Yes. And if that is the level of strictness I choose to filter > my release code though, that is precisely what I want. > > The same would be true if I was to use -ansi or -pedantic for > some reason (not my cup of tea, I'd rather port GNU extensions > as required, but while they exist, people should be able to use > them).
You're free to compile your code with whatever options you like. I don't dispute that. But you can't expect everyone *else's* code to compile with those options, so you can't expect -Werror to work with Autoconf. >> > I'm not suggesting -Werror should be the default for autoconf, >> > just asking that it have a _chance_ of working, without something >> > as fundamental as an illegal (or at least non-standard) main() >> > function getting in the way. >> >> There is nothing illegal or non-standard about writing "int >> main() { return 0; }". If you think so, you clearly do not >> understand the C standard very well. > > That's not implausible, my brain mostly lives in C++ and forgets > the little differences too quickly. But I thought omitting the > void parameter in that case was deprecated, and accepted to be > pragmatic about existing code. It's an obsolescent form, but there's no indication when or if it will be removed from the language. Every compiler for C89 or C99 must accept it. >> Every standard C compiler, >> for both the old C89 and the current C99 standard, must accept >> the code above. > > Are they prohibited from warning? I don't own a copy of the standard > either. I'm usually more pragmatic coder than language lawyer. Any C compiler may warn about anything it likes. This is perfectly valid from a language point of view: foo.c:1: you have bad breath. Refusing to compile a program is different from issuing a diagnostic. >> I repeat: "int main()" is perfectly acceptable in all standard C >> variants, and GCC with -Werror is not a C compiler. > > As is int main(int,char**). The question is, what chokes on that, > which makes using it worse with the current generation of supported > compilers? Oh, so you'd rather get a pair of "unused argument argc" and "unused argument argv" errors instead? Not an improvement in my opinion. (C does not allow unnamed function arguments as does C++.) >> I do not have an upstream hat, but I disagree that this is a >> bug. If you want to take it to upstream, go ahead, but I will >> not do so for you. > > Ack. I'm not going to waste both our lives convincing you > of something you don't care to change. I'll feed it up the > line myself. If they have their reasons not to change it, > then so be it. OK. -- "It was then I realized how dire my medical situation was. Here I was, a network admin, unable to leave, and here was someone with a broken network. And they didn't ask me to fix it. They didn't even try to casually pry a hint out of me." --Ryan Tucker in the Monastery -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]