Add support for "short" data type.
diff --git a/libacc/FEATURES b/libacc/FEATURES
index 1a44415..97a876d 100644
--- a/libacc/FEATURES
+++ b/libacc/FEATURES
@@ -1,6 +1,5 @@
-Supported C language subset (read joint example 'otccex.c' to have
- an introduction to OTCC dialect):
+Supported C language subset:
- Expressions:
@@ -13,35 +12,51 @@
* Parenthesis are supported.
+ * Comma operator is supported.
+
+ * Trinary operator (?:) is not supported.
+
* Unary operators: '&', '*' (pointer indirection), '-'
- (negation), '+', '!', '~', post fixed '++' and '--'.
+ (negation), '+', '!', '~', '++' and '--'.
- * Pointer indirection ('*') only works with explicit cast to
- 'char *', 'int *' or 'int (*)()' (function pointer).
+ * Pointer indirection ('*') is supported.
- * '++', '--', and unary '&' can only be used with variable
- lvalue (left value).
+ * Square brackets can be used for pointer arithmetic.
- * '=' can only be used with variable or '*' (pointer
- indirection) lvalue.
+ * '=' and <op>= are supported.
- * Function calls are supported with standard i386 calling
- convention. Function pointers are supported with explicit
- cast. Functions can be used before being declared.
+ * Function calls are supported with standard Linux calling
+ convention. Function pointers are supported.
+ Functions can be used before being declared.
- - Types: only signed integer ('int') variables and functions can
- be declared. Variables cannot be initialized in
- declarations. Only old K&R function declarations are parsed
- (implicit integer return value and no types on arguments).
+ - sizeof() is not supported.
- - Any function or variable from the libc can be used because OTCC
- uses the libc dynamic linker to resolve undefined symbols.
+ - Types:
+ + int, short, char, float, double
+ + pointers
+ + variables can be initialized in declarations.
+ + Only ANSI-style function declarations are supported.
+ - "..." is not supported.
+ - short is not supported
+ - const is not supported
+ - arrays are not supported
+ - long doubles are not supported
+ - structs are not supported
+
+ - Unknown functions and variables are bound at compile time by calling
+ back to the caller. For the 'acc' command-line tool unknown functions
+ and variables are looked up using dlsym, to allow using many libc
+ functions and variables.
- Instructions: blocks ('{' '}') are supported as in C. 'if' and
'else' can be used for tests. The 'while' and 'for' C constructs
are supported for loops. 'break' can be used to exit
loops. 'return' is used for the return value of a function.
+ - switch / case is not supported.
+ - goto and labels are not supported.
+ - continue is not supported.
+
- Identifiers are parsed the same way as C. Local variables are
handled, but there is no local name space (not a problem if
different names are used for local and global variables).
@@ -49,16 +64,19 @@
- Numbers can be entered in decimal, hexadecimal ('0x' or '0X'
prefix), or octal ('0' prefix).
+ - Float and double constants are supported.
+
- '#define' is supported without function like arguments. No macro
recursion is tolerated. Other preprocessor directives are
ignored.
- - C Strings and C character constants are supported. Only '\n',
- '\"', '\'' and '\\' escapes are recognized.
+ - C Strings and C character constants are supported. All ANSI C
+ character escapes are supported.
- - Both C comments ( /* */ ) and C++ comments ( // ... end-of-line ) can be used.
+ - Both C comments ( /* */ ) and C++ comments ( // ... end-of-line ) are
+ supported.
- - No error is displayed if an incorrect program is given.
+ - Some syntax errors are reported, others may cause a crash.
- Memory: the code, data, and symbol sizes are limited to 100KB
(it can be changed in the source code).