Bug 251270 - dirname in libgen.h relies on C11 features
Summary: dirname in libgen.h relies on C11 features
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: standards (show other bugs)
Version: 12.2-STABLE
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-standards (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-11-20 13:15 UTC by Simon Ser
Modified: 2020-11-24 22:58 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Ser 2020-11-20 13:15:21 UTC
Building a program which calls `dirname` in C99 mode results in the following error:

https://builds.sr.ht/~emersion/job/347469#bottom

Instead, the compat selection which uses C11's _Generic should be disabled when building with C99 mode.
Comment 1 Mark Johnston freebsd_committer freebsd_triage 2020-11-24 22:58:04 UTC
Perhaps cdefs.h should be using __has_feature instead of __has_extension when defining __generic().