1
0
mirror of https://github.com/cc65/cc65.git synced 2024-07-06 13:29:01 +00:00
Commit Graph

1516 Commits

Author SHA1 Message Date
uz
32348f5778 Fixed an error: If an expression is loaded into the primary, a function must
be converted to pointer-to-function and an array to pointer-to-member resp.


git-svn-id: svn://svn.cc65.org/cc65/trunk@3977 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-07-28 18:56:16 +00:00
uz
dff0e86458 Prepared the code for referencing a symbol that forces the startup code to get
linked in.


git-svn-id: svn://svn.cc65.org/cc65/trunk@3976 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-07-28 18:55:23 +00:00
uz
5b0323771a Add some code that avoids outputing a forward label in the same line as a
normal label. It works but looks bad.


git-svn-id: svn://svn.cc65.org/cc65/trunk@3971 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-07-06 20:33:06 +00:00
uz
8e8993de7e Support for the .BANKBYTES, .LOBYTES and .HIBYTES pseudo functions contributed
by Kevin Schuetz <scrapdog@runbox.com>.


git-svn-id: svn://svn.cc65.org/cc65/trunk@3965 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-05-18 16:11:34 +00:00
uz
ffa8e7be82 New functions LIWarning and LIError.
git-svn-id: svn://svn.cc65.org/cc65/trunk@3961 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-03-08 14:54:53 +00:00
uz
b607a61866 "S" is a keyword in 65816 mode only.
git-svn-id: svn://svn.cc65.org/cc65/trunk@3958 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-03-06 09:56:22 +00:00
uz
60f525346f Fixed asm code to source line relation in switch statements. The switch code
was incorrectly attributed to the line following the switch statement.


git-svn-id: svn://svn.cc65.org/cc65/trunk@3957 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-02-23 22:19:23 +00:00
uz
81a30cc888 Fixed source output in generated assembly when -T is used.
git-svn-id: svn://svn.cc65.org/cc65/trunk@3956 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-02-23 22:11:18 +00:00
uz
82b998117a Added a separate output module that is used to manage the output file.
Fixed the -E switch: Output was always sent to stdout and an empty assembler
output file was generated. Now the output is sent to either <inputstem>.i or
the file named in the -o option.


git-svn-id: svn://svn.cc65.org/cc65/trunk@3955 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-02-23 21:25:59 +00:00
uz
bf810bf001 When generating forward references to functions, use the default code address
size.


git-svn-id: svn://svn.cc65.org/cc65/trunk@3948 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-02-22 16:38:07 +00:00
uz
4dd9c523e7 Check for division by/modulo by zero when parsing the /= and %= operators.
git-svn-id: svn://svn.cc65.org/cc65/trunk@3937 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-02-17 21:09:59 +00:00
uz
c4dac550a8 Small change to avoid endless error loops (aborted by the maximum error count)
if an unexpected token is encountered in Primary().


git-svn-id: svn://svn.cc65.org/cc65/trunk@3936 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-02-17 20:56:13 +00:00
uz
c94e82f8b2 Check for and flag address size modifiers that are invalid for the choosen CPU.
git-svn-id: svn://svn.cc65.org/cc65/trunk@3927 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-02-10 21:10:50 +00:00
uz
823d0b7636 Makefile cleanup. Among other things, allow use of the --as-needed linker flag
by rearranging arguments for the linker.


git-svn-id: svn://svn.cc65.org/cc65/trunk@3922 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-02-08 17:19:45 +00:00
uz
a3aca2ab67 Added special error messages for Groepaz.
git-svn-id: svn://svn.cc65.org/cc65/trunk@3919 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-01-30 16:30:27 +00:00
uz
ab74b7bfd8 Another fix for the SB_SetIndex macro.
git-svn-id: svn://svn.cc65.org/cc65/trunk@3916 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-01-26 08:28:29 +00:00
uz
f45e73164d Fixed an error in the SB_SetIndex macro.
git-svn-id: svn://svn.cc65.org/cc65/trunk@3915 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-01-26 08:08:28 +00:00
uz
1a54f34a84 Fixed a problem with recursive macro expansions. They didn't work if the same
macro was involved more than one time.


git-svn-id: svn://svn.cc65.org/cc65/trunk@3911 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-01-24 16:31:18 +00:00
uz
dd5e5c43d8 Added a new SetIndex() function/macro.
git-svn-id: svn://svn.cc65.org/cc65/trunk@3910 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-01-24 16:26:48 +00:00
uz
b4ced298b1 Rewrite va_copy.h - the check for a C89 compiler wasn't a really good idea,
since many compilers are broken in this respect.


