<< Back to previous view

[PCC-331] cast to float _Complex not liked Created: 23/Apr/11  Updated: 01/May/14

Status: Closed
Project: pcc
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Fred J. Tydeman Assignee: Anders Magnusson
Resolution: Won't Fix Votes: 0
Environment: Intel Core i5 (64 bit); Linux Fedora Core 14 (64 bit); pcc of 2011/04/01


 Description   
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


 Comments   
Comment by Anders Magnusson [ 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.
Comment by Anders Magnusson [ 01/May/14 09:55 AM ]
Now gives error message "constant required" instead. No compile-time, only run-time evaluation of complex numbers.
Generated at Wed Nov 26 03:54:25 CET 2014 using JIRA Enterprise Edition, Version: 3.13.1-#333.