]> andersk Git - splint.git/commitdiff
Fixed anytype resolution.
authorevans1629 <evans1629>
Mon, 18 Mar 2002 01:54:51 +0000 (01:54 +0000)
committerevans1629 <evans1629>
Mon, 18 Mar 2002 01:54:51 +0000 (01:54 +0000)
20 files changed:
Makefile.am
Makefile.in
configure
configure.ac
lib/posix.h
lib/standard.h
lib/unix.h
src/Headers/globSet.h
src/Headers/llerror.h
src/Headers/uentry.h
src/cgrammar.c.der
src/cgrammar.y
src/clabstract.c
src/cscanner.l
src/ctype.c
src/llmain.c
src/qtype.c
src/sRef.c
src/uentry.c
test/Makefile.in

index efb1efc371bf0b60dee46169bc50ad181f79925e..3beeb1d1ed222197099ad1811f6c2b65bd5794f6 100644 (file)
@@ -24,6 +24,8 @@
 ## To report a bug: splint-bug@splint.org
 ## 
 
+.PHONY: test
+
 AUTOMAKE_OPTIONS = 1.5 foreign
 
 binaryfixscript = ./fixBinaryDist.sh
index b48371b8d7e14a4f72a814018f02694503fec93b..db6f0e412b88a8acf649f2323bf19d98c51255b5 100644 (file)
@@ -111,7 +111,7 @@ RECURSIVE_TARGETS = info-recursive dvi-recursive install-info-recursive \
        uninstall-info-recursive all-recursive install-data-recursive \
        install-exec-recursive installdirs-recursive install-recursive \
        uninstall-recursive check-recursive installcheck-recursive
-DIST_COMMON = README ./stamp-h.in ChangeLog Makefile.am Makefile.in \
+DIST_COMMON = README ./stamp-h.in Makefile.am Makefile.in TODO \
        acinclude.m4 aclocal.m4 config.hin config/config.guess \
        config/config.sub config/depcomp config/install-sh \
        config/missing config/mkinstalldirs configure configure.ac
@@ -423,6 +423,8 @@ uninstall-info: uninstall-info-recursive
        uninstall-info-recursive uninstall-recursive
 
 
+.PHONY: test
+
 #try to remake these but don't stop if it fails.
 configure.binary:configure.binary.ac
        -autoconf -oconfigure.binary configure.binary.ac
index 53d362d0fb82e219114825fcc375fef4954d4de5..322c3edea33acb85c2b045d0e6f0ac22046174a1 100755 (executable)
--- a/configure
+++ b/configure
@@ -3053,9 +3053,13 @@ fi
 myprefix=$prefix
 test x$myprefix = xNONE && myprefix=$ac_default_prefix
 
+### Yuck!  This is really kludgey, but I don't understand autoconf well
+### enough to do something simple that always works.  Hopefully this does.
+
 # cpplib.h defines 2 include dirs; one is $includedir, the other is gcc's
 # include dir.  Not the most portable setup, but let's do our best.
-if test x$ac_cv_c_compiler_gnu = xyes; then
+
+if test x$GCC = xyes; then
 
 # This breaks on gcc-3.0 on redhat fixing drl 11-15-2001
 #  GCC_INCLUDE_DIR=`LANGUAGE= LANG= $CC -v 2>&1 | sed -e '/^gcc/ d' -e 's/.* \(.*\)specs/\1include/'`
@@ -3067,6 +3071,12 @@ cat >>confdefs.h <<EOF
 #define GCC_INCLUDE_DIR "$GCC_INCLUDE_DIR"
 EOF
 
+else
+
+cat >>confdefs.h <<EOF
+#define GCC_INCLUDE_DIR "/usr/include"
+EOF
+
 fi
 
 cat >>confdefs.h <<EOF
@@ -3249,12 +3259,12 @@ s/^[^=]*=[      ]*$//;
 }'
 fi
 
-DEFS=-DHAVE_CONFIG_H 
+DEFS=-DHAVE_CONFIG_H
 
 : ${CONFIG_STATUS=./config.status}
 ac_clean_files_save=$ac_clean_files
 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ echo "$as_me:3257: creating $CONFIG_STATUS" >&5
+{ echo "$as_me:3267: creating $CONFIG_STATUS" >&5
 echo "$as_me: creating $CONFIG_STATUS" >&6;}
 cat >$CONFIG_STATUS <<_ACEOF
 #! $SHELL
@@ -3430,7 +3440,7 @@ cat >>$CONFIG_STATUS <<\EOF
     echo "$ac_cs_version"; exit 0 ;;
   --he | --h)
     # Conflict between --help and --header
