| Age | Commit message (Collapse) | Author | Files | Lines |
|
In kernel's arch/mips/Makefile the whole content of gcc's -dM is used
for CHECKFLAGS. This conflict with some macros also defined internally:
builtin:1:9: warning: preprocessor token __ATOMIC_ACQUIRE redefined
builtin:0:0: this was the original definition
Fix this by using a weak define for these macros.
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
|
|
The __atomic_*() builtins take an int argument to specify the
desired memory ordering. The different admissible values are
predefined by the compiler, so do that too for Sparse.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
|
|
All the helpers for type-related predefines directly take in
argument the pointer to the type. All but predefine_width().
This must be an historical relic.
So, let predefine_width() also take the pointer to the type
as argument.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
|
|
These types are aliased to size_t & ssize_t but this is not
correct for all architectures.
So, add a variable for them so that target files can adjust them.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
|
|
This type is predefined by GCC so add it to sparse too.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
|
|
We just added __INT_LEAST${N}_TYPE__, so add these ones
too as they looks slightly more useful.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
|
|
These are used by some system headers (neon on arm64).
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
|
|
For CygWin, GCC defines some pseudo-specifiers like '__cdecl',
'__stdcall' or '_thiscall'. Some of these are already defined by cgcc.
So, add these predefines to sparse itself.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
|
|
Predefine macros like '__OpenBSD__', ... for the three BSDs,
CygWin and Darwin (those for Linus and SunOS were already defined).
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
|
|
On Darwin, '__unix__' & '__unix' doesn't seem to be predefined.
Don't ask me why.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
|
|
These are already defined in cgcc but not yet by sparse
itself. So, add them now.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
|
|
The function predefine() and its variants are only valid
if they define a single-token value.
However, when a type is signed, predefine_min() will produce
a multi-token value.
Fix this by using add_pre_buffer() instead of predefine().
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
|
|
Now that option parsing have moved to a separate file, move
everything related to predefined macros to a separate file too.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
|