CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
66 lines
2.1 KiB
C
66 lines
2.1 KiB
C
// RUN: %clang_cc1 -fsyntax-only -Wno-strict-prototypes -verify %s
|
|
|
|
void f() {
|
|
int *ptr = malloc(sizeof(int) * 10); // expected-error{{call to undeclared library function 'malloc' with type}} \
|
|
// expected-note{{include the header <stdlib.h> or explicitly provide a declaration for 'malloc'}} \
|
|
// expected-note{{'malloc' is a builtin with type 'void *}}
|
|
}
|
|
|
|
void *alloca(__SIZE_TYPE__); // redeclaration okay
|
|
|
|
int *calloc(__SIZE_TYPE__, __SIZE_TYPE__); // expected-warning{{incompatible redeclaration of library function 'calloc'}} \
|
|
// expected-note{{'calloc' is a builtin with type 'void *}}
|
|
|
|
|
|
void g(int malloc) { // okay: these aren't functions
|
|
int calloc = 1;
|
|
}
|
|
|
|
void h() {
|
|
int malloc(int); // expected-warning{{incompatible redeclaration of library function 'malloc'}}
|
|
int strcpy(int); // expected-warning{{incompatible redeclaration of library function 'strcpy'}} \
|
|
// expected-note{{'strcpy' is a builtin with type 'char *(char *, const char *)'}}
|
|
}
|
|
|
|
void f2() {
|
|
fprintf(0, "foo"); // expected-warning{{declaration of built-in function 'fprintf' requires inclusion of the header <stdio.h>}} \
|
|
expected-error {{call to undeclared function 'fprintf'; ISO C99 and later do not support implicit function declarations}}
|
|
}
|
|
|
|
// PR2892
|
|
void __builtin_object_size(); // expected-error{{conflicting types}} \
|
|
// expected-note{{'__builtin_object_size' is a builtin with type}}
|
|
|
|
int a[10];
|
|
|
|
int f0() {
|
|
return __builtin_object_size(&a); // expected-error {{too few arguments to function}}
|
|
}
|
|
|
|
void * realloc(void *p, int size) { // expected-warning{{incompatible redeclaration of library function 'realloc'}} \
|
|
// expected-note{{'realloc' is a builtin with type 'void *(void *,}}
|
|
return p;
|
|
}
|
|
|
|
// PR3855
|
|
void snprintf(); // expected-warning{{incompatible redeclaration of library function 'snprintf'}} \
|
|
// expected-note{{'snprintf' is a builtin}}
|
|
|
|
int
|
|
main(int argc, char *argv[])
|
|
{
|
|
snprintf();
|
|
}
|
|
|
|
void snprintf() { }
|
|
|
|
void longjmp();
|
|
|
|
extern float fmaxf(float, float);
|
|
|
|
struct __jmp_buf_tag {};
|
|
void sigsetjmp(struct __jmp_buf_tag[1], int);
|
|
|
|
// PR40692
|
|
void pthread_create(); // no warning expected
|