Intel XENIX 286 Programmers Guide (86) - Tenox.tc
Intel XENIX 286 Programmers Guide (86) - Tenox.tc Intel XENIX 286 Programmers Guide (86) - Tenox.tc
XENIX Programming lint: C Program Checker which may not be the intended action. In these cases, lint prints the message If you use degenerate unsigned comparison if( 1 ! = 0) ... then lint reports constant in conditional context since the comparison of 1 with 0 gives a constant result. Another construction detected by lint involves operator precedence. Bugs that arise from misunderstandings about the precedence of operators can be accentuated by spacing and formatting, making such bugs extremely hard to find. For example, the statements and if( x&077 = = 0) ... x
lint: C Program Checker XENIX Programming The situation is especially perplexing if this kind of ambiguity arises as the result of a macro substitution. The newer and preferred operators (e.g., +=, -=) have no such ambiguities. To encourage the abandonment of the older forms, lint checks for occurrences of these old-fashioned operators. A similar issue arises with initialization. The older language allowed int x 1 ; to initialize x to 1. This causes syntactic difficulties. For example i nt x ( -1 ) ; looks somewhat like the beginning of a function declaration int x ( y) { ... and the compiler must read past "x" to determine what the declaration really is. The problem is even more perplexing when the initializer involves a macro. The current C syntax places an equal sign between the variable and the initializer: int x = -1 ; This form is free of any possible syntactic ambiguity. Checking Pointer Alignment Certain pointer assignments may be reasonable on some machines and illegal on others, due to align ment restrictions. For example, on some machines it is reasonable to assign integer pointers to double pointers, since double precision values may begin on any integer boundary. On other machines, however, double precision values must begin on even word boundaries; thus, not all such assignments make sense. lint tries to detect cases where pointers are assigned to other pointers and such alignment problems might arise. The message possi ble pointer alignment problem results from this situation. 3-10
- Page 1 and 2: 0 • • •
- Page 3 and 4: The information in this document is
- Page 5 and 6: Table of Contents CONTENTS Compiler
- Page 7 and 8: Table of Contents CONTENTS Using Ot
- Page 9 and 10: Table of Contents CONTENTS Assemble
- Page 11 and 12: Table of Contents CONTENTS CHAPTER
- Page 13 and 14: Table of Contents TABLES TABLE TITL
- Page 15 and 16: Introduction XENIX Programming 10.
- Page 17 and 18: cc: C Compiler XENIX Programming Cr
- Page 19 and 20: cc: C Compiler XENIX Programming Th
- Page 21 and 22: cc: C Compiler XENIX Programming Th
- Page 23 and 24: cc: C Compiler XENIX Programming Cr
- Page 25 and 26: cc: C Compiler XENIX Programming Th
- Page 27 and 28: cc: C Compiler XENIX Programming Co
- Page 29 and 30: cc: C Compiler XENIX Programming Sa
- Page 31 and 32: cc: C Compiler XENIX Programming Us
- Page 33 and 34: cc: C Compiler XENIX Programming Wh
- Page 35 and 36: cc: C Compiler XENIX Programming Co
- Page 37 and 38: cc: C Compiler XENIX Programming d
- Page 39 and 40: cc: C Compiler XENIX Programming Se
- Page 41 and 42: lint: C Program Checker XENIX Progr
- Page 43 and 44: lint: C Program Checker XENIX Progr
- Page 45 and 46: lint: C Program Checker XENIX Progr
- Page 47: lint: C Program Checker XENIX Progr
- Page 51 and 52: lint: C Program Checker XENIX Progr
- Page 53 and 54: make: Program Maintainer XENIX Prog
- Page 55 and 56: make: Program Maintainer XENIX Prog
- Page 57 and 58: make: Program Maintainer XENIX Prog
- Page 59 and 60: make: Program Maintainer XENIX Prog
- Page 61 and 62: make: Program Maintainer XENIX Prog
- Page 63 and 64: make: Program Maintainer XENIX Prog
- Page 65 and 66: make: Program Maintainer print: $(F
- Page 67 and 68: SCCS: Source Code Control System XE
- Page 69 and 70: SCCS: Source Code Control System XE
- Page 71 and 72: SCCS: Source Code Control System XE
- Page 73 and 74: SCCS: Source Code Control System XE
- Page 75 and 76: SCCS: Source Code Control System XE
- Page 77 and 78: SCCS: Source Code Control System XE
- Page 79 and 80: SCCS: Source Code Control System XE
- Page 81 and 82: SCCS: Source Code Control System XE
- Page 83 and 84: SCCS: Source Code Control System XE
- Page 85 and 86: SCCS: Source Code Control System XE
- Page 87 and 88: SCCS: Source Code Control System XE
- Page 89 and 90: SCCS: Source Code Control System XE
- Page 91 and 92: SCCS: Source Code Control System XE
- Page 93 and 94: SCCS: Source Code Control System XE
- Page 95 and 96: SCCS: Source Code Control System XE
<strong>XENIX</strong> Programming lint: C Program Checker<br />
which may not be the intended action. In these cases, lint prints the message<br />
If you use<br />
degenerate unsigned comparison<br />
if( 1 ! = 0) ...<br />
then lint reports<br />
constant in conditional context<br />
since the comparison of 1 with 0 gives a constant result.<br />
Another construction detected by lint involves operator precedence. Bugs that arise<br />
from misunderstandings about the precedence of operators can be accentuated by<br />
spacing and formatting, making such bugs extremely hard to find. For example, the<br />
statements<br />
and<br />
if( x&077 = = 0) ...<br />
x