Skip to content

mkc_check_decl prototype does not longer work in GCC 16 #33

@carlosrodfern

Description

@carlosrodfern

The check for prototype does not longer work in GCC 16.

How to Reproduce:

podman run -it fedora:44 /bin/bash
# inside container
dnf install -y mk-configure

mkc_check_decl prototype 'char* strstr(const char*, const char* )' string.h
# it returns 0

The same steps but for GCC 15 in fedora:43 returns 1.

It comes down to the generated code for prototype check does no longer compiled:

Generated code:

#include <string.h>
void func2 (void);
void func (void);
void func2 (void)
{
   if (strstr) return;
}
char* strstr(const char*, const char* );
void func (void)
{
   if (strstr) return;
}

Error message:

In file included from /usr/include/features.h:540,
                 from /usr/include/bits/libc-header-start.h:33,
                 from /usr/include/string.h:26,
                 from ./_mkc_prototype_char8~strstr_const~char8,~const~char8~__string_h.c:1:
./_mkc_prototype_char8~strstr_const~char8,~const~char8~__string_h.c:8:7: error: expected identifier or '(' before '_Generic'
    8 | char* strstr(const char*, const char* );
      |       ^~~~~~

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions