Issue Details (XML | Word | Printable)

Key: PCC-331
Type: Bug Bug
Status: Closed Closed
Resolution: Won't Fix
Priority: Major Major
Assignee: Anders Magnusson
Reporter: Fred J. Tydeman
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
pcc

cast to float _Complex not liked

Created: 23/Apr/11 07:22 PM   Updated: 01/May/14 09:55 AM
Component/s: None
Affects Version/s: None
Fix Version/s: None

Environment: Intel Core i5 (64 bit); Linux Fedora Core 14 (64 bit); pcc of 2011/04/01


 Description  « Hide
Code similar to:

#define I (0.f + 1.fi) /* or (1.fi) */
#define FC float _Complex
#define FC_C(r,i) ((FC)((r) + (i)*I))
static FC fc1 = FC_C( 1.f, 1.f );

gets operands of CAST have incompatible types for either definition of I


 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Anders Magnusson added a comment - 28/Apr/11 04:37 PM
Even though this error is erroneous, it would fail anyway because pcc cannot do compile-time evaluation of complex numbers yet. This will be added later.

Anders Magnusson added a comment - 01/May/14 09:55 AM
Now gives error message "constant required" instead. No compile-time, only run-time evaluation of complex numbers.