Ansi c compliance and restrictions, Introduction, Language – Altera Nios II C2H Compiler User Manual

Page 125: Declarations, Unsupported types (section 6.7.2, paragraph 1), Chapter 7. ansi c compliance and restrictions, Introduction –1 language –1, Chapter 7, ansi c compliance and restrictions

Advertising
background image

Altera Corporation

9.1

7–1

November 2009

7. ANSI C Compliance and

Restrictions

Introduction

The Nios II C-to-Hardware Acceleration (C2H) Compiler supports a large
subset of the ANSI C language as described in Chapter 5 and Chapter 6
of the ISO/IEC 9899:1999(E) Specification. The current Nios II
C2H Compiler does not support the C++ programming language or the
library functions described in Chapter 7 of the ISO/IEC 9899:1999(E)
Specification
.

This chapter describes Nios II C2H Compiler restrictions, including
unsupported ANSI C language syntax, semantics, and constraints.

Language

This section refers to Chapter 6 of the ISO/IEC 9899:1999(E) Specification.
Section and paragraph numbers from the ISO/IEC 9899:1999(E)
Specification
are cited in parentheses.

Declarations

The C2H Compiler supports the majority of data types used in the C
programming language. The following sections describe C2H restrictions
on C declarations.

Unsupported Types (Section 6.7.2, Paragraph 1)

The following types are not supported by the C2H Compiler:

float

- section 6.3.1.5

double

- section 6.3.1.5

_Complex

– section 6.3.1.7

_Bool

– section 6.3.1.2

_Imaginary

– section 6.3.1.7

The following types are supported if specific

conditions are met:

Floating constants are supported only after casting to a supported
type.

For example, the following code casts

π to an integer constant:

constant int pi - (int) 3.142957142957;

Advertising