Skip to content

importC: complex fails when passing real and imaginary initializers for non windows systems. #22259

Description

@Emmankoko
#include <complex.h>
#include <stdio.h>

void foo()
{
    _Complex double x = 1 + 1.0if;
    return;
}


int main()
{
    return 0;
}
zcomplex.c(8): Error: cannot implicitly convert expression `_Complex(0.0F, 1.0F).opBinaryRight(1)` of type `_Complex!float` to `_Complex!double`
zcomplex.c(8):        `x = _Complex(0.0F, 1.0F).opBinaryRight(1)` is the first assignment of `x` therefore it represents its initialization
zcomplex.c(8):        `opAssign` methods are not used for initialization, but for subsequent assignments

`

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions