Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C > Should embedded...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 21 Topic 25742 of 27343
Post > Topic >>

Should embedded systems compilers be trusted

by =?ISO-8859-1?Q?Tom=E1s_=D3_h=C9ilidhe?= <toe@[EMAIL PROTECTED] > Apr 20, 2008 at 04:18 AM

There are a few guarantees I exploit in the C Standard. For instance,
I might write

    (unsigned)-1

to get the maximum value for an unsigned integer.

Also, I might rely on things such as:

    memset(data,-1,sizeof data)

to set all bits in a chunk of memory to 1.

I'm using an embedded systems compiler now though and I'm hesitant to
trust it with things like this. I've already come across the following
quirks:

1) You can't define a variable as const unless it can be put in the
chip's ROM.
2) There's no stack used by default; you must define a function as
"reentrant" if you want a stack.

To the people here who have experience with embedded systems C
compilers, how do you feel about trusting its C compliance? Some
issues I'd be concerned about are:

1) int being at least 16-Bit
2) long being at least 32-Bit
3) Compliant conversion between signed and unsigned types

I'm using the PIC C compiler to program the PIC16F684 chip.
 




 21 Posts in Topic:
Should embedded systems compilers be trusted
=?ISO-8859-1?Q?Tom=E1s_=D  2008-04-20 04:18:56 
Re: Should embedded systems compilers be trusted
"Bill Leary" &l  2008-04-20 08:16:43 
Re: Should embedded systems compilers be trusted
Barry Schwarz <schwarz  2008-04-20 11:28:46 
Re: Should embedded systems compilers be trusted
roberson@[EMAIL PROTECTED  2008-04-21 21:14:07 
Re: Should embedded systems compilers be trusted
Jack Klein <jackklein@  2008-04-20 16:44:46 
Re: Should embedded systems compilers be trusted
Keith Thompson <kst-u@  2008-04-20 23:42:11 
Re: Should embedded systems compilers be trusted
Richard <devr_@[EMAIL   2008-04-21 00:05:07 
Re: Should embedded systems compilers be trusted
Robert Gamble <rgamble  2008-04-20 15:21:23 
Re: Should embedded systems compilers be trusted
Barry Schwarz <schwarz  2008-04-20 20:59:49 
Re: Should embedded systems compilers be trusted
CBFalconer <cbfalconer  2008-04-21 20:26:50 
Re: Should embedded systems compilers be trusted
Peter Nilsson <airia@[  2008-04-20 15:44:21 
Re: Should embedded systems compilers be trusted
Hallvard B Furuseth <h  2008-04-21 22:48:18 
Re: Should embedded systems compilers be trusted
Robert Gamble <rgamble  2008-04-21 05:24:55 
Re: Should embedded systems compilers be trusted
Peter Nilsson <airia@[  2008-04-21 15:11:17 
Re: Should embedded systems compilers be trusted
Barry Schwarz <schwarz  2008-04-21 17:32:57 
Re: Should embedded systems compilers be trusted
roberson@[EMAIL PROTECTED  2008-04-22 00:41:39 
Re: Should embedded systems compilers be trusted
Hallvard B Furuseth <h  2008-04-22 16:05:09 
Re: Should embedded systems compilers be trusted
Walter Banks <walter@[  2008-04-22 10:18:48 
Re: Should embedded systems compilers be trusted
=?ISO-8859-1?Q?Tom=E1s_=D  2008-04-22 17:19:07 
Re: Should embedded systems compilers be trusted
=?ISO-8859-1?Q?Tom=E1s_=D  2008-04-22 17:30:41 
Re: Should embedded systems compilers be trusted
Ian Collins <ian-news@  2008-04-23 12:39:17 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Sep 6 22:00:03 CDT 2008.