git-svn-id: svn://svn.cc65.org/cc65/trunk@3909 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-01-24 16:26:32 +00:00
uz
30f88d2646 Avoid spurious subsequent errors if an include file wasn't found.
git-svn-id: svn://svn.cc65.org/cc65/trunk@3908 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-01-18 15:07:55 +00:00
uz
df341b6551 Fixed an optimizer problem: A branch into a list of at least two branches
pointing to themselves caused the optimizer to loop forever.


git-svn-id: svn://svn.cc65.org/cc65/trunk@3907 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-01-12 19:48:28 +00:00
uz
308ceeacf9 Fixed problems with casts, where larger values weren't truncated when casting
down to char size.


git-svn-id: svn://svn.cc65.org/cc65/trunk@3904 b7a2c559-68d2-44c3-8de9-860c34a00d81
2008-12-28 16:25:03 +00:00
uz
a1fbb4fe32 Add new --tabsize option to usage/help output.
git-svn-id: svn://svn.cc65.org/cc65/trunk@3903 b7a2c559-68d2-44c3-8de9-860c34a00d81
2008-11-11 21:23:15 +00:00
uz
d6d807c3db New option --tabsize.
git-svn-id: svn://svn.cc65.org/cc65/trunk@3902 b7a2c559-68d2-44c3-8de9-860c34a00d81
2008-11-11 21:21:10 +00:00
uz
d66d72bf95 Be more tolerant with dos/windows line endings.
git-svn-id: svn://svn.cc65.org/cc65/trunk@3901 b7a2c559-68d2-44c3-8de9-860c34a00d81
2008-11-11 21:16:51 +00:00
uz
17ac0cb4fa Fixed the macro versions of several inline functions.
git-svn-id: svn://svn.cc65.org/cc65/trunk@3900 b7a2c559-68d2-44c3-8de9-860c34a00d81
2008-08-31 18:31:18 +00:00
uz
1e46bc16e4 More changes to support address size qualifiers.
git-svn-id: svn://svn.cc65.org/cc65/trunk@3899 b7a2c559-68d2-44c3-8de9-860c34a00d81
2008-08-31 18:24:33 +00:00
uz
63943c3f44 Test for pointer must use IsTypePtr not a direct compare. The later may (and
does) fail because of qualifiers.


git-svn-id: svn://svn.cc65.org/cc65/trunk@3898 b7a2c559-68d2-44c3-8de9-860c34a00d81
2008-08-31 18:23:58 +00:00
uz
cc36f8a93a Moved the fascall and near/far flags from the function desriptor into the
type. Started to add general handling of address size flags in types.


git-svn-id: svn://svn.cc65.org/cc65/trunk@3891 b7a2c559-68d2-44c3-8de9-860c34a00d81
2008-08-24 17:33:30 +00:00
uz
5d4790a137 Enable use of new C like comments only if the new feature "c_comments" is
enabled.


git-svn-id: svn://svn.cc65.org/cc65/trunk@3889 b7a2c559-68d2-44c3-8de9-860c34a00d81
2008-08-21 19:35:39 +00:00
uz
9f7fc6f4c8 Added C like /* */ comments.
git-svn-id: svn://svn.cc65.org/cc65/trunk@3888 b7a2c559-68d2-44c3-8de9-860c34a00d81
2008-08-19 21:26:23 +00:00
uz
0b4f6426e2 Some more floating point support.
git-svn-id: svn://svn.cc65.org/cc65/trunk@3886 b7a2c559-68d2-44c3-8de9-860c34a00d81
2008-08-11 17:51:00 +00:00
uz
0b60ac4716 Use GlobalModeFlags() if apropriate.
git-svn-id: svn://svn.cc65.org/cc65/trunk@3885 b7a2c559-68d2-44c3-8de9-860c34a00d81
2008-08-09 20:33:11 +00:00
uz
1b29b536f3 Fixed a bug: Structure assignment was broken.
git-svn-id: svn://svn.cc65.org/cc65/trunk@3884 b7a2c559-68d2-44c3-8de9-860c34a00d81
2008-08-08 16:47:43 +00:00
uz
1e672a3169 Fixed a bug: The op= operators (+=, -=, etc.) worked on const qualified
objects.


