Path: csiph.com!eternal-september.org!feeder.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: [Solved] Need some help getting to my feet Date: Fri, 04 May 2018 11:00:01 -0700 Organization: None to speak of Lines: 22 Message-ID: References: <0db1659a-6249-47d0-8fab-baf080d32f76@googlegroups.com> <3vWGC.147526$pC1.7144@fx07.am4> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: reader02.eternal-september.org; posting-host="067bb2bcf7afe0ff6fbb1a4a3dfb8c90"; logging-data="10415"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/ezJV5LkJRRYI6feQSbTXG" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:6lYygV8jKDkowJlIwShMZaVhGJ4= sha1:tQ1FJCRlweevvNYMfa4li/leIHU= Xref: csiph.com comp.lang.c:130202 Keith Thompson writes: > bartc writes: [...] >> Yes, but ... suppose someone writes foo() by mistake. How is that >> going to be detected? > > It likely won't be detected by the compiler. gcc doesn't complain > by default, or with a reasonable set of command-line options. > There might be an option that will cause it to warn about it. > (clang, with reasonable options, warns about an incorrect call but > not about the declaration.) As David Brown points out, the option is "-Wstrict-prototypes" (which is not included in "-Wextra" or -Wall"). [...] -- Keith Thompson (The_Other_Keith) kst-u@mib.org Working, but not speaking, for JetHead Development, Inc. "We must do something. This is something. Therefore, we must do this." -- Antony Jay and Jonathan Lynn, "Yes Minister"