| Age | Commit message (Collapse) | Author |
|
This was caught by the following test:
```
int main(void) {
char c[32];
memcpy(c, c + 16, 16);
}
```
Reported-by: q66
|
|
Clang's [documentation](https://clang.llvm.org/docs/LanguageExtensions.html#has-builtin) says:
> __has_builtin should not be used to detect support for a builtin macro; use #ifdef instead.
So we're now using both, since it's often tedious/non-trivial to find out
what is a macro and what is a compiler builtin, across compilers and C
versions.
|
|
|
|
|
|
Fixes https://github.com/jvoisin/fortify-headers/issues/31
|
|
This should fix #32
|
|
|
|
|
|
|
|
|
|
|
|
|
|
If the compiler doesn't know about `__builtin_trap`,
use `abort` instead.
|
|
|
|
|
|
|
|
|
|
|
|
- s/CLFAGS/CFLAGS/
- provide paths to local includes
- sprinkle more __pass_object_size__
- remove a problematic test
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
See https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html for
details
|
|
GCC and Clang provide __builtin_dynamic_object_size
(see documentation: https://gcc.gnu.org/onlinedocs/gcc/Object-Size-Checking.html),
so we should make use of it when its available.
|
|
|
|
Newer compilers default to GNU11, a C11 dialect. Some software however
is unprepared for this or has wrong compatibility checks. What happens
is that some software will for compatibility with C89
#define inline
before inclusion of a standard header, which is undefined behaviour in
C99 and above (C99/C11 7.1.2/4), as inline is a keyword.
If any libc headers that are then included via #include_next provide an
__inline macro definition (current musl does this if C++ or C99 and
above is detected) like the following
#define __inline inline
this results in any __inline token to be preprocessed away.
This breaks use of __builtin_va_arg_pack() in our stdio.h at
compile-time as it can only be used in always inlined functions. The
function attributes __always_inline__ and __gnu_inline__ themselves
require an inline specifier on the function to be applied.
|
|
|
|
The predefined __USER_LABEL_PREFIX__ macro if it is non-empty contains
an identifier, not a string literal, thus it needs to be stringified.
|
|
|
|
|