This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

C6000-CGT: Compile issue caused by '#define trunc' in math.h

Part Number: C6000-CGT

It seems that the standard include file math.h has a define for trunc, this gives issues with std::ios::trunc symbol (defined in e.g. ios). The following code snippet does not compile with cgt-6000 8.3.9 and shows how the problem can be replicated.

#include <iostream> // includes ios and thus std::ios::trunc is defined
#include <math.h> // implements trunc with a define to e.g. __c6xabi_trunc, rather than an inline function
#include <fstream> // looking for std::ios::__c6xabi_trunc instead of std::ios::trunc