https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63366

            Bug ID: 63366
           Summary: C++ __complex is not equivalent to __complex double
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: thopre01 at gcc dot gnu.org

Created attachment 33559
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33559&action=edit
Testcase showing that __complex is not equivalent to __complex double in C++

In function grokdeclarator () in cp/decl.c there is the following comment:

      /* If we just have "complex", it is equivalent to
         "complex double", but if any modifiers at all are specified it is
         the complex form of TYPE.  E.g, "complex short" is
         "complex short int".  */

However in practice __complex is equivalent to __complex int. The attached
testcase shows the problem and can be modified to try against __complex int.

Best regards.

Reply via email to