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

78 Commits

Author SHA1 Message Date
acqn
38dac907e8 Cleanup for symbol types and flags. 2024-01-10 04:51:59 +08:00
acqn
25832ef5fc Fixed timing of #pragma charmap.
Now it is immediately applied and affects almost all characters and string literals after it.
Exceptions:
- String literals as the message of a static assertion or inline assembler code (only the required one, not any optional formatted arguments) in an asm() expression are not translated with either #pragma charmap or target presets.
- String literals used for preprocessor directives or as the result of stringized macro arguments are never translated.
2023-10-13 16:32:06 +08:00
acqn
20c3e994c6 Fixed compiling with pragmas in the middle of declarations or statements. 2023-10-04 21:22:04 +08:00
acqn
9900e7361d #pragma message now uses the new "note" level message routine. 2022-09-30 09:09:09 +08:00
Andrea Odetti
bcc670ee36 Standard formatting of error messages.
https://www.gnu.org/prep/standards/html_node/Errors.html

Issue: https://github.com/cc65/cc65/issues/1494
2021-05-11 17:41:59 +02:00
mrdudz
18f94d1fe0 rework to use a magic value instead of a flag, as suggested by Oliver 2021-05-11 14:00:49 +02:00
mrdudz
ef74226993 improve error message 2021-05-11 13:37:53 +02:00
mrdudz
c9f242e566 Extend #pragma wrapped-call to support "bank" argument 2021-05-05 14:42:29 +02:00
acqn
896f463a23 Used more specific pointers instead of the "arbitary attribute pointer" used in type strings. 2021-04-19 15:36:55 +02:00
acqn
2aad72af90 Removed trailing whitespaces. 2021-03-03 10:07:24 +01:00
Tim Gates
2646c06f61 docs: fix simple typo, paramater -> parameter
There is a small typo in src/cc65/pragma.c.

Should read `parameter` rather than `paramater`.
2020-11-29 10:26:08 +01:00
acqn
e58c84acf7 Support for optionally specifying address size for segments with:
#pragma ***-name([push,] "name"[, "addrsize"])
where "addrsize" is any addressing size supported in ca65.
2020-10-11 23:05:20 +02:00
acqn
f206833a20 Alternative fix for Issue #1167. 2020-08-17 20:31:02 +02:00
acqn
13ed557b92 Fixed compatibility checking of function declarations by using the composite types of them. 2020-08-14 18:33:54 +02:00
acqn
18bd76bb90 Minor fixes and improvements. 2020-07-21 18:23:52 +02:00
Christian Groessler
58484449b4 remove TABs 2019-02-05 23:27:52 +01:00
Greg King
a6b04f6e97 Changed most "backticks" (grave accents) into apostrophes.
Quotations that are embraced by tick marks now look better, in most fonts.
2019-01-05 14:57:12 -05:00
Oliver Schmidt
19f3229f45 Made 'wrapped call' code build with VS 2015. 2018-03-05 20:44:32 +01:00
Pascal de Bruijn
6e93c1ba73 pragma: add minimalist message pragma implementation
for example:

#pragma message ("in a bottle")

results in:

hello.c(207): Note: in a bottle
2017-07-19 17:58:13 +02:00
Pascal de Bruijn
ea7f4d7489 pragma: bring pragma_t enum in line with Pragmas struct
fixes an inconsequential inconsistency, might prevent some
confusion in the future.
2017-07-17 19:43:11 +02:00
Greg King
d3ccc289c1 Stopped cc65 from putting redundant .segment directives into its Assembly output. 2017-06-16 21:53:50 -04:00
Lauri Kasanen
901ac80026 Wrapper functions use all registers 2017-05-19 15:25:50 +03:00
Lauri Kasanen
219b239a34 Adjustments in response to latest comments 2017-05-18 17:14:26 +03:00
Lauri Kasanen
4c05c46cd1 Remove RAM-trampoline array support 2017-05-18 16:11:39 +03:00
Lauri Kasanen
f6fa74a636 Rename trampoline to wrappedcall everywhere 2017-05-18 16:00:04 +03:00
Lauri Kasanen
7feced8862 More tabs to spaces 2017-05-18 15:54:47 +03:00
Lauri Kasanen
a590b99f5b Align with spaces instead of tabs here 2017-05-18 14:21:43 +03:00
Lauri Kasanen
ca41af41c2 Rename pragma trampoline to wrapped-call, value to identifier 2017-05-16 20:10:24 +03:00
Lauri Kasanen
2890b3a810 Pragma trampoline 2017-05-02 20:51:53 +03:00
Oliver Schmidt
02daf9f8b5 So far the built-in inlining of several known standard function was always (!) enabled and the option -Os enabled additional, potentially unsafe inlining of some of those functions.
There were two aspects of this behavior that were considered undesirable:
- Although the safe inlining is in general desirable it should only be enabled if asked for it - like any other optimization.
- The option name -Os implies that it is a safe option, the potentially unsafe inlining should have a more explicit name.

