Skip to content

Commit

Permalink
[libc] Add *_HAS_SUBNORM to float.h (#102182)
Browse files Browse the repository at this point in the history
Summary:
These should be defined, since we provide `float.h` it will override the
Clang resource dir and not provide it.
  • Loading branch information
jhuber6 authored Aug 7, 2024
1 parent 6b6abf0 commit 3c391a6
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions libc/include/llvm-libc-macros/float-macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,18 @@
#define LDBL_MAX_10_EXP __LDBL_MAX_10_EXP__
#endif // LDBL_MAX_10_EXP

#ifndef FLT_HAS_SUBNORM
#define FLT_HAS_SUBNORM __FLT_HAS_DENORM__
#endif // FLT_HAS_SUBNORM

#ifndef DBL_HAS_SUBNORM
#define DBL_HAS_SUBNORM __DBL_HAS_DENORM__
#endif // DBL_HAS_SUBNORM

#ifndef LDBL_HAS_SUBNORM
#define LDBL_HAS_SUBNORM __LDBL_HAS_DENORM__
#endif // LDBL_HAS_SUBNORM

// TODO: Add FLT16 and FLT128 constants.

#endif // LLVM_LIBC_MACROS_FLOAT_MACROS_H

0 comments on commit 3c391a6

Please sign in to comment.