-    { { echo "$as_me:3433: error: ambiguous option: $1
+    { { echo "$as_me:3443: error: ambiguous option: $1
 Try \`$0 --help' for more information." >&5
 echo "$as_me: error: ambiguous option: $1
 Try \`$0 --help' for more information." >&2;}
@@ -3449,7 +3459,7 @@ Try \`$0 --help' for more information." >&2;}
     ac_need_defaults=false;;
 
   # This is an error.
-  -*) { { echo "$as_me:3452: error: unrecognized option: $1
+  -*) { { echo "$as_me:3462: error: unrecognized option: $1
 Try \`$0 --help' for more information." >&5
 echo "$as_me: error: unrecognized option: $1
 Try \`$0 --help' for more information." >&2;}
@@ -3503,7 +3513,7 @@ do
   "bin/Makefile" ) CONFIG_FILES="$CONFIG_FILES bin/Makefile" ;;
   "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
   "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.hin" ;;
-  *) { { echo "$as_me:3506: error: invalid argument: $ac_config_target" >&5
+  *) { { echo "$as_me:3516: error: invalid argument: $ac_config_target" >&5
 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
    { (exit 1); exit 1; }; };;
   esac
@@ -3753,7 +3763,7 @@ done; }
   esac
 
   if test x"$ac_file" != x-; then
-    { echo "$as_me:3756: creating $ac_file" >&5
+    { echo "$as_me:3766: creating $ac_file" >&5
 echo "$as_me: creating $ac_file" >&6;}
     rm -f "$ac_file"
   fi
@@ -3771,7 +3781,7 @@ echo "$as_me: creating $ac_file" >&6;}
       -) echo $tmp/stdin ;;
       [\\/$]*)
          # Absolute (can't be DOS-style, as IFS=:)
-         test -f "$f" || { { echo "$as_me:3774: error: cannot find input file: $f" >&5
+         test -f "$f" || { { echo "$as_me:3784: error: cannot find input file: $f" >&5
 echo "$as_me: error: cannot find input file: $f" >&2;}
    { (exit 1); exit 1; }; }
          echo $f;;
@@ -3784,7 +3794,7 @@ echo "$as_me: error: cannot find input file: $f" >&2;}
            echo $srcdir/$f
          else
            # /dev/null tree
-           { { echo "$as_me:3787: error: cannot find input file: $f" >&5
+           { { echo "$as_me:3797: error: cannot find input file: $f" >&5
 echo "$as_me: error: cannot find input file: $f" >&2;}
    { (exit 1); exit 1; }; }
          fi;;
@@ -3845,7 +3855,7 @@ for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
   * )   ac_file_in=$ac_file.in ;;
   esac
 
-  test x"$ac_file" != x- && { echo "$as_me:3848: creating $ac_file" >&5
+  test x"$ac_file" != x- && { echo "$as_me:3858: creating $ac_file" >&5
 echo "$as_me: creating $ac_file" >&6;}
 
   # First look for the input files in the build tree, otherwise in the
@@ -3856,7 +3866,7 @@ echo "$as_me: creating $ac_file" >&6;}
       -) echo $tmp/stdin ;;
       [\\/$]*)
          # Absolute (can't be DOS-style, as IFS=:)
-         test -f "$f" || { { echo "$as_me:3859: error: cannot find input file: $f" >&5
+         test -f "$f" || { { echo "$as_me:3869: error: cannot find input file: $f" >&5
 echo "$as_me: error: cannot find input file: $f" >&2;}
    { (exit 1); exit 1; }; }
          echo $f;;
@@ -3869,7 +3879,7 @@ echo "$as_me: error: cannot find input file: $f" >&2;}
            echo $srcdir/$f
          else
            # /dev/null tree
-           { { echo "$as_me:3872: error: cannot find input file: $f" >&5
+           { { echo "$as_me:3882: error: cannot find input file: $f" >&5
 echo "$as_me: error: cannot find input file: $f" >&2;}
    { (exit 1); exit 1; }; }
          fi;;
@@ -3986,7 +3996,7 @@ cat >>$CONFIG_STATUS <<\EOF
   rm -f $tmp/in
   if test x"$ac_file" != x-; then
     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
-      { echo "$as_me:3989: $ac_file is unchanged" >&5
+      { echo "$as_me:3999: $ac_file is unchanged" >&5
 echo "$as_me: $ac_file is unchanged" >&6;}
     else
       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
index 40c2f209031896ee07508060f2ce3dca034b172d..d416af0b9fdd3f8e310766bba832d3266863b64a 100644 (file)
@@ -117,9 +117,14 @@ AC_SUBST(LCLOBJ)
 myprefix=$prefix
 test x$myprefix = xNONE && myprefix=$ac_default_prefix
 
+
+### Yuck!  This is really kludgey, but I don't understand autoconf well
+### enough to do something simple that always works.  Hopefully this does.
+
 # cpplib.h defines 2 include dirs; one is $includedir, the other is gcc's
 # include dir.  Not the most portable setup, but let's do our best.
-if test x$ac_cv_c_compiler_gnu = xyes; then
+
+if test x$GCC = xyes; then
   dnl Make sure to override NLS; this assumes gcc prints only
   dnl   Reading specs from blah
   dnl   gcc version blah
@@ -131,6 +136,8 @@ GCC_INCLUDE_DIR=/usr/include
 #  GCC_INCLUDE_DIR=`LANGUAGE= LANG= $CC -v 2>&1 | sed -n -e '/^gcc/ d' -e 's/.* \(.*\)specs/\1include/p'`
   AC_DEFINE_UNQUOTED(GCC_INCLUDE_DIR, "$GCC_INCLUDE_DIR",
                      [system include directory])
+else
+  AC_DEFINE_UNQUOTED(GCC_INCLUDE_DIR, "/usr/include", [system include directory])
 fi
 AC_DEFINE_UNQUOTED(GCC_INCLUDE_DIR2, "$myprefix/include",
                    [alternate include directory])
index da1d1dbcdb6bc428dd0ff7d69724141353641f10..6716ce83515b925372c0af50619303ffe68d1828 100644 (file)
@@ -827,7 +827,8 @@ pipe (/*@out@*/ int fd[]) /* Out parameter noticed by Marc Espie. */
        /*@modifies errno@*/;
 
 extern ssize_t read (int fd, /*@out@*/ void *buf, size_t nbyte)
-   /*@modifies errno, *buf@*/ /*@requires maxSet(buf) >= (nbyte - 1) @*/
+   /*@modifies errno, *buf@*/
+   /*@requires maxSet(buf) >= (nbyte - 1) @*/
    /*@ensures maxRead(buf) >= nbyte @*/ ;
 
 extern int rmdir (const char *path)
@@ -863,7 +864,8 @@ extern int unlink (const char *path)
    /*@modifies fileSystem, errno@*/;
 
 extern ssize_t write (int fd, const void *buf, size_t nbyte)
-   /*@modifies errno@*/;
+     /*@requires maxRead(buf) >= nbyte@*/
+     /*@modifies errno@*/;
 
 /*
 ** utime.h
index 20b39fbdf964c223744d0d298128d5de478e2c6c..ec91cf680d5bdf02ec1ca7195ef4f63a435deb8b 100644 (file)
@@ -881,7 +881,9 @@ void /*@alt char * @*/
 
 void /*@alt char * @*/
   strncpy (/*@unique@*/ /*@out@*/ /*@returned@*/ char *s1, char *s2, size_t n) 
-  /*@modifies *s1@*/      /*@requires maxSet(s1) >= ( n - 1 ); @*/ /*@ensures maxRead (s2) >= maxRead(s1) /\ maxRead (s1) <= n; @*/; 
+     /*@modifies *s1@*/ 
+     /*@requires maxSet(s1) >= ( n - 1 ); @*/
+     /*@ensures maxRead (s2) >= maxRead(s1) /\ maxRead (s1) <= n; @*/ ; 
 
 void /*@alt char * @*/
   strcat (/*@unique@*/ /*@returned@*/ char *s1, char *s2) 
index 56b35733044ece96e2bc7abda58005745da67a67..54ccec28804cc83d4a68b092428760f3105d9df8 100644 (file)
@@ -47,11 +47,6 @@ typedef /*@signedintegraltype@*/ suseconds_t;
 typedef /*@integraltype@*/ timer_t;
 typedef /*@unsignedintegraltype@*/ useconds_t;
 
-   /*-------------------------------------------------------------
-     -------------------------------------------------------------
-   */
-
-   
 /*
 ** Extra stuff in some unixen, not in posix.
 */
@@ -290,7 +285,6 @@ typedef u_long fixpt_t;
 typedef long segsz_t;
 typedef /*@abstract@*/ fd_set;
 
-int ttyname_r (int fg, /*@out@*/ char *buffer, int len) /*@modifies buffer@*/ ;
 int ioctl (int d, int /*@alt long@*/ request, /*@out@*/ void *arg) 
    /*@modifies *arg, errno@*/ ;  /* depends on request! */
 
@@ -866,13 +860,6 @@ int initgroups (const char *name, int basegid)
 lchown (const char *path, uid_t owner, gid_t group)
        /*@modifies errno, fileSystem@*/;
 
-       extern int
-readlink (const char *path, /*@out@*/ char *buf, int size)
-     /*@modifies *buf, errno@*/
-     /*drl 10/27/001*/
-     /*@requires maxSet(buf) >= (size - 1) @*/
-     /*@ensures result <= size @*/;
-
        extern int
 select (int mfd, fd_set /*@null@*/ *r, fd_set /*@null@*/ *w, fd_set /*@null@*/ *e, struct timeval *t)
        /*@modifies *r, *w, *e, *t, errno@*/;
@@ -1472,9 +1459,9 @@ int /*@alt lltX_bool@*/ S_TYPEISSHM  (/*@sef@*/ struct stat *buf) /*@*/ ;
 /* in POSIX: chmod, fstat, mkdir, mkfifo, stat, umask */
 
 int lstat(const char *, /*@out@*/ struct stat *)
-  /*:errorcode -1:*/
-  /*@modifies errno@*/ ;
-
+     /*:errorcode -1:*/
+     /*@modifies errno@*/ ;
+     
 int mknod (const char *, mode_t, dev_t)
   /*@warn portability "The only portable use of mknod is to create FIFO-special file. If mode is not S_IFIFO or dev is not 0, the behaviour of mknod() is unspecified."@*/
   /*:errorcode -1:*/
@@ -1488,6 +1475,39 @@ int fchflags (int fd, u_long flags)
   /*@warn unixstandard "Not in Single UNIX Specification Version 2"@*/
   /*@modifies fileSystem, errno@*/;
 
+/* evans 2002-03-17: this was missing, reported by Ralf Wildenhues */
+int fchmod(int fildes, mode_t mode) 
+   /*@modifies fileSystem, errno@*/ ; 
+  
+/*
+** sys/statvfs.h
+** from http://www.opengroup.org/onlinepubs/007908799/xsh/sysstatvfs.h.html
+*/
+
+struct statvfs {
+   unsigned long f_bsize;
+   unsigned long f_frsize;
+   fsblkcnt_t    f_blocks;
+   fsblkcnt_t    f_bfree;
+   fsblkcnt_t    f_bavail;
+   fsfilcnt_t    f_files;
+   fsfilcnt_t    f_ffree;
+   fsfilcnt_t    f_favail;                       
+   unsigned long f_fsid;
+   unsigned long f_flag;
+   unsigned long f_namemax; 
+} ;
+
+/*@constant unsigned long ST_RDONLY; @*/
+/*@constant unsigned long ST_NOSUID; @*/
+
+int fstatvfs (int fildes, /*@out@*/ struct statvfs *buf) 
+   /*@modifies buf@*/ ;
+
+int statvfs (const char *path, /*@out@*/ struct statvfs *buf)
+    /*@modifies buf@*/ ; 
+
+
 /*________________________________________________________________________
  * stropts.h
  */
@@ -1689,17 +1709,449 @@ struct hostent {
 
 /*
 ** unistd.h
+** from http://www.opengroup.org/onlinepubs/007908799/xsh/unistd.h.html
 */
 
+/*@constant int _POSIX_VERSION@*/
+/*@constant int _POSIX2_VERSION@*/
+/*@constant int _POSIX2_C_VERSION@*/
+/*@constant int _XOPEN_VERSION@*/
+/*@constant int _XOPEN_XCU_VERSION@*/
+
+/* for access: */
+
+/*@constant int R_OK@*/
+/*@constant int W_OK@*/
+/*@constant int X_OK@*/
+/*@constant int F_OK@*/
+
+/* for confstr: */
+/*@constant int _CS_PATH@*/
+/*@constant int _CS_XBS5_ILP32_OFF32_CFLAGS@*/
+/*@constant int _CS_XBS5_ILP32_OFF32_LDFLAGS@*/
+/*@constant int _CS_XBS5_ILP32_OFF32_LIBS@*/
+/*@constant int _CS_XBS5_ILP32_OFF32_LINTFLAGS@*/
+/*@constant int _CS_XBS5_ILP32_OFFBIG_CFLAGS@*/
+/*@constant int _CS_XBS5_ILP32_OFFBIG_LDFLAGS@*/
+/*@constant int _CS_XBS5_ILP32_OFFBIG_LIBS@*/
+/*@constant int _CS_XBS5_ILP32_OFFBIG_LINTFLAGS@*/
+/*@constant int _CS_XBS5_LP64_OFF64_CFLAGS@*/
+/*@constant int _CS_XBS5_LP64_OFF64_LDFLAGS@*/
+/*@constant int _CS_XBS5_LP64_OFF64_LIBS@*/
+/*@constant int _CS_XBS5_LP64_OFF64_LINTFLAGS@*/
+/*@constant int _CS_XBS5_LPBIG_OFFBIG_CFLAGS@*/
+/*@constant int _CS_XBS5_LPBIG_OFFBIG_LDFLAGS@*/
+/*@constant int _CS_XBS5_LPBIG_OFFBIG_LIBS@*/
+/*@constant int _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS@*/
+
+/* name parameters to sysconf: */
+
+/*@constant int _SC_2_C_BIND@*/
+/*@constant int _SC_2_C_DEV@*/
+/*@constant int _SC_2_C_VERSION@*/
+/*@constant int _SC_2_FORT_DEV@*/
+/*@constant int _SC_2_FORT_RUN@*/
+/*@constant int _SC_2_LOCALEDEF@*/
+/*@constant int _SC_2_SW_DEV@*/
+/*@constant int _SC_2_UPE@*/
+/*@constant int _SC_2_VERSION@*/
+/*@constant int _SC_ARG_MAX@*/
+/*@constant int _SC_AIO_LISTIO_MAX@*/
+/*@constant int _SC_AIO_MAX@*/
+/*@constant int _SC_AIO_PRIO_DELTA_MAX@*/
+/*@constant int _SC_ASYNCHRONOUS_IO@*/
+/*@constant int _SC_ATEXIT_MAX@*/
+/*@constant int _SC_BC_BASE_MAX@*/
+/*@constant int _SC_BC_DIM_MAX@*/
+/*@constant int _SC_BC_SCALE_MAX@*/
+/*@constant int _SC_BC_STRING_MAX@*/
+/*@constant int _SC_CHILD_MAX@*/
+/*@constant int _SC_CLK_TCK@*/
+/*@constant int _SC_COLL_WEIGHTS_MAX@*/
+/*@constant int _SC_DELAYTIMER_MAX@*/
+/*@constant int _SC_EXPR_NEST_MAX@*/
+/*@constant int _SC_FSYNC@*/
+/*@constant int _SC_GETGR_R_SIZE_MAX@*/
+/*@constant int _SC_GETPW_R_SIZE_MAX@*/
+/*@constant int _SC_IOV_MAX@*/
+/*@constant int _SC_JOB_CONTROL@*/
+/*@constant int _SC_LINE_MAX@*/
+/*@constant int _SC_LOGIN_NAME_MAX@*/
+/*@constant int _SC_MAPPED_FILES@*/
+/*@constant int _SC_MEMLOCK@*/
+/*@constant int _SC_MEMLOCK_RANGE@*/
+/*@constant int _SC_MEMORY_PROTECTION@*/
+/*@constant int _SC_MESSAGE_PASSING@*/
+/*@constant int _SC_MQ_OPEN_MAX@*/
+/*@constant int _SC_MQ_PRIO_MAX@*/
+/*@constant int _SC_NGROUPS_MAX@*/
+/*@constant int _SC_OPEN_MAX@*/
+/*@constant int _SC_PAGESIZE@*/
+/*@constant int _SC_PAGE_SIZE@*/
+/*@constant int _SC_PASS_MAX@*/
+/*@constant int _SC_PRIORITIZED_IO@*/
+/*@constant int _SC_PRIORITY_SCHEDULING@*/
+/*@constant int _SC_RE_DUP_MAX@*/
+/*@constant int _SC_REALTIME_SIGNALS@*/
+/*@constant int _SC_RTSIG_MAX@*/
+/*@constant int _SC_SAVED_IDS@*/
+/*@constant int _SC_SEMAPHORES@*/
+/*@constant int _SC_SEM_NSEMS_MAX@*/
+/*@constant int _SC_SEM_VALUE_MAX@*/
+/*@constant int _SC_SHARED_MEMORY_OBJECTS@*/
+/*@constant int _SC_SIGQUEUE_MAX@*/
+/*@constant int _SC_STREAM_MAX@*/
+/*@constant int _SC_SYNCHRONIZED_IO@*/
+/*@constant int _SC_THREADS@*/
+/*@constant int _SC_THREAD_ATTR_STACKADDR@*/
+/*@constant int _SC_THREAD_ATTR_STACKSIZE@*/
+/*@constant int _SC_THREAD_DESTRUCTOR_ITERATIONS@*/
+/*@constant int _SC_THREAD_KEYS_MAX@*/
+/*@constant int _SC_THREAD_PRIORITY_SCHEDULING@*/
+/*@constant int _SC_THREAD_PRIO_INHERIT@*/
+/*@constant int _SC_THREAD_PRIO_PROTECT@*/
+/*@constant int _SC_THREAD_PROCESS_SHARED@*/
+/*@constant int _SC_THREAD_SAFE_FUNCTIONS@*/
+/*@constant int _SC_THREAD_STACK_MIN@*/
+/*@constant int _SC_THREAD_THREADS_MAX@*/
+/*@constant int _SC_TIMERS@*/
+/*@constant int _SC_TIMER_MAX@*/
+/*@constant int _SC_TTY_NAME_MAX@*/
+/*@constant int _SC_TZNAME_MAX@*/
+/*@constant int _SC_VERSION@*/
+/*@constant int _SC_XOPEN_VERSION@*/
+/*@constant int _SC_XOPEN_CRYPT@*/
+/*@constant int _SC_XOPEN_ENH_I18N@*/
+/*@constant int _SC_XOPEN_SHM@*/
+/*@constant int _SC_XOPEN_UNIX@*/
+/*@constant int _SC_XOPEN_XCU_VERSION@*/
+/*@constant int _SC_XOPEN_LEGACY@*/
+/*@constant int _SC_XOPEN_REALTIME@*/
+/*@constant int _SC_XOPEN_REALTIME_THREADS@*/
+/*@constant int _SC_XBS5_ILP32_OFF32@*/
+/*@constant int _SC_XBS5_ILP32_OFFBIG@*/
+/*@constant int _SC_XBS5_LP64_OFF64@*/
+/*@constant int _SC_XBS5_LPBIG_OFFBIG@*/
+
+
+int access(const char *, int) /*@modifies errno@*/ /*:errorcode -1:*/ ;
+unsigned int alarm (unsigned int) /*@modifies internalState@*/ ;
+
+int brk(void *)
+     /*@modifies errno@*/
+     /*:errorcode -1:*/
+     /*@warn legacy "brk is obsolete"@*/ ;
+
+int chdir (const char *)
+     /*@modifies internalState, errno@*/
+     /*:errorcode -1:*/ ;
+
+int chown (const char *, uid_t, gid_t)
+     /*@modifies internalState, errno@*/
+     /*:errorcode -1:*/ ;
+
+int close (int)
+     /*@modifies internalState, errno@*/
+     /*:errorcode -1:*/ ;
+
+size_t confstr(int, /*@null@*/ char *, size_t)
+     /*@globals internalState@*/
+     /*@modifies errno@*/
+     /*:errorcode 0:*/ ;
+
+/*@dependent@*/ /*@null@*/ char *crypt(const char *, const char *)
+     /*@modifies errno, internalState@*/ ;
+
+/*@dependent@*/ /*@null@*/ char *ctermid(/*@returned@*/ /*@null@*/ /*@out@*/ char *s)
+     /*@modifies s@*/ ;
+
+/*@null@*/ /*@dependent@*/ char *cuserid (/*@null@*/ /*@returned@*/ char *s)
+     /*@warn legacy "cuserid is obsolete"@*/
+     /*@modifies s@*/ ;
+
+int dup(int)
+     /*@modifies errno, internalState@*/
+     /*:errorcode -1:*/ ;
+
+int dup2(int, int)
+     /*@modifies errno, internalState@*/
+     /*:errorcode -1:*/ ;
+
+void encrypt(char p_block[], int)
+     /*@requires maxSet(p_block) == 63@*/
+     /*@modifies p_block, errno@*/ ;
+
+extern char **environ;
+
+int execl (const char *, const char *, ...)
+     /*@modifies errno, internalState@*/
+     /*:errorcode -1:*/ ;
+
+int execle(const char *, const char *, ...)
+     /*@modifies errno, internalState@*/
+     /*:errorcode -1:*/ ;
+
+int execlp(const char *, const char *, ...)
+     /*@modifies errno, internalState@*/
+     /*:errorcode -1:*/ ;
+
+int execv(const char *, char *const [])
+     /*@modifies errno, internalState@*/
+     /*:errorcode -1:*/ ;
+
+int execve(const char *, char *const [], char *const [])
+     /*@modifies errno, internalState@*/
+     /*:errorcode -1:*/ ;
+
+int execvp(const char *, char *const [])
+     /*@modifies errno, internalState@*/
+     /*:errorcode -1:*/ ;
+
+/*@exits@*/ void _exit (int);
+
+int fchown (int, uid_t, gid_t)
+     /*@modifies errno, fileSystem@*/
+     /*:errorcode -1:*/ ;
+
+int fchdir (int)
+     /*@modifies errno, fileSystem@*/
+     /*:errorcode -1:*/ ;
+
+int fdatasync (int)
+     /*@modifies errno, fileSystem@*/
+     /*:errorcode -1:*/ ;
+
+pid_t fork (void)
+     /*@modifies errno, internalState@*/
+     /*:errorcode -1:*/ ;
+
+long int fpathconf(int, int)
+     /*@modifies errno, internalState@*/
+     /*:errorcode -1:*/ ;
+
+int fsync(int)
+     /*@modifies errno, fileSystem@*/
+     /*:errorcode -1:*/ ;
+
+int ftruncate(int, off_t)
+     /*@modifies errno, fileSystem@*/
+     /*:errorcode -1:*/ ;
+
+/*@null@*/ char *getcwd (/*@returned@*/ char *buf, size_t size)
+     /*@requires maxSet(buf) >= size;@*/
+     /*@modifies errno@*/ ;
+
+int getdtablesize (void)
+     /*@warn legacy "getdtablesize is obsolete"@*/ ;
+
+gid_t getegid (void) /*@globals internalState*/ ;
+uid_t geteuid (void) /*@globals internalState*/ ;
+gid_t getgid (void) /*@globals internalState*/ ;
+
+int getgroups (int gidsetsize, gid_t grouplist[])
+     /*@requires maxSet(grouplist) >= gidsetsize@*/
+     /*@modifies errno@*/
+     /*:errorcode -1:*/ ;
+
+long gethostid (void) /*@globals internalState@*/ ;
+
+/*@null@*/ /*@dependent@*/ char *getlogin (void)
+     /*@modifies errno@*/ ;
+
+int getlogin_r (char *name, size_t namesize)
+     /*@requires maxSet(name) >= namesize@*/
+     /*:errorcode !0:*/ ;
+
+extern char *optarg;
+extern int optind;
+extern int opterr;
+extern int optopt;
+
+int getopt(int, char * const [], const char *)
+     /*@modifies optind, opterr, optopt, errno@*/
+     /*:errorcode -1:*/ ;
+
+int getpagesize(void)
+     /*@warn legacy "getpagesize is obsolete"@*/ ;
+
+/*@dependent@*/ /*@null@*/ char *getpass(/*@nullterminated@*/ const char *)
+     /*@warn legacy "getpass is obsolete"@*/ ;
+
+pid_t getpgid(pid_t)
+     /*@modifies errno@*/
+     /*@globals internalState@*/
+     /*:errorcode (pid_t)-1:*/ ;
+
+pid_t getpgrp(void) /*@globals internalState*/ ;
+
+pid_t getpid(void) /*@globals internalState*/ ;
+pid_t getppid(void) /*@globals internalState*/ ;
+
+pid_t getsid(pid_t)
+     /*@modifies errno@*/
+     /*@globals internalState@*/
+     /*:errorcode (pid_t)-1:*/ ;
+
+uid_t getuid(void) /*@globals internalState@*/ ;
+
+/*@null@*/ char *getwd (/*@returned@*/ char *path_name)
+     /*@modifies path_name@*/ ;
+
+int isatty(int)
+     /*@globals internalState@*/
+     /*@modifies errno@*/
+     /*:errorcode 0:*/ ;
+
+int lchown(const char *, uid_t, gid_t)
+     /*@modifies errno, fileSystem@*/
+     /*:errorcode -1:*/ ;
+
+int link(const char *, const char *)
+     /*@modifies errno, fileSystem@*/
+     /*:errorcode -1:*/ ;
+
+int lockf(int, int, off_t)
+     /*@modifies errno, fileSystem@*/
+     /*:errorcode -1:*/ ;
+
+off_t lseek(int, off_t, int)
+     /*@modifies errno, fileSystem@*/
+     /*:errorcode (off_t)-1:*/ ;
+
+int nice(int)
+     /*@modifies errno, fileSystem@*/
+     /*:errorcode -1:*/ ;
+
+long int pathconf(const char *, int)
+     /*@modifies errno, internalState@*/
+     /*:errorcode -1:*/ ;
+
+int pause(void)
+     /*@modifies errno, internalState@*/
+     /*:errorcode -1:*/ ;
+
+int pipe(int p[])
+     /*@requires maxRead(p) == 1@*/
+     /*@modifies errno, fileSystem@*/
+     /*:errorcode -1:*/ ;
+
+ssize_t pread(int, /*@out@*/ void *buf, size_t nbyte, off_t offset)
+     /*@modifies errno, fileSystem@*/
+     /*@requires maxSet(buf) >= (nbyte - 1) @*/
+     /*@ensures maxRead(buf) >= nbyte @*/ 
+     /*:errorcode -1:*/ ;
+     
+int pthread_atfork(void (*)(void), void (*)(void), void(*)(void))
+     /*@modifies errno, fileSystem@*/
+     /*:errorcode !0:*/ ;
+
+ssize_t pwrite(int, const void *buf, size_t nbyte, off_t)
+     /*@requires maxRead(buf) >= nbyte@*/
+     /*@modifies errno, fileSystem@*/
+     /*:errorcode -1:*/ ;
+
+/*     ssize_t      read(int, void *, size_t); in posix.h */
+
+int readlink(const char *, char *buf, size_t bufsize)
+     /*@requires maxSet(buf) >= (bufsize - 1)@*/
+     /*@modifies errno, fileSystem, *buf@*/
+     /*:errorcode -1:*/ ;
+
+/* int          rmdir(const char *); in posix.h */
+
+void *sbrk(intptr_t)
+     /*@modifies errno@*/
+     /*:errorcode (void *)-1:*/
+     /*@warn legacy "sbrk is obsolete"@*/ ;
+
+     /*     int          setgid(gid_t);
+           int          setpgid(pid_t, pid_t);
+     */
+
+pid_t setpgrp(void) /*@modifies internalState@*/ ;
+
+int setregid(gid_t, gid_t)
+     /*@modifies errno, internalState@*/
+     /*:errorcode -1:*/ ;
+
+int setreuid(uid_t, uid_t)
+     /*@modifies errno, internalState@*/
+     /*:errorcode -1:*/ ;
+
+pid_t setsid(void)
+     /*@modifies errno, internalState@*/
+     /*:errorcode (pid_t) -1:*/ ;
+
+int setuid(uid_t)
+     /*@modifies errno, internalState@*/
+     /*:errorcode -1:*/ ;
+
+unsigned int sleep(unsigned int)
+     /*@modifies systemState@*/ ;
+
+void swab(/*@unique@*/ const void *src, /*@unique@*/ void *dest, ssize_t nbytes)
+     /*@requires maxSet(dest) >= (nbytes - 1)@*/ ;
+
+int symlink(const char *, const char *)
+     /*@modifies errno, fileSystem@*/
+     /*:errorcode -1:*/ ;
+
+void sync(void) /*@modifies systemState@*/ ;
+
+long int sysconf(int)
+     /*@modifies errno, systemState@*/
+     /*:errorcode -1:*/ ;
+
+pid_t tcgetpgrp(int)
+     /*@globals systemState@*/
+     /*@modifies errno@*/
+     /*:errorcode -1:*/ ;
+
+int tcsetpgrp(int, pid_t)
+     /*@modifies errno, systemState@*/
+     /*:errorcode -1:*/ ;
+
+int truncate(const char *, off_t)
+     /*@modifies errno, fileSystem@*/
+     /*:errorcode -1:*/ ;
+
+/*@dependent@*/ /*@null@*/ char *ttyname(int)
+     /*@globals systemState@*/
+     /*@modifies errno@*/
+     /*:errorcode -1:*/ ;
+
+int ttyname_r(int, char *name, size_t namesize)
+     /*@requires maxSet(name) >= (namesize - 1)@*/ ;
+     /*:errorcode !0:*/ ;
+
+useconds_t ualarm(useconds_t, useconds_t)
+     /*@modifies systemState@*/ ;
+
+int unlink(const char *)
+     /*@modifies fileSystem, errno@*/
+     /*:errorcode -1:*/ ;
+     
+int usleep(useconds_t)
+     /*@modifies fileSystem, errno@*/
+     /*:errorcode -1:*/ ;
+
+pid_t vfork(void)
+     /*@modifies fileSystem, errno@*/
+     /*:errorcode -1:*/ ;
+
+     /* in posix.h ssize_t write(int, const void *, size_t); */
+
+
 int chroot (/*@notnull@*/ /*@nullterminated@*/ const char *path)
-   /*:statusreturn@*/
-   /*@warn superuser "Only super-user processes may call chroot."@*/
-     /*: other wanings? */ ;
+     /*@modifies internalState, errno@*/
+     /*:errorcode -1:*/ 
+     /*@warn superuser "Only super-user processes may call chroot."@*/ ;
 
 int fchroot (int fildes)
    /*:statusreturn@*/
    /*@warn superuser "Only super-user processes may call fchroot."@*/ ;
 
+
 /*
 ** ctype.h 
 **
index 21d2d3347fe5b219a8a1f2e1c7748f628f0d39ba..26febb26ad41ba6add1703b47260419c8609128e 100644 (file)
@@ -35,6 +35,10 @@ extern /*@only@*/ cstring globSet_unparse (globSet p_ll) /*@*/ ;
 extern /*@only@*/ cstring globSet_dump (globSet) /*@*/ ;
 extern /*@only@*/ globSet globSet_undump (char **p_s) /*@modifies *p_s@*/ ;
 
+extern /*@only@*/ globSet globSet_unionFree (/*@only@*/ /*@returned@*/ globSet p_g1, /*@only@*/ globSet p_g2) /*@modifies p_g1@*/ ;
+# define globSet_unionFree(g1,g2) sRefSet_unionFree(g1,g2)
+
+     
 extern void globSet_markImmutable (globSet p_g) /*@modifies p_g@*/ ;
 
 extern globSet 
index 2e6d33e792036fd9fc249e29ecbe300af9dff163..a1f18b7becd6cbc264f6456ec357cf4f3d034ee5 100644 (file)
@@ -141,10 +141,13 @@ extern /*@noreturn@*/ void llfatalerrorLoc (/*@only@*/ cstring p_s)
 
 extern /*@private@*/ void
    xllparseerror (char *p_srcFile, int p_srcLine, /*@only@*/ cstring p_s)
+   /*@globals g_currentloc@*/
    /*@modifies g_warningstream@*/ ;
 
 extern void llparseerror (/*@only@*/ cstring p_s) 
-   /*@globals g_currentloc@*/ ;
+   /*@globals g_currentloc@*/
+   /*@modifies g_warningstream@*/ ;
+
 # define llparseerror(p_s) xllparseerror (__FILE__, __LINE__, p_s)
 # ifndef NOLCL
 extern /*@noreturn@*/ void lclplainfatalerror (/*@only@*/ cstring p_msg) /*@modifies g_warningstream@*/ ;
index fd8d27e302e33bfb77a0c9d87afe8258b862d7a3..f335c937b21b33d5ebd3cd322ac34e0ab17b059c 100644 (file)
@@ -570,7 +570,7 @@ extern alkind uentry_getAliasKind (uentry p_u) /*@*/ ;
 extern exkind uentry_getExpKind (uentry p_u) /*@*/ ;
 extern /*@observer@*/ multiVal uentry_getConstantValue (uentry p_e) /*@*/ ;
 extern void uentry_fixupSref (uentry p_ue) /*@modifies p_ue@*/ ;
-extern void uentry_setGlobals (uentry p_ue, /*@owned@*/ globSet p_globs) /*@modifies p_ue, p_globs@*/ ;
+extern void uentry_setGlobals (uentry p_ue, /*@only@*/ globSet p_globs) /*@modifies p_ue, p_globs@*/ ;
 extern bool uentry_isYield (uentry p_ue) /*@*/ ;
 extern /*@notnull@*/ uentry uentry_makeIdConstant (idDecl p_t) /*@*/ ;
 extern /*@observer@*/ cstring uentry_getRealName (uentry p_e) /*@*/ ;
index 01c215259654b16f751070058485890f3205b58f..2ec46b4718ae705115cf2640e75dbb7be1364d59 100644 (file)
@@ -4368,7 +4368,7 @@ case 367:
 { yyval.typequal = yyvsp[-1].typequal; ;
     break;}
 case 374:
-{ yyval.ctyp = ctype_anytype; ;
+{ yyval.ctyp = ctype_anytype; DPRINTF (("anytype: %s", ctype_unparse (yyval.ctyp))); ;
     break;}
 case 375:
 { yyval.ctyp = ctype_anyintegral; ;
index be8ec82c74d09a3fcddefc2a16eac62f6233337e..1b18b8bfe87b27e116b20da071fc0dca9c815985 100644 (file)
@@ -1232,7 +1232,7 @@ typeSpecifier
  | CGFLOAT NotType
  | CDOUBLE NotType
  | CVOID NotType 
- | QANYTYPE NotType              { $$ = ctype_anytype; }
+ | QANYTYPE NotType              { $$ = ctype_anytype; DPRINTF (("anytype: %s", ctype_unparse ($$))); }
  | QINTEGRALTYPE NotType         { $$ = ctype_anyintegral; }
  | QUNSIGNEDINTEGRALTYPE NotType { $$ = ctype_unsignedintegral; }
  | QSIGNEDINTEGRALTYPE NotType   { $$ = ctype_signedintegral; }
index e83e20fb5bc3a89019e82aff57786a264d33924f..41ffacc6b6b5e87fdc32c04916a91fdd18d3e84d 100644 (file)
@@ -773,10 +773,11 @@ void clabstract_declareFunction (idDecl tid) /*@globals undef saveFunction; @*/
          
          resetGlobals ();
        }
-      
+
       resetStorageClass ();
-      idDecl_free (tid);
     }
+
+  idDecl_free (tid);
 }
 
 void declareStaticFunction (idDecl tid) /*@globals undef saveFunction; @*/
index 3e962cf1fd043def322a7bdfbce3c935f153b666..0d05b48b4c8c456b1ca66b678f49976b0f2d6635 100644 (file)
@@ -199,7 +199,7 @@ static void setTokLengthT (size_t len)
 
 %%
 
-"/*"           { llfatalbug (cstring_makeLiteral ("Comment in pre-processor output")); }
+"/*"           { llfatalerror (cstring_makeLiteral ("Comment in pre-processor output")); }
 
 "#"{Letter}({Letter}|{Digit})*  { 
                  context_saveLocation (); 
index 1227234bf28fe2a1b1330e4d3384aeaf735c15b8..fd4daac1c79357e1ab8a38b2600d2d92500039b0 100644 (file)
@@ -232,22 +232,30 @@ ctype_realishType (ctype c)
   return c;
 }
 
+static bool 
+ctype_isSpecialType (ctype c)
+{
+  return (ctype_isUnknown (c) || ctype_isAnytype (c));
+}
+
 bool
 ctype_isUA (ctype c)
 {
-  return (!ctype_isUnknown (c) && ctbase_isUA (ctype_getCtbase (c)));
+  return (!ctype_isSpecialType (c) 
+         && ctbase_isUA (ctype_getCtbase (c)));
 }
 
 bool
 ctype_isUser (ctype c)
 {
-  return (!ctype_isUnknown (c) && ctbase_isUser (ctype_getCtbase (c)));
+  return (!ctype_isSpecialType (c) 
+         && ctbase_isUser (ctype_getCtbase (c)));
 }
 
 bool
 ctype_isAbstract (ctype c)
 {
-  return (!ctype_isUnknown (c) 
+  return (!ctype_isSpecialType (c) 
          && ((ctype_isPlain (c) && ctbase_isAbstract (ctype_getCtbaseSafe (c))) ||
              (ctype_isConj (c) &&
               (ctype_isAbstract (ctype_getConjA (c)) 
@@ -488,9 +496,9 @@ ctype_isWideString (ctype c)
 ctype
 ctype_getReturnType (ctype c)
 {
-  if (ctype_isUnknown (c))
+  if (ctype_isSpecialType (c))
     {
-      return ctype_unknown;
+      return c;
     }
 
   return (ctbase_baseFunction (ctype_getCtbaseSafe (c)));
@@ -503,7 +511,7 @@ ctype_getReturnType (ctype c)
 /*@observer@*/ uentryList
 ctype_argsFunction (ctype c)
 {
-  if (ctype_isUnknown (c))
+  if (ctype_isSpecialType (c))
     {
       return uentryList_undefined;
     }
@@ -589,9 +597,9 @@ ctype_compare (ctype c1, ctype c2)
   ctentry ce1;
   ctentry ce2;
 
-  if (ctype_isUnknown (c1))
+  if (ctype_isSpecialType (c1))
     {
-      if (ctype_isUnknown (c2))
+      if (ctype_isSpecialType (c2))
        {
          return 0;
        }
@@ -601,7 +609,7 @@ ctype_compare (ctype c1, ctype c2)
        }
     }
   
-  if (ctype_isUnknown (c2))
+  if (ctype_isSpecialType (c2))
     {
       return -1;
     }
@@ -1113,6 +1121,8 @@ ctype_isForceRealBool (ctype * c)
 static ctype
 ctype_makeConjAux (ctype c1, ctype c2, bool isExplicit)
 {
+  DPRINTF (("Make conj: %s / %s", ctype_unparse (c1), ctype_unparse (c2)));
+
   if (ctype_isBogus (c1) || ctype_isUndefined (c1))
     {
       return c2;
@@ -1137,6 +1147,8 @@ ctype_makeConjAux (ctype c1, ctype c2, bool isExplicit)
 ctype
 ctype_makeExplicitConj (ctype c1, ctype c2)
 {
+  DPRINTF (("Make conj: %s / %s", ctype_unparse (c1), ctype_unparse (c2)));
+
   if (ctype_isFunction (c1) && !ctype_isFunction (c2))
     {
       ctype ret = ctype_makeExplicitConj (ctype_getReturnType (c1), c2);
@@ -1629,11 +1641,11 @@ ctype_matchDef (ctype c1, ctype c2)
     return TRUE;
 
   if (ctype_isElips (c1))
-    return (ctype_isElips (c2) || ctype_isUnknown (c2));
+    return (ctype_isElips (c2) || ctype_isSpecialType (c2));
 
   if (ctype_isElips (c2))
     {
-      return (ctype_isUnknown (c2));
+      return (ctype_isSpecialType (c2));
     }
   else
     {
@@ -1653,10 +1665,14 @@ bool ctype_match (ctype c1, ctype c2)
     return TRUE;
 
   if (ctype_isElips (c1))
-    return (ctype_isElips (c2) || ctype_isUnknown (c2));
-
+    {
+      return (ctype_isElips (c2) || ctype_isSpecialType (c2));
+    }
+  
   if (ctype_isElips (c2))
-    return (ctype_isUnknown (c2));
+    {
+      return (ctype_isSpecialType (c2));
+    }
  
   return (ctbase_match (ctype_getCtbase (c1), ctype_getCtbase (c2)));
 }
@@ -1788,7 +1804,7 @@ ctype_unparseDeclaration (ctype c, /*@only@*/ cstring name)
 {
   llassert (! (ctype_isElips (c) || ctype_isMissingParamsMarker (c)));
 
-  if (ctype_isUnknown (c))
+  if (ctype_isSpecialType (c))
     {
       return message ("? %q", name);
     }
@@ -2221,7 +2237,7 @@ bool ctype_isRefCounted (ctype t)
 
 bool ctype_isVisiblySharable (ctype t)
 {
-  if (ctype_isUnknown (t)) return TRUE;
+  if (ctype_isSpecialType (t)) return TRUE;
 
   if (ctype_isConj (t))
     {
@@ -2538,6 +2554,7 @@ ctype ctype_resolve (ctype c)
 {
   if (ctype_isUnknown (c)) 
     {
+      DPRINTF (("Resolving! %s", ctype_unparse (c)));
       return ctype_int;
     }
   else if (c == ctype_anytype)
index 2031c6d74516ef1f3d3cab8fc0ea990c69e36230..9b2251f6e89b560bfd77884ff6f8160ed8d2ab28 100644 (file)
@@ -1187,7 +1187,6 @@ int main (int argc, char *argv[])
        }
     }
 
-  setCodePoint ();  
   showHerald (); 
   
   /*
index 10dd0231b22059179c2430d078a39ba9d986313c..389f0dc1b0b20505c9d60fb1b89b3df617bd0258 100644 (file)
@@ -150,12 +150,14 @@ qtype qtype_mergeAlt (/*@returned@*/ qtype q1, /*@only@*/ qtype q2)
 
 qtype qtype_combine (/*@returned@*/ qtype q1, ctype ct)
 {
+  DPRINTF (("Combine: %s %s", qtype_unparse (q1), ctype_unparse (ct)));
   if (qtype_isDefined (q1))
     {
       /* ct is modifier (or q1->type is unknown) */
       q1->type = ctype_combine (q1->type, ct); 
     }
 
+  DPRINTF (("Combine: %s %s", qtype_unparse (q1), ctype_unparse (ct)));
   return q1;
 }
 
@@ -188,7 +190,9 @@ qtype qtype_newBase (/*@returned@*/ qtype q, ctype ct)
 {
   if (qtype_isDefined (q))
     {
+      DPRINTF (("new base: %s -> %s", qtype_unparse (q), ctype_unparse (ct)));
       q->type = ctype_newBase (ct, q->type);
+      DPRINTF (("new base: %s -> %s", qtype_unparse (q), ctype_unparse (ct)));
     }
 
   return q;
@@ -202,6 +206,7 @@ qtype qtype_newQbase (qtype q1, qtype q2)
       q1->quals = qualList_appendList (q1->quals, q2->quals);
     }
 
+  DPRINTF (("new base: %s -> %s", qtype_unparse (q1), qtype_unparse (q1)));
   return q1;
 }
 
index a1913fa8c1282311fc4a0b2a4b4626585e2bd646..349048b72ecb06f07d21867b2ed365279ee2e21f 100644 (file)
@@ -7940,7 +7940,7 @@ sRef_mergeNullState (sRef s, nstate n)
       
       if (n != old && n != NS_UNKNOWN)
        {                 
-           sRef_setNullState (s, n, g_currentloc);
+         sRef_setNullState (s, n, g_currentloc);
        }
     }
   else
@@ -7953,11 +7953,11 @@ bool
 sRef_possiblyNull (sRef s)
 {
   if (sRef_isReasonable (s))
-      {
-       if (sRef_getNullState (s) == NS_ABSNULL)
+    {
+      if (sRef_getNullState (s) == NS_ABSNULL)
        {
          ctype rct = ctype_realType (s->type);
-
+         
          if (ctype_isAbstract (rct))
            {
              return FALSE;
@@ -7982,7 +7982,7 @@ sRef_possiblyNull (sRef s)
          return nstate_possiblyNull (sRef_getNullState (s));
        }
     }
-
+  
   return FALSE;
 }
 
@@ -10112,7 +10112,13 @@ size_t sRef_getArraySize (sRef p_s) /*@*/
 
 void sRef_setValue (sRef s, multiVal val)
 {
-  llassert (sRef_isReasonable (s));
+  if (!sRef_isReasonable (s))
+    {
+      llcontbuglit ("Unreasonable sRef");
+      llcontbug (message ("sRef: %s", sRef_unparse (s)));
+      return;
+    }
+
   multiVal_free (s->val);
   s->val = val;
 }
index 05abe0ad3bf1b27f56ef524b7c2271b7fba09b88..5386fbfd23b64a8317c08b14e00ceb3785964998 100644 (file)
@@ -744,9 +744,12 @@ void uentry_checkParams (uentry ue)
       if (uentry_isRealFunction (ue))
        {
          uentryList params = uentry_getParams (ue);
+         int paramno = 0;
 
          uentryList_elements (params, current)
            {
+             paramno++;
+
              if (uentry_isValid (current))
                {
                  ctype ct = current->utype;                  
@@ -760,24 +763,48 @@ void uentry_checkParams (uentry ue)
                        }
                      else
                        {
-                         voptgenerror 
-                           (FLG_FIXEDFORMALARRAY,
-                            message ("Function parameter %q declared as "
-                                     "manifest array (size constant is meaningless)",
-                                     uentry_getName (current)),
-                            uentry_whereDeclared (current));
+                         if (uentry_hasName (current))
+                           {
+                             voptgenerror 
+                               (FLG_FIXEDFORMALARRAY,
+                                message ("Function parameter %q declared as "
+                                         "manifest array (size constant is meaningless)",
+                                         uentry_getName (current)),
+                                uentry_whereDeclared (current));
+                           }
+                         else
+                           {
+                             voptgenerror 
+                               (FLG_FIXEDFORMALARRAY,
+                                message ("Unnamed function parameter %d declared as "
+                                         "manifest array (size constant is meaningless)",
+                                         paramno),
+                                uentry_whereDeclared (current));
+                           }
                        }
                    }
                  else 
                    {
                      if (ctype_isArray (ct))
                        {
-                         voptgenerror 
-                           (FLG_FORMALARRAY,
-                            message ("Function parameter %q declared as "
-                                     "array (treated as pointer)", 
-                                     uentry_getName (current)),
-                            uentry_whereDeclared (current));
+                         if (uentry_hasName (current))
+                           {
+                             voptgenerror 
+                               (FLG_FORMALARRAY,
+                                message ("Function parameter %q declared as "
+                                         "array (treated as pointer)", 
+                                         uentry_getName (current)),
+                                uentry_whereDeclared (current));
+                           }
+                         else
+                           {
+                             voptgenerror 
+                               (FLG_FORMALARRAY,
+                                message ("Unnamed function parameter %d declared as "
+                                         "array (treated as pointer)", 
+                                         paramno),
+                                uentry_whereDeclared (current));
+                           }
                        }
                    }
 
@@ -3592,36 +3619,24 @@ void uentry_makeConstantFunction (uentry ue)
 }
 
 void
-uentry_setGlobals (uentry ue, /*@owned@*/ globSet globs)
+uentry_setGlobals (uentry ue, /*@only@*/ globSet globs)
 {
   llassert (uentry_isValid (ue));
 
+  globSet_markImmutable (globs);
+
   if (uentry_isIter (ue))
     {
-      llassert (globSet_isUndefined (ue->info->iter->globs));
-      ue->info->iter->globs = globs;
+      ue->info->iter->globs = globSet_unionFree (ue->info->iter->globs, globs);
     }
   else
     {
       uentry_convertVarFunction (ue);
-      
       llassert (uentry_isFunction (ue));
-      llassert (!ue->info->fcn->hasGlobs 
-               && globSet_isUndefined (ue->info->fcn->globs));
-      
-      ue->info->fcn->hasGlobs = TRUE;
-      globSet_markImmutable (globs);
-      /*@-mustfree@*/ ue->info->fcn->globs = globs;
-      /*@=mustfree@*/
-    }
 
-  /*@i23*/
-  /* ???  - evans 2001-09-09 not sure what's going on here...?
-  if (globSet_hasStatic (globs))
-    {
-      context_recordFileGlobals (globs);
+      ue->info->fcn->hasGlobs = TRUE;
+      ue->info->fcn->globs = globSet_unionFree (ue->info->fcn->globs, globs);
     }
-  */
 
   if (context_getFlag (FLG_GLOBALSIMPMODIFIESNOTHING))
     {
@@ -9974,8 +9989,8 @@ uentry_mergeUses (uentry res, uentry other)
 */
 
 static void
-  branchStateError (/*@notnull@*/ uentry res, /*@notnull@*/ uentry other, 
-                   bool flip, clause cl, fileloc loc)
+branchStateError (/*@notnull@*/ uentry res, /*@notnull@*/ uentry other, 
+                 bool flip, clause cl, fileloc loc)
 {
   if (optgenerror 
       (FLG_BRANCHSTATE,
@@ -9988,10 +10003,12 @@ static void
       if (sRef_isDead (res->sref))
        {
          sRef_showStateInfo (res->sref);
+         sRef_showStateInfo (other->sref);
        }
       else if (sRef_isKept (res->sref))
        {
          sRef_showAliasInfo (res->sref);
+         sRef_showAliasInfo (other->sref);
        }
       else /* dependent */
        {
index d033ebb49e46ac85794c5fb0a787bb735ca21ec2..35abdd9c623d1a05edc5ed209ad1cf6444b328ac 100644 (file)
@@ -93,6 +93,8 @@ DIFFFLAGS =
 # -u show context
 SPLINT = $(top_builddir)/src/splint$(EXEEXT)
 
+### These are shell-specific
+
 ### This is horrible!  Can't we make top_builddir absolute?
 SPLINTNEST = ../$(top_builddir)/src/splint$(EXEEXT)
 
@@ -904,9 +906,6 @@ uninstall-am: uninstall-info-am
        mostlyclean-generic uninstall uninstall-am uninstall-info-am
 
 
-unexport LARCH_PATH
-unexport LCLIMPORTDIR
-
 .PHONY: all check
 all check: fulltest
 
This page took 0.134129 seconds and 5 git commands to generate.