Skip several analyzer socket tests on hppa*-*-hpux*
[official-gcc.git] / gcc / testsuite / c-c++-common / analyzer / errno-___errno.c
blob17ff8b7de9dc291c5197b6bff01f2897c70daff1
1 #include "analyzer-decls.h"
3 /* According to PR 107807 comment #2, Solaris implements "errno"
4 like this: */
6 extern int *___errno(void) __attribute__((__const__));
7 #define errno (*(___errno()))
10 extern void external_fn (void);
12 int test_reading_errno (void)
14 return errno;
17 void test_setting_errno (int val)
19 errno = val;
22 void test_storing_to_errno (int val)
24 __analyzer_eval (errno == val); /* { dg-warning "UNKNOWN" } */
25 errno = val;
26 __analyzer_eval (errno == val); /* { dg-warning "TRUE" } */
27 external_fn ();
28 __analyzer_eval (errno == val); /* { dg-warning "UNKNOWN" } */