RISCOS.com

www.riscos.com Technical Support:
Acorn C/C++

 

Acorn C/C++

Contents


Introduction

Installation of Acorn Desktop C

The C compiler

The C++ translator

This user guide

Useful references

Part 1 - Using the C tools

CC and C++

The underlying programs

Getting started with CC and C++

Libraries

File naming and placing conventions

Include file searching

The SetUp dialogue box

The SetUp menu

Output messages

The icon bar menu

Command lines

Worked examples

CMHG

Starting CMHG

The icon bar menu

Example output

Command line interface

ToANSI

ToANSI C translation

Starting ToANSI

The icon bar menu

Example output

Command line interface

ToPCC

ToPCC C translation

Starting ToPCC

The icon bar menu

Example output

Command line interface

Part 2 - C language issues

C implementation details

Implementation details

Identifiers

Data elements

Structured data types

Pointers

Arithmetic operations

Expression evaluation

Implementation limits

Standard implementation definition

Translation (A.6.3.1)

Environment (A.6.3.2)

Identifiers (A.6.3.3)

Characters (A.6.3.4)

Integers (A.6.3.5)

Floating point (A.6.3.6)

Arrays and pointers (A.6.3.7)

Registers (A.6.3.8)

Structures, unions, enumerations and bitfields (A.6.3.9)

Qualifiers (A.6.3.10)

Declarators (A.6.3.11)

Statements (A.6.3.12)

Preprocessing directives (A.6.3.13)

Library functions (A.6.3.14)

Extra features

#pragma directives

Special function declaration keywords

Special variable declaration keywords

The C library

assert.h

ctype.h

errno.h

float.h

limits.h

locale.h

math.h

setjmp.h

signal.h

stdarg.h

stddef.h

stdio.h

stdlib.h

string.h

time.h

The ANSI library

Extra functions

The Event library

Introduction

Registering and deregistering event handlers

Registering and deregistering message handlers

Quitting applications

Programmer interface

Initialisation

Polling

Registering handlers

Handlers

Example

The Wimp library

Programmer interface

The Toolbox library

The Render library

Part 3 - C++ language issues

C++ implementation details

Translation Limits

Identifiers (2.3)

Character Constants (2.5.2)

Floating Constants (2.5.3)

String Literals (2.5.4)

Start and Termination (3.4)

Fundamental Types (3.6.1)

Integral Conversions (4.2)

Expressions (5)

Function Call (5.2.2)

Explicit Type Conversion (5.4)

Multiplicative Operators (5.6)

Shift Operators (5.8)

Relational Operators (5.9)

Storage Class Specifiers (7.1.1)

Type Specifiers (7.1.6)

Asm Declarations (7.3)

Linkage Specifications (7.4)

Class Members (9.2)

Bitfields (9.6)

Multiple Base Classes (10.1)

Argument Matching (13.2)

Exception Handling (experimental) (15)

Predefined Names (16.10)

The Streams library

Introduction

filebuf

fstream

ios

istream

manipulators

ostream

stdiobuf

streambuf - protected

streambuf - public

strstream

strstreambuf

The Complex Math library

Introduction

cartesian/polar

complex_error

exp, log, pow, sqrt

complex operators

cplxtrig

Part 4 - Developing software for RISC OS

Portability

General portability considerations

ANSI C vs K&R C

The ToPCC and ToANSI tools

pcc compatibility mode

Environmental aspects

Assembly language interface

Register names

Register usage

Control arrival

Passing arguments

Return link

Structure results

Storage of variables

Function workspace

Examples

How to write relocatable modules in C

Getting started

Constraints on modules written in C

Overview of modules written in C

Functional components of modules written in C

Overlays

Paging vs overlays

When to use overlays

Part 5 - Appendixes

Changes to the C compiler

C errors and warnings

Interpreting CC errors and warnings

Warnings

Non-serious errors

Serious errors

Fatal errors

System errors

C++ errors and warnings

'Not implemented' messages

© 3QD Developments Ltd 2013