Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 9094deff5d385c1e716ebf09a492c512bfb2b1cc
Ticket: 219231ffffffffffffffffffffffffffffffffff
Compiler warnings with SunPro
User & Date: lloydlim on 2001-08-04 02:04:01
Changes

  1. icomment:
    Logged In: YES 
    user_id=99220
    
    I get the same warnings for Tcl 8.3.3 on Solaris 7 (SunOS
    5.7) with Sun Workshop compiler 5.0 (except for the
    tclIOSock warnings).
    
    Here are some cleaner patches to get rid of the warnings
    (finally!):
    
    --- tcl.h.old   Thu Aug  2 21:57:37 2001
    +++ tcl.h       Thu Aug  2 17:25:05 2001
    @@ -1647,7 +1647,7 @@
      * value since the stubs tables don't match.
      */
     
    -#define TCL_STUB_MAGIC 0xFCA3BACF
    +#define TCL_STUB_MAGIC ((int) 0xFCA3BACF)
     
     /*
      * The following function is required to be defined in all
    stubs aware
    
    
    --- regc_lex.c.old      Thu Aug  2 21:56:22 2001
    +++ regc_lex.c  Fri Aug  3 07:46:40 2001
    @@ -30,6 +30,11 @@
      *
      */
     
    +/* Suppress "statement not reached" warnings from Sun
    Workshop compiler. */
    +#ifdef __SUNPRO_C
    +#   pragma error_messages(off, E_STATEMENT_NOT_REACHED)
    +#endif
    +
     /* scanning macros (know about v) */
     #define        ATEOS()         (v->now >= v->stop)
     #define        HAVE(n)         (v->stop - v->now >= (n))
    @@ -1059,3 +1064,7 @@
                    return (chr)lastresort;
            return cv->chrs[0];
     }
    +
    +#ifdef __SUNPRO_C
    +#   pragma error_messages(default, E_STATEMENT_NOT_REACHED)
    +#endif
    
    
    --- tclGetDate.y.old    Thu Aug  2 22:00:17 2001
    +++ tclGetDate.y        Fri Aug  3 07:50:51 2001
    @@ -33,6 +33,11 @@
     #include "tclInt.h"
     #include "tclPort.h"
     
    +/* Suppress "statement not reached" warnings from Sun
    Workshop compiler. */
    +#ifdef __SUNPRO_C
    +#   pragma error_messages(off, E_STATEMENT_NOT_REACHED)
    +#endif
    +
     #ifdef MAC_TCL
     #   define EPOCH           1904
     #   define START_OF_TIME   1904
    
    
    You'll also need to do a "make gendate" to update tclDate.c.
    
    (Note:  I noticed that yacc 3.0 on Solaris produces a clean
    tclDate.c that is identical to the one distributed. 
    However, the yaccs I tried on Linux and FreeBSD (no version
    numbers available) produce files that are significantly
    different and that don't necessarily compile.  I'm not sure
    if someone should worry about that or not.)
    
    
    
  2. login: "lloydlim"
  3. mimetype: "text/plain"
  4. username: "lloydlim"