deref-before-check-pr113253.c: Fix bogus warnings on lp32
Warnings about pointer sizes cause the test to fail incorrectly. A dummy return value is also added to set_marker_internal for completeness to suppress a -Wreturn-type warning even though gcc does not issue it by default. Signed-off-by: Jonathan Yong <10walls@gmail.com> gcc/testsuite/ChangeLog: PR analyzer/113253 * gcc.dg/analyzer/deref-before-check-pr113253.c: (ptrdiff_t): use stddef.h type. (uintptr_t): ditto. (EMACS_INT): ditto. (set_marker_internal): Add dummy 0 to suppress -Wreturn-type.
This commit is contained in:
parent
0f74d1e38a
commit
9ea6bdac02
1 changed files with 5 additions and 4 deletions
|
@ -5,12 +5,12 @@
|
|||
|
||||
/* { dg-additional-options "-O2 -g" } */
|
||||
|
||||
typedef long int ptrdiff_t;
|
||||
typedef unsigned long int uintptr_t;
|
||||
typedef long int EMACS_INT;
|
||||
typedef __PTRDIFF_TYPE__ ptrdiff_t;
|
||||
typedef __UINTPTR_TYPE__ uintptr_t;
|
||||
typedef __PTRDIFF_TYPE__ EMACS_INT;
|
||||
enum
|
||||
{
|
||||
EMACS_INT_WIDTH = 64,
|
||||
EMACS_INT_WIDTH = sizeof(EMACS_INT) * 8,
|
||||
VALBITS = EMACS_INT_WIDTH - 3,
|
||||
};
|
||||
typedef struct Lisp_X* Lisp_Word;
|
||||
|
@ -151,4 +151,5 @@ set_marker_internal(Lisp_Object position, Lisp_Object buffer)
|
|||
struct buffer* b = live_buffer(buffer);
|
||||
if (NILP(position) || (MARKERP(position) && !XMARKER(position)->buffer) || !b) /* { dg-bogus "Wanalyzer-deref-before-check" } */
|
||||
unchain_marker();
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue