Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Mar 2026 04:21:49 +0000
From:      bugzilla-noreply@freebsd.org
To:        standards@FreeBSD.org
Subject:   [Bug 294131] stdbit.h does not define types required by C23 and C2y
Message-ID:  <bug-294131-99@https.bugs.freebsd.org/bugzilla/>

index | next in thread | raw e-mail

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294131

            Bug ID: 294131
           Summary: stdbit.h does not define types required by C23 and C2y
           Product: Base System
           Version: 16.0-CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: standards
          Assignee: standards@FreeBSD.org
          Reporter: collin.funk1@gmail.com

C23 ยง 7.18.1 states that "This header makes available the size_t type name
(7.21) and any uintN_t, intN_t, uint_leastN_t, or int_leastN_t type names
defined by the implementation (7.22)."

This is not the case on FreeBSD 16.0-CURRENT. Here is an trivial example
program that should compile, but does not:

$ cat main.c 
#include <stdbit.h>
int
main (void)
{
  size_t v1 = 0;
  uint32_t v2 = 0;
  return v1 = v2;
}
$ cc main.c
main.c:5:3: error: use of undeclared identifier 'size_t'; did you mean
'sizeof'?
    5 |   size_t v1 = 0;
      |   ^~~~~~
      |   sizeof
main.c:5:13: error: expression is not assignable
    5 |   size_t v1 = 0;
      |   ~~~~~~~~~ ^
main.c:5:10: error: use of undeclared identifier 'v1'
    5 |   size_t v1 = 0;
      |          ^
main.c:6:3: error: use of undeclared identifier 'uint32_t'
    6 |   uint32_t v2 = 0;
      |   ^
main.c:7:10: error: use of undeclared identifier 'v1'
    7 |   return v1 = v2;
      |          ^
main.c:7:15: error: use of undeclared identifier 'v2'
    7 |   return v1 = v2;
      |               ^
6 errors generated.

-- 
You are receiving this mail because:
You are the assignee for the bug.

home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-294131-99>