Overview
| Artifact ID: | c30fd66a267d562c401bbe5388d820ce7141d67d |
|---|---|
| Ticket: | 219231ffffffffffffffffffffffffffffffffff
Compiler warnings with SunPro |
| User & Date: | nobody on 2000-10-26 05:03:54 |
Changes
- assignee changed to: "nobody"
- cmimetype changed to: "text/plain"
- comment changed to:
OriginalBugID: 4291 Bug Version: 8.3 SubmitDate: '2000-03-03' LastModified: '2000-04-03' Severity: LOW Status: Assigned Submitter: techsupp ChangedBy: hobbs RelatedBugIDs: 4203 OS: Solaris OSVersion: 2.6 Machine: Sparc Ultra 60 450 FixedDate: '2000-10-25' ClosedDate: '2000-10-25' Name: David Cuthbert Extensions: None CustomShell: None ReproducibleScript: Perform normal build under Sol 2.6, Workshop 4.2 or 5.0 (configure; make). ObservedBehavior: Compiler warnings. These do not affect the operation of Tcl, but are still undesirable. "./../generic/regc_lex.c", line 380: warning: statement not reached "./../generic/regc_lex.c", line 458: warning: statement not reached "./../generic/regc_lex.c", line 464: warning: statement not reached "./../generic/regc_lex.c", line 539: warning: statement not reached "./../generic/regc_lex.c", line 569: warning: statement not reached "./../generic/regc_lex.c", line 806: warning: statement not reached "./../generic/regc_lex.c", line 971: warning: statement not reached "./../generic/tclDate.c", line 1262: warning: statement not reached "./../generic/tclDate.c", line 1475: warning: statement not reached "./../generic/tclIOSock.c", line 97: warning: argument #5 is incompatible with prototype: prototype: pointer to int : "/usr/include/sys/socket.h", line 338 argument : pointer to uint "./../generic/tclIOSock.c", line 103: warning: argument #5 is incompatible with prototype: prototype: pointer to int : "/usr/include/sys/socket.h", line 338 argument : pointer to uint "./../generic/tclStubInit.c", line 44: warning: initializer does not fit or is out of range: 0xfca3bacf "./../generic/tclStubInit.c", line 242: warning: initializer does not fit or is out of range: 0xfca3bacf "./../generic/tclStubInit.c", line 316: warning: initializer does not fit or is out of range: 0xfca3bacf "./../generic/tclStubInit.c", line 342: warning: initializer does not fit or is out of range: 0xfca3bacf DesiredBehavior: Clean compile Patch: *** regc_lex.c.origFri Mar 3 12:30:42 2000 --- regc_lex.c.newFri Mar 3 12:31:41 2000 *************** *** 377,383 **** FAILW(REG_BADBR); break; } - assert(NOTREACHED); break; case L_BRACK:/* brackets are not too hard */ switch (c) { --- 377,382 ---- *************** *** 455,467 **** RETV(PLAIN, c); break; } - assert(NOTREACHED); break; default: RETV(PLAIN, c); break; } - assert(NOTREACHED); break; case L_CEL:/* collating elements are easy */ if (c == CHR('.') && NEXT1(']')) { --- 454,464 ---- *************** *** 536,542 **** INTOCON(L_EBND); RET('{'); } - assert(NOTREACHED); break; case CHR('('):/* parenthesis, or advanced extension */ if ((v->cflags®_ADVF) && NEXT1('?')) { --- 533,538 ---- *************** *** 566,572 **** FAILW(REG_BADRPT); break; } - assert(NOTREACHED); } if (v->cflags®_NOSUB) RETV('(', 0);/* all parens non-capturing */ --- 562,567 ---- *************** *** 803,809 **** FAILW(REG_EESCAPE);/* unknown alphabetic escape */ break; } - assert(NOTREACHED); } /* --- 798,803 ---- *************** *** 967,974 **** RETV(PLAIN, c); break; } - - assert(NOTREACHED); } /* --- 961,966 ---- *** tcl.h.origFri Mar 3 12:24:56 2000 --- tcl.h.newFri Mar 3 12:25:00 2000 *************** *** 1576,1582 **** * value since the stubs tables don't match. */ ! #define TCL_STUB_MAGIC 0xFCA3BACF /* * The following function is required to be defined in all stubs aware --- 1576,1582 ---- * value since the stubs tables don't match. */ ! #define TCL_STUB_MAGIC 0xFCA3BACFul /* * The following function is required to be defined in all stubs aware *** tclCmdIL.c.origThu Feb 17 17:03:40 2000 --- tclCmdIL.c.newThu Feb 17 17:04:37 2000 *************** *** 1836,1842 **** entryPtr = Tcl_NextHashEntry(&search); } } ! } else { AppendLocals(interp, listPtr, simplePattern, 1); } --- 1836,1842 ---- entryPtr = Tcl_NextHashEntry(&search); } } ! } else if(((Interp *)interp)->varFramePtr->procPtr != 0) { AppendLocals(interp, listPtr, simplePattern, 1); } *** tclDate.c.origFri Mar 3 12:04:25 2000 --- tclDate.c.newFri Mar 3 12:05:43 2000 *************** *** 1253,1271 **** register int *TclDate_ps;/* top of state stack */ register int TclDate_state;/* current state */ register int TclDate_n;/* internal state number info */ - goto TclDatestack;/* moved from 6 lines above to here to please C++ */ - /* ** get globals into registers. - ** branch to here only if YYBACKUP was called. - */ - TclDate_pv = TclDatepv; - TclDate_ps = TclDateps; - TclDate_state = TclDatestate; - goto TclDate_newstate; - - /* - ** get globals into registers. ** either we just started, or we just finished a reduction */ TclDatestack: --- 1253,1260 ---- *************** *** 1467,1481 **** { case 0:/* new error */ TclDateerror( "syntax error" ); - goto skip_init; - /* - ** get globals into registers. - ** we have a user generated syntax type error - */ - TclDate_pv = TclDatepv; - TclDate_ps = TclDateps; - TclDate_state = TclDatestate; - skip_init: TclDatenerrs++; /* FALLTHRU */ case 1: --- 1456,1461 ---- *** tclIOSock.c.origFri Mar 3 12:32:54 2000 --- tclIOSock.c.newFri Mar 3 12:33:07 2000 *************** *** 94,106 **** size_t len; len = sizeof(int); ! getsockopt(sock, SOL_SOCKET, SO_SNDBUF, (char *)¤t, &len); if (current < size) { len = sizeof(int); setsockopt(sock, SOL_SOCKET, SO_SNDBUF, (char *)&size, len); } len = sizeof(int); ! getsockopt(sock, SOL_SOCKET, SO_RCVBUF, (char *)¤t, &len); if (current < size) { len = sizeof(int); setsockopt(sock, SOL_SOCKET, SO_RCVBUF, (char *)&size, len); --- 94,106 ---- size_t len; len = sizeof(int); ! getsockopt(sock, SOL_SOCKET, SO_SNDBUF, (char *)¤t, (int *)&len); if (current < size) { len = sizeof(int); setsockopt(sock, SOL_SOCKET, SO_SNDBUF, (char *)&size, len); } len = sizeof(int); ! getsockopt(sock, SOL_SOCKET, SO_RCVBUF, (char *)¤t, (int *)&len); if (current < size) { len = sizeof(int); setsockopt(sock, SOL_SOCKET, SO_RCVBUF, (char *)&size, len); *** tclIntDecls.h.origFri Mar 3 12:24:13 2000 --- tclIntDecls.h.newFri Mar 3 12:24:26 2000 *************** *** 531,537 **** GlobTypeData * types)); typedef struct TclIntStubs { ! int magic; struct TclIntStubHooks *hooks; int (*tclAccess) _ANSI_ARGS_((CONST char * path, int mode)); /* 0 */ --- 531,537 ---- GlobTypeData * types)); typedef struct TclIntStubs { ! unsigned long magic; struct TclIntStubHooks *hooks; int (*tclAccess) _ANSI_ARGS_((CONST char * path, int mode)); /* 0 */ PatchFiles: regc_lex.c tcl.h tclCmdIL.c tclDate.c tclIOSock.c tclIntDecls.h We can remove the assert's, even though Henry probably put them in there for some reason. The "ul" on TCL_STUB_MAGIC won't work on non-ANSI compilers (but: ((unsigned int) 0xFCA3BACF) should work). The CmdIL fix was for itcl, and is already patched in. The stuff in tclDate can't be changed that way because it is auto-yacc'ed. For tclIOSock, using the same compiler on 2.7, I don't get any warnings. The stubs magic can't be made unsigned long, because that would change the size of the structure. Unsigned int might work (need to see how it's used). -- 04/03/2000 hobbs - foundin changed to: "obsolete: 8.3"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "nobody"
- subsystem changed to: "75. Tutorial"
- title changed to: "Compiler warnings with SunPro"
- type changed to: "Bug"