So now:
- The option -Os enables the safe inlining.
- The new option --eagerly-inline-funcs enables the potentially unsafe inlining (including the safe inlining).

Additionally was added:
- The option --inline-stdfuncs that does like -Os enable the safe inlining but doesn't enable optimizations.
- The pragma inline-stdfuncs that works identical to --inline-stdfuncs.
- The pragma allow-eager-inline that enables the potentially unsafe inlining but doesn't include the safe inlining. That means that by itself it only marks code as safe for potentially unsafe inlining but doesn't actually enable any inlining.
2017-04-03 23:20:26 +02:00
Greg King
1dee57bf1f Made cc65 not warn us when we change character code 0x00 back to itself. 2016-08-26 08:08:44 -04:00
Greg King
573381a340 Allowed character code zero to be remapped with other character codes. 2016-06-11 06:43:19 -04:00
Greg King
0390c34e88 Changed multi-line C comments into another style.
The left side doesn't look unbalanced.
2014-06-30 16:51:07 -04:00
Oliver Schmidt
4185caf855 Normalized code. 2014-03-04 01:11:19 +01:00
Oliver Schmidt
85885001b1 Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
uz
fea0ac67c3 Parse #pragma align() (does nothing currently).
git-svn-id: svn://svn.cc65.org/cc65/trunk@5082 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-07-12 19:35:49 +00:00
uz
d08ff2b6df Fix parsing of push/pop so that #pragma warn works without.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4824 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-10-02 19:43:18 +00:00
uz
e048d2aeba Make the warning "statement has no effect" switchable.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4823 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-10-02 19:32:11 +00:00
uz
7d94dc50a1 New option and #pragma --local-strings that causes string literals to be
output immediately.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4504 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-12-08 20:35:24 +00:00
uz
3976746735 Rewrote literal handling. Literals are now saved together with other function
data, and at the end of compilation merged if possible. Literals for unused
functions are removed together with the function.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4501 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-12-05 22:39:45 +00:00
uz
50ff6d0768 Create one literal pool per function, so that literal pool data is removed
together with a function, if it is not used. Literal storage can now be
controlled by #pragma writable-strings on a per function basis.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4499 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-12-04 14:12:25 +00:00
uz
d9753c2eb7 Allow switching warnings about unused pragmas on or off.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4366 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-10-14 13:04:38 +00:00
uz
ed2767e65f Changed names of the pragmas to be identical to the corresponding command line
options. This should make use easier. The old names of the pragmas are still
available but will cause warnings.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4364 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-10-14 12:55:15 +00:00
uz
a1fb355a9a Rewrote most of the #pragma parsing code. I'm still not satisfied, but at
least, it's a bit better than before. #pragma warn (...) is now used to switch
single warnings instead of a global on/off switch.



git-svn-id: svn://svn.cc65.org/cc65/trunk@4362 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-10-13 21:24:32 +00:00
uz
b55419af59 Rewrote handling of the -W command line option. It is now used to enable or
disable warnings by name.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4348 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-10-08 13:29:35 +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
cuz
9174f65e54 Make much more usage of dynamic strings (StrBufs) instead of char* and
friends. Since names and other strings are now StrBufs in many places, code
for output had to be changed.
Added support for string literals to StrBuf.


git-svn-id: svn://svn.cc65.org/cc65/trunk@3825 b7a2c559-68d2-44c3-8de9-860c34a00d81
2008-03-31 20:54:45 +00:00
cuz
ca2b070935 Make the -W flag stackable.
New pragmas codesize, optimize and warn.


git-svn-id: svn://svn.cc65.org/cc65/trunk@3130 b7a2c559-68d2-44c3-8de9-860c34a00d81
2004-06-15 21:05:40 +00:00
cuz
40dc3582a9 Allow push/pop arguments for segment name #pragmas
git-svn-id: svn://svn.cc65.org/cc65/trunk@2907 b7a2c559-68d2-44c3-8de9-860c34a00d81
2004-03-08 22:33:27 +00:00
cuz
742d8c3294 Renamed IS_Pop to IS_Drop
git-svn-id: svn://svn.cc65.org/cc65/trunk@2905 b7a2c559-68d2-44c3-8de9-860c34a00d81
2004-03-07 22:09:25 +00:00