With:

#define __STDC_WANT_DEC_FP__
#include <stdio.h>

int main (void)
{
  double d = 0.1;
  _Decimal64 e = 0.1dd;
  printf ("%.20f\n", d);
  printf ("%Da\n", e);
  printf ("%De\n", e);
  printf ("%Df\n", e);
  printf ("%Dg\n", e);
  return 0;
}

$ gcc-snapshot -Wall tst.c
tst.c: In function 'main':
tst.c:9:3: warning: use of 'D' length modifier with 'a' type character

while WG14/N1312 says:

D   Specifies that a following a, A, e, E, f, F, g, or G conversion specifier
    applies to a _Decimal64 argument.


-- 
           Summary: Incorrect warning: use of 'D' length modifier with 'a'
                    type character
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: vincent at vinc17 dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43673

Reply via email to