[all-commits] [llvm/llvm-project] 5c63bf: [OpenCL] Add NULL to standards prior to v2.0.

Anastasia Stulova via All-commits all-commits at lists.llvm.org
Fri Jul 23 03:55:10 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5c63bf3abdc74b02c58c21cb0571eb4ba12b5235
      https://github.com/llvm/llvm-project/commit/5c63bf3abdc74b02c58c21cb0571eb4ba12b5235
  Author: Anastasia Stulova <anastasia.stulova at arm.com>
  Date:   2021-07-23 (Fri, 23 Jul 2021)

  Changed paths:
    M clang/lib/Headers/opencl-c-base.h
    M clang/test/SemaOpenCL/null_literal.cl

  Log Message:
  -----------
  [OpenCL] Add NULL to standards prior to v2.0.

NULL was undefined in OpenCL prior to version 2.0. However, the
language specification states that "macro names defined by the C99
specification but not currently supported by OpenCL are reserved
for future use". Therefore, application developers cannot redefine
NULL.

The change is supposed to resolve inconsistency between language
versions. Currently there is no apparent reason why NULL should
be kept undefined.

Patch by Topotuna (Justas Janickas)!

Differential Revision: https://reviews.llvm.org/D105988




More information about the All-commits mailing list