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 > Re: Introduce a...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 4 of 65 Topic 26139 of 27678
Post > Topic >>

Re: Introduce a C Compiler ucc

by dreamAnders <dream_anders@[EMAIL PROTECTED] > May 10, 2008 at 07:21 PM

On May 11, 9:35 am, vipps...@[EMAIL PROTECTED]
 wrote:
> On May 11, 4:15 am, dreamAnders <dream_and...@[EMAIL PROTECTED]
> wrote:
>
> > ucc is an ANSI C Compiler. Its code size is about 15,000 lines.
> > The lexer, parser and code generator are all hand-written.
> > The code structure is very clear and straightforward. And there is an
> > interesting value numbering algorithm.
> > It also has a do***ent explaining the internal implementation.
> > If you are interested at this compiler, you can download it
fromhttp://sourceforge.net/projects/ucc,
which will help you to master the
> > C language.
>
> Your implementation of assert in ucc/ucl/linux/include/assert.h is not
> ANSI C, (or ISO C) as it evaluates it's parameter more than once if
> NDEBUG is not defined.
> Example: assert(printf("hello world\n")); would call print twice.
>
> I suggest you rewrite _assert (and also rename to _Assert) to return
> void, and make the check twice there.

No, It will not evaluate its parameter more than once.

#define assert(e) ((void)((e)||_assert(#e, __FILE__, __LINE__)))

please notice that the second e's appearance, it is '#e'
 




 65 Posts in Topic:
