[clang] C89 doesn't have `math.h` functions (PR #129979)

2025-03-15 Thread Vinay Deshmukh via cfe-commits
https://github.com/vinay-deshmukh updated https://github.com/llvm/llvm-project/pull/129979 >From e9c7869550d9fd1eba4d4d42ee644540e6b6d445 Mon Sep 17 00:00:00 2001 From: Vinay Deshmukh <32487576+vinay-deshm...@users.noreply.github.com> Date: Tue, 4 Mar 2025 22:30:34 -0500 Subject: [PATCH 1/9] add

[clang] C89 doesn't have `math.h` functions (PR #129979)

2025-03-11 Thread Vinay Deshmukh via cfe-commits
https://github.com/vinay-deshmukh updated https://github.com/llvm/llvm-project/pull/129979 >From e9c7869550d9fd1eba4d4d42ee644540e6b6d445 Mon Sep 17 00:00:00 2001 From: Vinay Deshmukh <32487576+vinay-deshm...@users.noreply.github.com> Date: Tue, 4 Mar 2025 22:30:34 -0500 Subject: [PATCH 1/9] add

[clang] C89 doesn't have `math.h` functions (PR #129979)

2025-03-11 Thread Vinay Deshmukh via cfe-commits
https://github.com/vinay-deshmukh updated https://github.com/llvm/llvm-project/pull/129979 >From e9c7869550d9fd1eba4d4d42ee644540e6b6d445 Mon Sep 17 00:00:00 2001 From: Vinay Deshmukh <32487576+vinay-deshm...@users.noreply.github.com> Date: Tue, 4 Mar 2025 22:30:34 -0500 Subject: [PATCH 01/10] a

[clang] C89 doesn't have `math.h` functions (PR #129979)

2025-03-09 Thread Vinay Deshmukh via cfe-commits
https://github.com/vinay-deshmukh updated https://github.com/llvm/llvm-project/pull/129979 >From e9c7869550d9fd1eba4d4d42ee644540e6b6d445 Mon Sep 17 00:00:00 2001 From: Vinay Deshmukh <32487576+vinay-deshm...@users.noreply.github.com> Date: Tue, 4 Mar 2025 22:30:34 -0500 Subject: [PATCH 01/10] a

[clang] C89 doesn't have `math.h` functions (PR #129979)

2025-03-09 Thread Vinay Deshmukh via cfe-commits
https://github.com/vinay-deshmukh updated https://github.com/llvm/llvm-project/pull/129979 >From e9c7869550d9fd1eba4d4d42ee644540e6b6d445 Mon Sep 17 00:00:00 2001 From: Vinay Deshmukh <32487576+vinay-deshm...@users.noreply.github.com> Date: Tue, 4 Mar 2025 22:30:34 -0500 Subject: [PATCH 01/11] a

[clang] C89 doesn't have `math.h` functions (PR #129979)

2025-03-09 Thread Vinay Deshmukh via cfe-commits
https://github.com/vinay-deshmukh updated https://github.com/llvm/llvm-project/pull/129979 >From e9c7869550d9fd1eba4d4d42ee644540e6b6d445 Mon Sep 17 00:00:00 2001 From: Vinay Deshmukh <32487576+vinay-deshm...@users.noreply.github.com> Date: Tue, 4 Mar 2025 22:30:34 -0500 Subject: [PATCH 1/8] add

[clang] C89 doesn't have `math.h` functions (PR #129979)

2025-03-09 Thread Vinay Deshmukh via cfe-commits
https://github.com/vinay-deshmukh updated https://github.com/llvm/llvm-project/pull/129979 >From e9c7869550d9fd1eba4d4d42ee644540e6b6d445 Mon Sep 17 00:00:00 2001 From: Vinay Deshmukh <32487576+vinay-deshm...@users.noreply.github.com> Date: Tue, 4 Mar 2025 22:30:34 -0500 Subject: [PATCH 1/8] add

[clang] C89 doesn't have `math.h` functions (PR #129979)

2025-03-09 Thread Vinay Deshmukh via cfe-commits
https://github.com/vinay-deshmukh updated https://github.com/llvm/llvm-project/pull/129979 >From e9c7869550d9fd1eba4d4d42ee644540e6b6d445 Mon Sep 17 00:00:00 2001 From: Vinay Deshmukh <32487576+vinay-deshm...@users.noreply.github.com> Date: Tue, 4 Mar 2025 22:30:34 -0500 Subject: [PATCH 1/7] add

[clang] C89 doesn't have `math.h` functions (PR #129979)

