[all-commits] [llvm/llvm-project] 2c6586: [clang] Remove fixed point arithmetic error (#71884)

PiJoules via All-commits all-commits at lists.llvm.org
Mon Nov 13 12:34:29 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2c65860667e202e182264d5c6dfe4c2961542f7d
      https://github.com/llvm/llvm-project/commit/2c65860667e202e182264d5c6dfe4c2961542f7d
  Author: PiJoules <6019989+PiJoules at users.noreply.github.com>
  Date:   2023-11-13 (Mon, 13 Nov 2023)

  Changed paths:
    M clang/include/clang/Basic/DiagnosticCommonKinds.td
    M clang/include/clang/Basic/TokenKinds.def
    M clang/lib/Basic/IdentifierTable.cpp
    M clang/lib/Parse/ParseDecl.cpp
    A clang/test/Frontend/fixed_point_as_variables.c
    M clang/test/Frontend/fixed_point_not_enabled.c

  Log Message:
  -----------
  [clang] Remove fixed point arithmetic error (#71884)

Prior to this, clang would always report

```
compile with '-ffixed-point' to enable fixed point types
```

whenever it sees `_Accum`, `_Fract`, or `_Sat` when fixed point
arithmetic is not enabled. This can break existing code that uses these
as variable names and doesn't use fixed point arithmetic like in some
microsoft headers

(https://github.com/llvm/llvm-project/pull/67750#issuecomment-1775264907).

Fixed point should not raise this error for these cases, so this removes
the error altogether and defaults to the usual error clang gives where
it can see these keywords as either unknown types or regular variables.




More information about the All-commits mailing list