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

92 Commits

Author SHA1 Message Date
uz
5a00b38aab Fixed the existing but unused attribute parsing code. Added
__attribute__((noexit)) that may be used to mark functions that won't return.
Added this attribute to the exit() function in stdlib.h.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4372 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-10-18 18:31:02 +00:00
uz
07c25db768 Added the __STDC_HOSTED__ macro.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4349 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-10-08 15:00:25 +00:00
uz
7b847321a8 Move the version numbers from the interface of the version module into a new
implementation. Allow for release candidates to be specified and disinguished.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4260 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-09-28 20:10:01 +00:00
uz
85f96a7d6f Fixed warnings generated by clang (run by Per Olofsson).
git-svn-id: svn://svn.cc65.org/cc65/trunk@4255 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-09-28 15:59:18 +00:00
uz
d0c4f85e51 Fix wrong check for typedef which caused non allocation of storage for structs
after the latest changes.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4074 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-29 19:05:01 +00:00
uz
4a93f188a0 Fixed a bug reported by Greg King: Initialized data for constant arrays was
not placed in the RODATA but in the DATA segment.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4044 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-08-20 10:55:38 +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
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
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
cuz
5c1bc2d740 Output warnings for implicit int types if std >= C99.
git-svn-id: svn://svn.cc65.org/cc65/trunk@3361 b7a2c559-68d2-44c3-8de9-860c34a00d81
2005-01-09 18:03:55 +00:00
cuz
ae70828938 Some improvements using the new SB_Printf for string buffers
git-svn-id: svn://svn.cc65.org/cc65/trunk@3335 b7a2c559-68d2-44c3-8de9-860c34a00d81
2004-12-16 22:43:52 +00:00
cuz
06b57e6e7e Introduce a -E flag that activates just the preprocessor.
Use variable sized string buffers for input and macro processing instead
of the fixed buffers used before.
Many changes in the preprocessor to make it more standards compliant (which
it is still not).


git-svn-id: svn://svn.cc65.org/cc65/trunk@3182 b7a2c559-68d2-44c3-8de9-860c34a00d81
2004-09-16 12:42:41 +00:00
cuz
13a2927e17 The -A and --ansi switches are gone, together with the __STRICT_ANSI__
predefined macro. Instead there is now a command line option --standard that
allows to set c89, c99 or cc65 as language standard. The compiler defines a
macro __CC65_STD__ that is one of __CC65_STD_C89__, __CC65_STD_C99__ or
__CC65_STD_CC65__ depending on the command line option. Default is cc65 (all
extensions) as before.


git-svn-id: svn://svn.cc65.org/cc65/trunk@3133 b7a2c559-68d2-44c3-8de9-860c34a00d81
2004-06-21 22:22:11 +00:00
cuz
d8279302a9 Make the -O and --codesize options stackable.
Copy the current optimization settings into a code segment on creation.


git-svn-id: svn://svn.cc65.org/cc65/trunk@3129 b7a2c559-68d2-44c3-8de9-860c34a00d81
2004-06-15 20:29:49 +00:00
cuz
d0ea9f34b6 Made several options that can be changed by #pragmas stackable.
Added new #pragma regvars.