git-svn-id: svn://svn.cc65.org/cc65/trunk@3883 b7a2c559-68d2-44c3-8de9-860c34a00d81
2008-08-07 22:22:58 +00:00
uz
66b3f9d974 Fixed a bug: It was possible to increment or decrement const qualified
objects.


git-svn-id: svn://svn.cc65.org/cc65/trunk@3882 b7a2c559-68d2-44c3-8de9-860c34a00d81
2008-08-07 22:18:12 +00:00
uz
5cd0b86a1a Indexing a string by an expression which was not a simple variable didn't
work:  "abcd"[atoi("2")];
                         


git-svn-id: svn://svn.cc65.org/cc65/trunk@3880 b7a2c559-68d2-44c3-8de9-860c34a00d81
2008-08-05 21:20:42 +00:00
uz
9127774a4d Pass a complete ExprDesc and not just the Flags field to GlobalModeFlags to
allow for better debugging (output) in case of problems.


git-svn-id: svn://svn.cc65.org/cc65/trunk@3879 b7a2c559-68d2-44c3-8de9-860c34a00d81
2008-08-05 21:11:26 +00:00
uz
ac895ef921 DoneStrBuf -> SB_Done (Stefan Haubenthal).
git-svn-id: svn://svn.cc65.org/cc65/trunk@3878 b7a2c559-68d2-44c3-8de9-860c34a00d81
2008-08-05 20:56:35 +00:00
uz
dbb9a31fd9 Fixed wrong code generation for
((unsigned char *)(&shadow))[reg & 0x0f] = value;


git-svn-id: svn://svn.cc65.org/cc65/trunk@3875 b7a2c559-68d2-44c3-8de9-860c34a00d81
2008-08-05 19:47:57 +00:00
uz
d10f8525db Fixed a comment.
git-svn-id: svn://svn.cc65.org/cc65/trunk@3872 b7a2c559-68d2-44c3-8de9-860c34a00d81
2008-08-05 15:52:25 +00:00
uz
a1d7fed128 Fixed several problems with old style (K&R) declarations and a mix of old and
new style decls.


git-svn-id: svn://svn.cc65.org/cc65/trunk@3869 b7a2c559-68d2-44c3-8de9-860c34a00d81
2008-08-03 20:55:36 +00:00
uz
3482a9e7ce Fixed a comment
git-svn-id: svn://svn.cc65.org/cc65/trunk@3868 b7a2c559-68d2-44c3-8de9-860c34a00d81
2008-08-03 20:09:03 +00:00
uz
24c6e1ce5b Move some storage class handling and checking for implicit into from locals.c
and compile.c into ParseDecl() (declare.c).


git-svn-id: svn://svn.cc65.org/cc65/trunk@3867 b7a2c559-68d2-44c3-8de9-860c34a00d81
2008-08-03 18:20:12 +00:00
uz
841ea0e686 Transfer the storage class flags from struct DeclSpec into struct Declaration.
git-svn-id: svn://svn.cc65.org/cc65/trunk@3866 b7a2c559-68d2-44c3-8de9-860c34a00d81
2008-08-03 18:00:05 +00:00
uz
c76a8657b3 Fixed handling of function definitions with an empty parameter list. According
to the standard, an empty parameter list in a function declarator that is not
a definition means that the function may have any number of parameters. In a
function definition, it means that there are no parameters (as if the function
were declared with a "void" parameter list).


git-svn-id: svn://svn.cc65.org/cc65/trunk@3865 b7a2c559-68d2-44c3-8de9-860c34a00d81
2008-08-03 15:30:03 +00:00
uz
4812feb44b git-svn-id: svn://svn.cc65.org/cc65/trunk@3863 b7a2c559-68d2-44c3-8de9-860c34a00d81 2008-08-02 22:02:54 +00:00
cuz
6ecca264e4 In an old style function definition, print a diagnostic if a type is assigned
twice to a parameter.


git-svn-id: svn://svn.cc65.org/cc65/trunk@3861 b7a2c559-68d2-44c3-8de9-860c34a00d81
2008-08-01 21:40:07 +00:00
cuz
357118697d A label must always be followed by a statement. Check for this.
git-svn-id: svn://svn.cc65.org/cc65/trunk@3860 b7a2c559-68d2-44c3-8de9-860c34a00d81
2008-08-01 20:00:23 +00:00