Yahoo Groups archive

AVR-Chat

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

Thread

Re: [AVR-Chat] C useless error messages

Re: [AVR-Chat] C useless error messages

2008-02-28 by np np

This is due to the way C is parsed by the compiler.

The compiler throws a wobbly even in Visual C if the braces are unequal.

It goes to the end of the file if there is one missing.
Show quoted textHide quoted text
----- Original Message ----
From: avrx123456789 <AvrX@squakmt.com>
To: AVR-Chat@yahoogroups.com
Sent: Thursday, 28 February, 2008 3:11:15 PM
Subject: [AVR-Chat] C useless error messages

The problem of C's error messages being useless has existed in all the
C compilers I've ever used. That covers about a dozen compilers from
AVR's use of gcc to somewhat larger machines that process millions of
business transactions per day.

I have found that using a "lint" program helps a lot. Lint programs
are basically syntax checkers for your code. They tend to have much
better error messages than the compilers. So, I just stick a Lint
program in my make file and look at its output. Sometimes, I even
ignore the C compiler output.

There's also "bounds checker" programs, which are sometimes packaged
with a Lint. These can find bugs that go beyond syntax to execution.

I very highly recommend using both of these strategies for any code
that will go into production.

-Bob





      __________________________________________________________
Sent from Yahoo! Mail.
A Smarter Inbox. http://uk.docs.yahoo.com/nowyoucan.html

[Non-text portions of this message have been removed]

Re: [AVR-Chat] C useless error messages

2008-02-29 by Russell Shaw

np np wrote:
> This is due to the way C is parsed by the compiler.
> 
> The compiler throws a wobbly even in Visual C if the braces are unequal.
> 
> It goes to the end of the file if there is one missing.

Software is not clairvoyant, and the brackets are required for the
parser to know where it's at. Nothing else a compiler can do. It's
up to the programmer to be competent with parsing techniques.

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.