Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

RE: [AVR-Chat] Re: Unable to get GCC to treat "implicit function delaration" as an error

2011-01-26 by Chuck Hackett

> From: Don Kinzer
> ....
> As I read the documentation, this option is superfluous if -Wall is given.
> 
> To get warnings to be treated as errors (probably a good idea), use
> -Werror.

With -Werror several compiles fail because of:

"c:/winavr-20100110/lib/gcc/../../avr/include/util/delay.h:90:3: warning: #warning
"Compiler optimizations disabled; functions from <util/delay.h> won't work as
designed"

Which I know but don't care until I compile with optimization after everything is
working.  I couldn't find a compiler directive to treat "#warning" as a warning in
the presence of "-Werror".

I tried removing "-Wall" leaving:

"-fms-extensions -Werror=implicit-function-declaration" and tried
"-fms-extensions -Werror-implicit-function-declaration"

but the implicit declarations were still not treated as an error.
 
Cheers,

Chuck Hackett
"Good judgment comes from experience, experience comes from bad judgment"
7.5" gauge Union Pacific Northern (4-8-4) 844 http://www.whitetrout.net/Chuck

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.