2025-03-09 Thread Vinay Deshmukh via cfe-commits
https://github.com/vinay-deshmukh updated https://github.com/llvm/llvm-project/pull/129979 >From e9c7869550d9fd1eba4d4d42ee644540e6b6d445 Mon Sep 17 00:00:00 2001 From: Vinay Deshmukh <32487576+vinay-deshm...@users.noreply.github.com> Date: Tue, 4 Mar 2025 22:30:34 -0500 Subject: [PATCH 1/6] add

[clang] C89 doesn't have `math.h` functions (PR #129979)

2025-03-09 Thread Vinay Deshmukh via cfe-commits
vinay-deshmukh wrote: I'm a bit confused about the whole what is not UB/IFNDR in C89, but is in C99. Based on my current understanding the simplest way to resolve the issue seems to what I've done as of: 7572c21 Is not define builtins for symbols available in C89? let me know if that looks

[clang] C89 doesn't have `math.h` functions (PR #129979)

2025-03-09 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 91aac7c379fb92348593d51e3f2d9e490ff67526 160d719b7ed5997d39accb110df873e6200991d4 --e

[clang] C89 doesn't have `math.h` functions (PR #129979)

2025-03-09 Thread Vinay Deshmukh via cfe-commits
https://github.com/vinay-deshmukh updated https://github.com/llvm/llvm-project/pull/129979 >From e9c7869550d9fd1eba4d4d42ee644540e6b6d445 Mon Sep 17 00:00:00 2001 From: Vinay Deshmukh <32487576+vinay-deshm...@users.noreply.github.com> Date: Tue, 4 Mar 2025 22:30:34 -0500 Subject: [PATCH 1/5] add

[clang] C89 doesn't have `math.h` functions (PR #129979)

2025-03-06 Thread A. Jiang via cfe-commits
frederick-vs-ja wrote: > While `log` does exist since C89 _within _, it should be allowed for > a `.c` to define `int log = 0;` because the `math.h` has not been included. > Thereby, even if `double log(double);` exists in C89 (in `math.h`), it's not > been declared in the current translation

[clang] C89 doesn't have `math.h` functions (PR #129979)

2025-03-06 Thread Vinay Deshmukh via cfe-commits
vinay-deshmukh wrote: > > Essentially all of math.h doesn't exist until `C99`: > > https://en.cppreference.com/w/c/numeric/math/log > > You seemed to misread the page. `logf` and `logl` exist since C99, while > `log` exists since C89. @frederick-vs-ja My bad, I should have better clarified

[clang] C89 doesn't have `math.h` functions (PR #129979)

2025-03-05 Thread Vinay Deshmukh via cfe-commits
https://github.com/vinay-deshmukh edited https://github.com/llvm/llvm-project/pull/129979 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] C89 doesn't have `math.h` functions (PR #129979)

2025-03-05 Thread A. Jiang via cfe-commits
frederick-vs-ja wrote: > Essentially all of math.h doesn't exist until `C99`: > https://en.cppreference.com/w/c/numeric/math/log You seemed to misread the page. `logf` and `logl` exist since C99, while `log` exists since C89. https://github.com/llvm/llvm-project/pull/129979 __

[clang] C89 doesn't have `math.h` functions (PR #129979)

2025-03-05 Thread Vinay Deshmukh via cfe-commits
https://github.com/vinay-deshmukh updated https://github.com/llvm/llvm-project/pull/129979 >From e9c7869550d9fd1eba4d4d42ee644540e6b6d445 Mon Sep 17 00:00:00 2001 From: Vinay Deshmukh <32487576+vinay-deshm...@users.noreply.github.com> Date: Tue, 4 Mar 2025 22:30:34 -0500 Subject: [PATCH 1/4] add

[clang] C89 doesn't have `math.h` functions (PR #129979)

2025-03-05 Thread Vinay Deshmukh via cfe-commits
https://github.com/vinay-deshmukh edited https://github.com/llvm/llvm-project/pull/129979 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] C89 doesn't have `math.h` functions (PR #129979)

2025-03-05 Thread Vinay Deshmukh via cfe-commits
https://github.com/vinay-deshmukh created https://github.com/llvm/llvm-project/pull/129979 Fixes #15522 >From e9c7869550d9fd1eba4d4d42ee644540e6b6d445 Mon Sep 17 00:00:00 2001 From: Vinay Deshmukh <32487576+vinay-deshm...@users.noreply.github.com> Date: Tue, 4 Mar 2025 22:30:34 -0500 Subject: [