Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rule 10.3, conversion from complex types to real floating types
#4
Sorry, you are correct.
_Complex indeed is standardized in C99.
The basic type is identical, while the size is not (see quotes below).
So, in my opinion, the mixed assignments in your sample code could be classified as violating 10.3 because of a "narrower essential type".
Let´s wait for an official statement.

Quote:For each floating type there is a corresponding real type, which is always a real floating
type. For real floating types, it is the same type. For complex types, it is the type given
by deleting the keyword _Complex from the type name

Quote:Each complex type has the same representation and alignment requirements as an array
type containing exactly two elements of the corresponding real type; the first element is
equal to the real part, and the second element to the imaginary part, of the complex
number.
<t></t>


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)