git-svn-id: svn://svn.cc65.org/cc65/trunk@2902 b7a2c559-68d2-44c3-8de9-860c34a00d81
2004-03-07 21:53:35 +00:00
cuz
b821c2c8ae More optimizations
git-svn-id: svn://svn.cc65.org/cc65/trunk@2305 b7a2c559-68d2-44c3-8de9-860c34a00d81
2003-08-13 09:35:49 +00:00
cuz
9aa85743ba Fixed an include file search order problem
git-svn-id: svn://svn.cc65.org/cc65/trunk@2173 b7a2c559-68d2-44c3-8de9-860c34a00d81
2003-05-27 21:48:05 +00:00
cuz
f80a5148bd Fixed problem with array forward decl
git-svn-id: svn://svn.cc65.org/cc65/trunk@1994 b7a2c559-68d2-44c3-8de9-860c34a00d81
2003-02-19 22:58:13 +00:00
cuz
6e6560abd9 Fixed the last fix. Sigh:-(
git-svn-id: svn://svn.cc65.org/cc65/trunk@1909 b7a2c559-68d2-44c3-8de9-860c34a00d81
2003-01-20 21:02:57 +00:00
cuz
4ca598de3a Fixed the last fix. Sigh:-(
git-svn-id: svn://svn.cc65.org/cc65/trunk@1908 b7a2c559-68d2-44c3-8de9-860c34a00d81
2003-01-20 20:53:42 +00:00
cuz
638f54f3e4 The check for illegal storage classes on globals was wrong
git-svn-id: svn://svn.cc65.org/cc65/trunk@1907 b7a2c559-68d2-44c3-8de9-860c34a00d81
2003-01-20 06:02:33 +00:00
cuz
abcc981253 Move the Debug flag into a new module "debugflag" in the common directory.
Remove the const qualifier from the argument of xfree().


git-svn-id: svn://svn.cc65.org/cc65/trunk@1877 b7a2c559-68d2-44c3-8de9-860c34a00d81
2003-01-04 16:59:51 +00:00
cuz
ede471904c Reenable register variables
git-svn-id: svn://svn.cc65.org/cc65/trunk@1625 b7a2c559-68d2-44c3-8de9-860c34a00d81
2002-11-24 23:31:54 +00:00
cuz
49fd7134e5 Fixed a buffer overflow (report from Christian Groessler).
git-svn-id: svn://svn.cc65.org/cc65/trunk@1464 b7a2c559-68d2-44c3-8de9-860c34a00d81
2002-10-14 16:23:26 +00:00
cuz
7215ebd145 Added the __DATE__ and __TIME__ preprocessor macros
git-svn-id: svn://svn.cc65.org/cc65/trunk@1403 b7a2c559-68d2-44c3-8de9-860c34a00d81
2002-09-23 21:37:15 +00:00
cuz
56b8ead112 Move inline asm parsing into a separate module
git-svn-id: svn://svn.cc65.org/cc65/trunk@880 b7a2c559-68d2-44c3-8de9-860c34a00d81
2001-09-09 09:33:06 +00:00
cuz
e1b0251f04 Renamed some functions for better readbility.
Add a binary search for preprocessor tokens (instead of the old linear one)
to speed up the compiler.


git-svn-id: svn://svn.cc65.org/cc65/trunk@857 b7a2c559-68d2-44c3-8de9-860c34a00d81
2001-09-06 10:17:52 +00:00
cuz
bc8f4f3a1e Added .dbg statement generation for the assembler
git-svn-id: svn://svn.cc65.org/cc65/trunk@744 b7a2c559-68d2-44c3-8de9-860c34a00d81
2001-05-22 20:03:26 +00:00
cuz
0e80187cec Added the lineinfo module. Changed the complete code generation to use the
supplied data structures. Re-added the -T option which is much more exact
now because of the better line info stuff.
Cleanups in the scanner (remove old #defines).


git-svn-id: svn://svn.cc65.org/cc65/trunk@740 b7a2c559-68d2-44c3-8de9-860c34a00d81
2001-05-22 09:32:24 +00:00
cuz
8eadb8aee0 Working on the new backend
git-svn-id: svn://svn.cc65.org/cc65/trunk@706 b7a2c559-68d2-44c3-8de9-860c34a00d81
2001-05-03 17:34:54 +00:00
cuz
2eab65ad24 Remove the hardcoded limit from the literal pool.
git-svn-id: svn://svn.cc65.org/cc65/trunk@678 b7a2c559-68d2-44c3-8de9-860c34a00d81
2001-03-26 21:57:07 +00:00
cuz
cd6f591d11 Minor rearrangements to make the code more robust in case of errors.
git-svn-id: svn://svn.cc65.org/cc65/trunk@549 b7a2c559-68d2-44c3-8de9-860c34a00d81
2000-12-04 20:39:17 +00:00
cuz
d341e0ad76 Removed error numbers in favour of literal error messages. The error numbers
were harder to manage, made the code harder to read, and lead no less
verbose messages, since it was effort to add a new message. The new approach
has the drawback that it's more difficult to translate, but this won't
happen anyway.


git-svn-id: svn://svn.cc65.org/cc65/trunk@428 b7a2c559-68d2-44c3-8de9-860c34a00d81
2000-11-02 21:22:33 +00:00
cuz
25f5c69efa Reworked type comparison and handling of type qualifiers
git-svn-id: svn://svn.cc65.org/cc65/trunk@285 b7a2c559-68d2-44c3-8de9-860c34a00d81
2000-08-14 22:18:26 +00:00
cuz
85417b6d1b Some changes in the way, types and type strings are handled.
Check for and honour const in several places: Assignment to const is flagged
with an error. Const data is placed in the rodata segment.


git-svn-id: svn://svn.cc65.org/cc65/trunk@252 b7a2c559-68d2-44c3-8de9-860c34a00d81
2000-08-01 18:45:08 +00:00
cuz
e133416d05 Moved the check module to the common dir.
Replaced the type constants by something more expandable.


git-svn-id: svn://svn.cc65.org/cc65/trunk@248 b7a2c559-68d2-44c3-8de9-860c34a00d81
2000-08-01 15:04:35 +00:00
cuz
c31008c78a Remove io.*, some cleanup
git-svn-id: svn://svn.cc65.org/cc65/trunk@87 b7a2c559-68d2-44c3-8de9-860c34a00d81
2000-06-15 19:03:01 +00:00
cuz
aa8737733f Use the xmalloc module from the common directory.
Rewrote the include file management, keeping a list of all include files
and cleaning up the code while going.


git-svn-id: svn://svn.cc65.org/cc65/trunk@82 b7a2c559-68d2-44c3-8de9-860c34a00d81
2000-06-14 21:01:37 +00:00
cuz
114bc5a370 Some basic support for the 65C02 CPU.
Use the command line module from common/ and support long options.
Rename the include module to incpath (as in the assembler).


git-svn-id: svn://svn.cc65.org/cc65/trunk@67 b7a2c559-68d2-44c3-8de9-860c34a00d81
2000-06-14 08:18:19 +00:00
cuz
9cc25f13b6 Added support for old style (K&R) function declarations.
Several renames for better readibility.
Removed separate struct and enum symbol tables in favour of one tag table.
Check for some more error conditions or dubious constructs.


git-svn-id: svn://svn.cc65.org/cc65/trunk@62 b7a2c559-68d2-44c3-8de9-860c34a00d81
2000-06-12 18:31:40 +00:00