zik.saleeba
807b3d09ba
Logical operators now only evaluate the second argument if necessary, as specified in the C standard.
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@542 21eae674-98b7-11dd-bd71-f92a316d2d60
2011-02-16 00:13:11 +00:00
zik.saleeba
e44b198946
Added a new alignment system which should correspond to the struct alignments of most processors. This means that picoc struct members should match up with native C structs in most cases. I hope.
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@532 21eae674-98b7-11dd-bd71-f92a316d2d60
2011-02-15 04:25:09 +00:00
zik.saleeba
b2c4d6ce83
Fixed bug108 - brackets were not collapsing the expression stack
...
as they should have.
Now more permissive in declarations of void main()
git-svn-id: http://picoc.googlecode.com/svn/trunk@520 21eae674-98b7-11dd-bd71-f92a316d2d60
2011-02-14 06:05:53 +00:00
zik.saleeba
6dd3e69fa5
Fixes for Brian Schmalz for the surveyor platform.
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@516 21eae674-98b7-11dd-bd71-f92a316d2d60
2011-02-12 04:23:37 +00:00
zik.saleeba
eb7010d292
Now avoiding structure assignment since it seems to cause problems on blackfin processors. Urk!
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@515 21eae674-98b7-11dd-bd71-f92a316d2d60
2011-02-12 04:04:51 +00:00
zik.saleeba
e236537ab2
Fixed problem with returns inside switch() statements not working correctly outside the switch block.
...
Issue #116
git-svn-id: http://picoc.googlecode.com/svn/trunk@506 21eae674-98b7-11dd-bd71-f92a316d2d60
2011-02-11 04:49:44 +00:00
zik.saleeba
ab677a0670
Fixed NO_FP support
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@504 21eae674-98b7-11dd-bd71-f92a316d2d60
2011-02-10 23:50:05 +00:00
zik.saleeba
c2ba9f063c
Fixed a problem with type printing in expression debug mode
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@487 21eae674-98b7-11dd-bd71-f92a316d2d60
2011-01-07 04:06:33 +00:00
zik.saleeba
129564b24a
Problem with shift right operator fixed. Issue #114 .
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@484 21eae674-98b7-11dd-bd71-f92a316d2d60
2011-01-06 19:36:40 +00:00
zik.saleeba
b69b6d30cc
Fixes a problem with casts not being accepted in function parameters.
...
Issue #111
git-svn-id: http://picoc.googlecode.com/svn/trunk@483 21eae674-98b7-11dd-bd71-f92a316d2d60
2010-09-04 13:39:58 +00:00
zik.saleeba
dc0b17c1a4
Fixed missing "unsigned long" handling in ExpressionAssignInt(). Fixes issue 91 reported by duncan.forster
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@472 21eae674-98b7-11dd-bd71-f92a316d2d60
2010-07-27 08:53:06 +00:00
zik.saleeba
036f3efa8b
Fixed a problem with variable declarations in inner blocks giving errors. bug#82.
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@470 21eae674-98b7-11dd-bd71-f92a316d2d60
2010-07-24 16:07:56 +00:00
zik.saleeba
6cc5724395
Added fix from Duncan Forster for bug #85
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@468 21eae674-98b7-11dd-bd71-f92a316d2d60
2010-07-21 05:45:44 +00:00
zik.saleeba
145a99a7b1
Completed parameterised macros
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@463 21eae674-98b7-11dd-bd71-f92a316d2d60
2010-07-11 18:44:07 +00:00
zik.saleeba
7c754bad48
Can now parse parameterised macros. Can't evaluate them yet though.
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@462 21eae674-98b7-11dd-bd71-f92a316d2d60
2010-07-08 04:52:05 +00:00
zik.saleeba
8021fed051
Implemented the ternary operator
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@458 21eae674-98b7-11dd-bd71-f92a316d2d60
2010-07-04 19:52:52 +00:00
zik.saleeba
907f2b26d9
Changed "NativePointer" to "Pointer" for brevity
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@437 21eae674-98b7-11dd-bd71-f92a316d2d60
2010-06-13 14:41:03 +00:00
zik.saleeba
fa3e9a1187
Fixed a bug in multiple dimension array access (issue #80 )
...
Added a test for this
git-svn-id: http://picoc.googlecode.com/svn/trunk@419 21eae674-98b7-11dd-bd71-f92a316d2d60
2010-06-05 12:58:37 +00:00
zik.saleeba
ea10e1a369
Added function prototypes as requested in issue #74
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@410 21eae674-98b7-11dd-bd71-f92a316d2d60
2010-03-01 20:39:08 +00:00
zik.saleeba
fc348214c9
Stricter handling of semicolons at the end of statements.
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@402 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-11-22 11:36:15 +00:00
zik.saleeba
d09e156558
Fixes for Surveyor SRV-1 platform
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@398 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-11-08 19:23:50 +00:00
zik.saleeba
c3dcac1812
Added long and unsigned long data types
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@392 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-11-07 21:05:15 +00:00
zik.saleeba
97ad53a6b2
Fixed a problem with sizeof(explicit type) not working.
...
Also fixed a problem with parsing some types in expressions.
Issue #39
git-svn-id: http://picoc.googlecode.com/svn/trunk@390 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-11-07 20:22:11 +00:00
zik.saleeba
e077cc9d49
Fixed UltraSPARC II bus error. Probably a compiler bug?
...
Issue #65
git-svn-id: http://picoc.googlecode.com/svn/trunk@385 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-11-07 15:17:53 +00:00
zik.saleeba
064c64d202
More work on 64 bit support
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@382 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-11-06 22:34:12 +00:00
zik.saleeba
9ea0dcee28
Varius fixes for 64 bit architectures
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@381 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-11-06 22:16:12 +00:00
zik.saleeba
d36833b139
Fixed some warnings for 64 bit architectures
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@380 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-11-06 18:17:36 +00:00
zik.saleeba
3162c1a2bf
Twiddling with allocation for 64-bit architectures
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@378 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-11-06 18:08:11 +00:00
zik.saleeba
5c86cfaf36
Problems with prefix operators of the same precedence as a cast immediately
...
following the cast fixed.
Issue #55
git-svn-id: http://picoc.googlecode.com/svn/trunk@377 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-11-06 16:35:34 +00:00
zik.saleeba
e75518e139
Changed the way that arrays are represented to a simpler one without
...
the extra level of indirection.
Fixed various array-related problems, including array assignment
which is issue #49 .
git-svn-id: http://picoc.googlecode.com/svn/trunk@373 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-11-04 02:02:37 +00:00
zik.saleeba
2e07f89194
Possible fix for big-endian bug
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@371 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-11-03 20:40:35 +00:00
zik.saleeba
274f21fdbc
Removed "unsigned char" - now all chars are unsigned again.
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@370 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-11-01 21:16:19 +00:00
zik.saleeba
f1aeadb077
Removed redundant "struct ArrayValue"
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@369 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-11-01 21:10:48 +00:00
zik.saleeba
18acb6dc1a
Removed old pointer system. Now it's "native pointers" all the way.
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@368 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-11-01 21:02:31 +00:00
zik.saleeba
e44aca659f
Fixed problem with using array index operator on pointers. Issue #61 .
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@367 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-11-01 20:49:23 +00:00
zik.saleeba
be2ba2cb5f
Check for function not returning a vlue when it should
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@366 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-11-01 16:52:10 +00:00
zik.saleeba
0df1958dfc
Fix for NO_FP problem found by Ed.
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@359 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-10-30 19:41:32 +00:00
zik.saleeba
50b45890bc
Fixed array indexing issue.
...
Fixed problem in index() and rindex() NULL pointer returns.
Nicer handling of printing NULL pointers.
New test suite for strings.
git-svn-id: http://picoc.googlecode.com/svn/trunk@353 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-10-28 21:34:51 +00:00
zik.saleeba
66f40f6310
Fixed issue #60 - addresses of array indexes not working correctly.
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@352 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-10-28 20:55:51 +00:00
zik.saleeba
7a407782bb
Fixed a problem with indexing arrays of char.
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@351 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-10-28 20:36:16 +00:00
zik.saleeba
b0c74d8c00
Fixed a bug in pointer coercion which was breaking string functions.
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@350 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-10-26 20:00:01 +00:00
zik.saleeba
24a601271a
malloc() and free() implemented.
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@346 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-10-25 20:50:56 +00:00
zik.saleeba
c6d483ee6f
Unsigned types now exist. They're probably not handled quite correctly in expressions yet though.
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@345 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-10-25 11:54:34 +00:00
zik.saleeba
8c7434424d
Native pointers no longer carry their size with them.
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@344 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-10-23 19:01:32 +00:00
zik.saleeba
d5811d37d5
printf() now supports field widths, zero-padding and left/right justification.
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@342 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-10-22 20:08:43 +00:00
zik.saleeba
196331d6ba
'short' data type added
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@340 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-10-11 11:09:07 +00:00
zik.saleeba
bb718dcf21
Turning on NATIVE_POINTERS by default.
...
Fixed a minor warning in pointer assignment.
git-svn-id: http://picoc.googlecode.com/svn/trunk@339 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-10-10 18:06:17 +00:00
zik.saleeba
8e735ef68f
First cut of casts completed but not debugged
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@338 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-10-10 17:59:55 +00:00
zik.saleeba
7d135bbdd5
Doing some work on casts and sizeof
...
git-svn-id: http://picoc.googlecode.com/svn/trunk@337 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-10-10 14:49:49 +00:00
zik.saleeba
fcab11f844
Made both Val and Op co-exist in the ExpressionStack.
...
Some preliminary work for casts.
git-svn-id: http://picoc.googlecode.com/svn/trunk@336 21eae674-98b7-11dd-bd71-f92a316d2d60
2009-10-04 16:22:19 +00:00