Introduce a C Compiler ucc
dreamAnders <dream_and  2008-05-10 18:15:57 
Re: Introduce a C Compiler ucc
vippstar@[EMAIL PROTECTED  2008-05-10 18:35:44 
Re: Introduce a C Compiler ucc
Robert Gamble <rgamble  2008-05-10 18:42:51 
Re: Introduce a C Compiler ucc
dreamAnders <dream_and  2008-05-10 19:21:02 
Re: Introduce a C Compiler ucc
dreamAnders <dream_and  2008-05-10 19:24:36 
Re: Introduce a C Compiler ucc
"Dan" <voids  2008-05-11 13:20:00 
Re: Introduce a C Compiler ucc
Gene <gene.ressler@[EM  2008-05-10 20:42:04 
Re: Introduce a C Compiler ucc
Rui Maciel <rui.maciel  2008-05-11 10:21:55 
Re: Introduce a C Compiler ucc
Bart <bc@[EMAIL PROTEC  2008-05-11 06:52:25 
Re: Introduce a C Compiler ucc
"noagbodjivictor@[EM  2008-05-11 08:36:33 
Re: Introduce a C Compiler ucc
"noagbodjivictor@[EM  2008-05-11 08:41:39 
Re: Introduce a C Compiler ucc
Ian Collins <ian-news@  2008-05-12 08:13:33 
Re: Introduce a C Compiler ucc
Ian Collins <ian-news@  2008-05-12 08:59:14 
Re: Introduce a C Compiler ucc
richard@[EMAIL PROTECTED]  2008-05-11 22:50:56 
Re: Introduce a C Compiler ucc
Ian Collins <ian-news@  2008-05-12 10:52:46 
Re: Introduce a C Compiler ucc
richard@[EMAIL PROTECTED]  2008-05-12 08:38:27 
Re: Introduce a C Compiler ucc
Rui Maciel <rui.maciel  2008-05-12 00:04:12 
Re: Introduce a C Compiler ucc
dreamAnders <dream_and  2008-05-12 03:08:19 
Re: Introduce a C Compiler ucc
dreamAnders <dream_and  2008-05-12 03:10:37 
Re: Introduce a C Compiler ucc
Flash Gordon <spam@[EM  2008-05-12 18:16:47 
Re: Introduce a C Compiler ucc
santosh <santosh.k83@[  2008-05-12 23:43:25 
Re: Introduce a C Compiler ucc
=?UTF-8?B?Sm/Do28gSmVyw7N  2008-06-27 05:27:39 
Re: Introduce a C Compiler ucc
Richard Heathfield <rj  2008-06-27 06:19:52 
Re: Introduce a C Compiler ucc
Ian Collins <ian-news@  2008-05-13 08:11:32 
Re: Introduce a C Compiler ucc
dreamAnders <dream_and  2008-05-12 03:17:35 
Re: Introduce a C Compiler ucc
dreamAnders <dream_and  2008-05-12 03:21:05 
Re: Introduce a C Compiler ucc
Bart <bc@[EMAIL PROTEC  2008-05-12 04:56:03 
Re: Introduce a C Compiler ucc
gazelle@[EMAIL PROTECTED]  2008-05-12 13:14:31 
Re: Introduce a C Compiler ucc
santosh <santosh.k83@[  2008-05-12 19:15:39 
Re: Introduce a C Compiler ucc
richard@[EMAIL PROTECTED]  2008-05-12 14:14:15 
Re: Introduce a C Compiler ucc
"noagbodjivictor@[EM  2008-05-12 06:50:00 
Re: Introduce a C Compiler ucc
santosh <santosh.k83@[  2008-05-12 19:42:06 
Re: Introduce a C Compiler ucc
richard@[EMAIL PROTECTED]  2008-05-12 14:12:51 
Re: Introduce a C Compiler ucc
dreamAnders <dream_and  2008-05-12 09:40:09 
Re: Introduce a C Compiler ucc
Keith Thompson <kst-u@  2008-05-12 09:52:26 
Re: Introduce a C Compiler ucc
richard@[EMAIL PROTECTED]  2008-05-12 17:18:30 
Re: Introduce a C Compiler ucc
jacob navia <jacob@[EM  2008-05-12 19:18:14 
Re: Introduce a C Compiler ucc
richard@[EMAIL PROTECTED]  2008-05-12 17:28:08 
Re: Introduce a C Compiler ucc
richard@[EMAIL PROTECTED]  2008-05-12 17:24:52 
Re: Introduce a C Compiler ucc
Spiros Bousbouras <spi  2008-05-12 12:45:46 
Re: Introduce a C Compiler ucc
Flash Gordon <spam@[EM  2008-05-12 21:24:25 
Re: Introduce a C Compiler ucc
Spiros Bousbouras <spi  2008-05-12 12:47:59 
Re: Introduce a C Compiler ucc
Ian Collins <ian-news@  2008-05-13 08:09:51 
Re: Introduce a C Compiler ucc
Keith Thompson <kst-u@  2008-05-12 13:28:11 
Re: Introduce a C Compiler ucc
Ian Collins <ian-news@  2008-05-13 09:34:10 
Re: Introduce a C Compiler ucc
dj3vande@[EMAIL PROTECTED  2008-05-12 22:03:33 
Re: Introduce a C Compiler ucc
Keith Thompson <kst-u@  2008-05-12 15:55:25 
Re: Introduce a C Compiler ucc
Spiros Bousbouras <spi  2008-05-12 13:33:43 
Re: Introduce a C Compiler ucc
Spiros Bousbouras <spi  2008-05-12 14:50:35 
Re: Introduce a C Compiler ucc
Flash Gordon <spam@[EM  2008-05-12 23:16:54 
Re: Introduce a C Compiler ucc
dreamAnders <dream_and  2008-05-12 18:17:52 
Re: Introduce a C Compiler ucc
CBFalconer <cbfalconer  2008-05-12 21:02:47 
Re: Introduce a C Compiler ucc
Richard Heathfield <rj  2008-05-13 04:09:05 
Re: Introduce a C Compiler ucc
CBFalconer <cbfalconer  2008-05-13 00:27:05 
Re: Introduce a C Compiler ucc
Richard Heathfield <rj  2008-05-13 04:50:51 
Re: Introduce a C Compiler ucc
CBFalconer <cbfalconer  2008-05-13 10:07:30 
Re: Introduce a C Compiler ucc
Walter Banks <walter@[  2008-05-13 08:51:57 
Re: Introduce a C Compiler ucc
dreamAnders <dream_and  2008-05-13 01:47:46 
Re: Introduce a C Compiler ucc
Richard Heathfield <rj  2008-05-13 09:00:00 
Re: Introduce a C Compiler ucc
dreamAnders <dream_and  2008-05-13 04:43:41 
Re: Introduce a C Compiler ucc
Gene <gene.ressler@[EM  2008-05-13 17:32:35 
Re: Introduce a C Compiler ucc
dreamAnders <dream_and  2008-05-13 20:53:44 
Re: Introduce a C Compiler ucc
dreamAnders <dream_and  2008-05-13 21:00:17 
Re: Introduce a C Compiler ucc
Noob <root@[EMAIL PROT  2008-05-14 11:28:28 
Re: Introduce a C Compiler ucc
soscpd <soscpd@[EMAIL   2008-06-27 01:05:02 

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 Oct 11 18:35:48 CDT 2008.