On Sun, 12 Jan 2025, Samuel Thibault wrote:
> @@ -31,6 +32,29 @@ __clock_gettime (clockid_t clock_id, struct timespec *ts)
>
> switch (clock_id) {
>
> + case CLOCK_MONOTONIC:
> + /* If HAVE_HOST_GET_UPTIME64 is not defined or not available,
> + CLOCK_MONOTONIC will be equivalent to CLOCK_REALTIME. */
> +#ifdef HAVE_HOST_GET_UPTIME64
> + {
> + time_value64_t tv;
> + err = __host_get_uptime64 (__mach_host_self (), &tv);
> +
> + if (err != MIG_BAD_ID)
> + {
> + if (err)
> + {
> + __set_errno (err);
> + return -1;
> + }
> +
> + TIME_VALUE64_TO_TIMESPEC (&tv, ts);
> + return 0;
> + }
> + }
> + /* FALLTHROUGH */
> +#endif
I'm seeing an implicit-fallthrough error here with GCC 14 in
build-many-glibcs.py, the /* FALLTHROUGH */ doesn't seem to be effective
in this case for some reason.
--
Joseph S. Myers
[email protected]