iana marked an inline comment as done.
iana added inline comments.

================
Comment at: clang/lib/Headers/stddef.h:16
+    defined(__need_wint_t) ||                                                  
\
+    (defined(__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__ >= 1)
 
----------------
aaron.ballman wrote:
> C23 K.3.1.1p2: The functions, macros, and types declared or defined in K.3 
> and its subclauses are declared and defined by their respective headers if 
> __STDC_WANT_LIB_EXT1__ is defined as a macro which expands to the integer 
> constant 1 at the point in the source file where the appropriate header is 
> first included.
> 
> So I don't think this should be `>= 1`. Same below. (Though I notice we seem 
> to do this in other places, so perhaps that's more of a general cleanup we 
> should make?)
`>=1` is what stddef.h was already doing, so I'd vote do this later as general 
cleanup.


================
Comment at: clang/test/Headers/stddef.c:1-3
+// RUN: %clang_cc1 -fsyntax-only -triple x86_64-apple-macosx10.9.0 -verify=c99 
-std=c99 %s
+// RUN: %clang_cc1 -fsyntax-only -triple x86_64-apple-macosx10.9.0 -verify=c11 
-std=c11 %s
+// RUN: %clang_cc1 -fsyntax-only -triple x86_64-apple-macosx10.9.0 -verify=c23 
-std=c23 %s
----------------
aaron.ballman wrote:
> Are the triples necessary? Better if we can remove them.
They shouldn't be, I just copied them from stddefneeds.cpp, let me try getting 
rid of them


================
Comment at: clang/test/Headers/stddef.c:7
+
+ptrdiff_t p0; // c99-error{{unknown}} c11-error{{unknown}} c23-error{{unknown}}
+size_t s0; // c99-error{{unknown}} c11-error{{unknown}} c23-error{{unknown}}
----------------
aaron.ballman wrote:
> At least one of these `unknown` errors should be fully spelled out (the rest 
> can then be assumed to be the same wording as the long-form).
Let me know how this looks, I can just fully expand all of them if you prefer. 
I was going by stddefneeds.cpp as an example.


================
Comment at: clang/test/Headers/stddefneeds.c:1-2
+// RUN: %clang_cc1 -fsyntax-only -triple x86_64-apple-macosx10.9.0 -verify=c99 
-std=c99 %s
+// RUN: %clang_cc1 -fsyntax-only -triple x86_64-apple-macosx10.9.0 -verify=c23 
-std=c23 %s
+
----------------
aaron.ballman wrote:
> Do we need the triples?
Looks like no.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D157757/new/

https://reviews.llvm.org/D157757

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to