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

            Bug ID: 111604
           Summary: bogus warning: '#' flag used with ‘%m’ gnu_printf
                    format
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: crrodriguez at opensuse dot org
  Target Milestone: ---

errno = EINVAL;
        printf("%#m");

Causes warning: '#' flag used with ‘%m’ gnu_printf format [-Wformat=]

It is a perfectly valid format string in glibc 2.35 or later where %#m ==
strerrorname_np(errno)

Reply via email to