
3-28
SC100 C Compiler
Using the SC100 C Compiler
A predicate may be deleted by a preprocessing directive in one of two forms, as shown in
Example 3-10:
Example 3-10. Deleting a predicate
#unassert
name
#unassert
name(token-sequence)
The first form removes all definitions of the indicated predicate name. The second form removes
only the indicated definition, leaving any remaining definitions unchanged.
A number of predefined preprocessor macros are provided, as described in
Section 3.4.6,
“
Predefined
Macros.
”
The pragmas described in
Section 3.4.5,
“
Pragmas,
”
are available in all modes.
3.4.1.1.2 Syntax
The following syntax extensions are accepted:
A translation unit (input file) can be empty, containing no declarations.
An extra comma is allowed at the end of an
enum
list. Similarly, the final semicolon preceding the
closing
}
of a struct or union specifier may be omitted. A remark is issued in both cases, except in
pcc
mode.
A label definition may be followed immediately by a right brace. (Normally, a label definition must
be followed by a statement.) A warning is issued.
An empty declaration (a semicolon with nothing before it) is allowed. A remark is issued.
An initializer expression that is a single value and is used to initialize an entire static array,
struct
,
or
union
need not be enclosed in braces, except in strict ANSI C mode.
A
struct
that has no named fields, but which has at least one unnamed field, is accepted by default.
A diagnostic (a warning or error) is issued in strict ANSI C mode.
3.4.1.1.3 Declarations
The following declaration extensions are accepted:
Static functions may be declared in function and block scopes. Their declarations are moved to the
file scope.
Benign redeclarations of
typedef
names are allowed, meaning that a
typedef
name may be
redeclared in the same scope as the same type. A warning is issued.
The compiler always accepts
asm
statements and declarations, with one exception, which is when
compiling in strict ANSI C mode. The reason for this is that there would be a conflict with the ANSI
C standard. For example,
asm("xyz");
would be interpreted by the Front End as an
asm
statement
by default, while ANSI C would interpret this as a call of an implicitly-defined function
asm
.
Functions declared as
asm
functions are accepted, and
__asm
is recognized as a synonym for
asm
.
An
asm
function body is represented by an uninterpreted null-terminated string containing the text
that appears in the source.