CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
51 lines
1.5 KiB
C
51 lines
1.5 KiB
C
// RUN: %clang_cc1 -verify -std=c99 -ffreestanding %s
|
|
// RUN: %clang_cc1 -verify -std=gnu89 -ffreestanding %s
|
|
// RUN: %clang_cc1 -verify -std=c89 -ffreestanding %s
|
|
// expected-no-diagnostics
|
|
|
|
/* WG14 ???: Clang 16
|
|
* Additional floating-point characteristics in <float.h>
|
|
*
|
|
* NB: the original paper number is unknown, this was gleaned from the editor's
|
|
* report in the C99 foreword. There were two new additions to <float.h> in
|
|
* C99, this is testing that we support both of them.
|
|
*
|
|
* Clang added the macros at least as far back as Clang 3.0, but it wasn't
|
|
* until Clang 16.0 that we stopped accidentally providing FLT_EVAL_METHOD in
|
|
* C89 (strict) mode.
|
|
*/
|
|
|
|
#include <float.h>
|
|
|
|
// We expect all the definitions in C99 mode.
|
|
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
|
#define EXPECT_DECIMAL_DIG
|
|
#define EXPECT_FLT_EVAL_METHOD
|
|
#endif
|
|
|
|
// If we're not in C99 mode, we still expect the definition of DECIMAL_DIG
|
|
// unless we're in strict ansi mode.
|
|
#if !defined(EXPECT_DECIMAL_DIG) && !defined(__STRICT_ANSI__)
|
|
#define EXPECT_DECIMAL_DIG
|
|
#endif
|
|
|
|
#if defined(EXPECT_DECIMAL_DIG)
|
|
#if !defined(DECIMAL_DIG)
|
|
#error "DECIMAL_DIG missing"
|
|
#endif
|
|
#else
|
|
#if defined(DECIMAL_DIG)
|
|
#error "DECIMAL_DIG provided when not expected"
|
|
#endif
|
|
#endif
|
|
|
|
#if defined(EXPECT_FLT_EVAL_METHOD)
|
|
#if !defined(FLT_EVAL_METHOD)
|
|
#error "FLT_EVAL_METHOD missing"
|
|
#endif
|
|
#else
|
|
#if defined(FLT_EVAL_METHOD)
|
|
#error "FLT_EVAL_METHOD provided when not expected"
|
|
#endif
|
|
#endif
|