| 227 |
dpurdie |
1 |
// MOS_MRI.LNT
|
|
|
2 |
//
|
|
|
3 |
// Compiler Options for Microtec compilers
|
|
|
4 |
|
|
|
5 |
-DLINT // MOS will provide prototypes
|
|
|
6 |
-D_MICROTEC // Provided by the compiler
|
|
|
7 |
|
|
|
8 |
//
|
|
|
9 |
// Handle the size_t type
|
|
|
10 |
// This is defined in stddef.h, but it used a Microtec internal type
|
|
|
11 |
|
|
|
12 |
-d__STDC__=1
|
|
|
13 |
-d_SIZE_T=unsigned
|
|
|
14 |
|
|
|
15 |
-si4 // integers are 4 bytes
|
|
|
16 |
-sp4 // pointers are 4 bytes too.
|
|
|
17 |
|
|
|
18 |
// MOS Environment tweaks
|
|
|
19 |
+linebuf // Some of the DevCd macros are very long
|
|
|
20 |
+linebuf
|
|
|
21 |
+linebuf // Allow for 600*2*2*2 = 4800
|
|
|
22 |
|
|
|
23 |
-fbo // boolean flag off
|
|
|
24 |
+fcu // char's are UNSIGNED
|
|
|
25 |
-d_CHAR_UNSIGNED=1 // char's are UNSIGNED
|
|
|
26 |
+fdi // search directory where including file resides first for include files
|
|
|
27 |
+ffn // provide fully qualified path names
|
|
|
28 |
+fod // place info. about all declared objects into .lob file (if created)
|
|
|
29 |
+fol // place info. about all declared objects into .lob file (if created)
|
|
|
30 |
+fpn // warn if no test for null pointers
|
|
|
31 |
+fsc // consider string constants as "const char"
|
|
|
32 |
|
|
|
33 |
-e46 // types others than int allowed for bit fields
|
|
|
34 |
-e726 // ignore extraneous comments @ end of enumeration lists
|
|
|
35 |
|
|
|
36 |
-emacro((???),va_arg) // the va_arg() macro can yield 415, 416, 661, 662
|
|
|
37 |
// 796 and 797 (out-of-bounds errors).
|
|
|
38 |
-emacro(651,NULL) // suppress potentially confusing initialiser warnings involving NULL
|
|
|
39 |
|
|
|
40 |
-"esym(793,enumeration constants)" // suppress warnings related to the quantity of enumeraiton
|
|
|
41 |
// constants used in any setup - ANSI linmit is 127
|
|
|
42 |
|
|
|
43 |
|
|
|
44 |
// General Options
|
|
|
45 |
//
|
|
|
46 |
-width(132,4) // output width
|
|
|
47 |
|
|
|
48 |
-dDBG=0 // There is a #if test made for this variable.
|
|
|
49 |
|
|
|
50 |
// while processing compiler (library) header files ...
|
|
|
51 |
-wlib(1) // sets the warning level within library headers to 1
|
|
|
52 |
// (no warnings, just syntax errors). Comment out if you
|
|
|
53 |
// are actually linting library headers. This
|
|
|
54 |
// option makes obsolete options of the form -elib(axxx) where
|
|
|
55 |
// xxx >= 400 which may be retained for historical reasons.
|
|
|
56 |
-elib(19) // useless declarations (lone semicolons)
|
|
|
57 |
-elib(123) // function-like macro name used as non macro
|
|
|
58 |
-elib(652) // suppress message about #define of earlier declared symbols
|
|
|
59 |
-elib(762) // suppress message about multiple identical declarations and
|
|
|
60 |
-elib(760) // suppress message about multiple identical macro defs
|
|
|
61 |
-elib(514) // allow #if <boolean> | <boolean>
|
|
|
62 |
-elib(553) // undefined preprocessor variables assumed 0
|
|
|
63 |
-elib(726) // extraneous comma in enum definition
|
|
|
64 |
|
|
|
65 |
-format=%(%f(%l)\s:\s%)%t\s%n:\s%m
|
|
|
66 |
// error format similar to MSC
|
|
|
67 |
// Note that %c can also be used to specify column
|
|
|
68 |
-e46 // allows bit-fields to be other than int or unsigned
|
|
|
69 |
+fan // allow anonymous unions
|
|
|
70 |
+fdi // Use directory of the including file
|
|
|
71 |
+fbo // enable the bool type
|
|
|
72 |
+fll // enable long long
|
|
|
73 |
-fdh // do not append a .h to header names
|
|
|
74 |
-ffb // do not establish a separate scope for declares within for clauses
|
|
|
75 |
+fcd // CDECL is significant
|
|
|
76 |
-esym(123,min,max) // allows users to use min, max as variables
|
|
|
77 |
+rw(__inline) // activate the __inline keyword
|
|
|
78 |
+rw(packed) // activate the packed keyword
|
|
|
79 |
+ppw(import) // activate #import
|
|
|
80 |
-d_inline=__inline // _inline is the same as __inline
|
|
|
81 |
-sld10 // sizeof(long double) is 10.
|
|
|
82 |
-function(exit,_exit) // _exit() is like exit()
|
|
|
83 |
-function(exit,_assert) // _assert() is like exit()
|
|
|
84 |
-emacro(506,assert) // don't warn about constant value Boolean
|
|
|
85 |
-emacro(734,putc) // don't complain about items being too large.
|
|
|
86 |
-emacro(415,_FP_SEG) // access of out-of-bounds pointer
|
|
|
87 |
-emacro(740,FP_SEG,FP_OFF) // unusual casts
|
|
|
88 |
-emacro((???),va_arg) // the va_arg() macro can yield 415, 416, 661, 662
|
|
|
89 |
// 796 and 797 (out-of-bounds errors).
|
|
|
90 |
-emacro(413,offsetof) // use of NULL pointer creates a stir
|
|
|
91 |
-emacro(545,offsetof) // addressing an array member is OK
|
|
|
92 |
-e793 // inhibit 'ANSI limit reached' --
|
|
|
93 |
// limits are impractically low with MSVC headers
|
|
|
94 |
-esym(628,eof) // failure to provide argument information for eof()
|
|
|
95 |
-esym(773,L_tmpnam) // defined with an unparenthesized '+'
|
|
|
96 |
|
|
|
97 |
// The following functions exhibit variable return modes.
|
|
|
98 |
// That is, they may equally-usefully be called for a value
|
|
|
99 |
// as called just for their effects. Accordingly we inhibit
|
|
|
100 |
// Warning 534 for these functions.
|
|
|
101 |
// Feel free to add to or subtract from this list.
|
|
|
102 |
|
|
|
103 |
-esym(534,close,creat,fclose,fflush,_flsbuf,fprintf,fputc)
|
|
|
104 |
-esym(534,fputs,fscanf,fseek,fwrite,lseek,memcpy,memmove,memset)
|
|
|
105 |
-esym(534,printf,puts,scanf,sprintf,sscanf,strcat,strcpy)
|
|
|
106 |
-esym(534,strncat,strncpy,unlink,write)
|
|
|
107 |
|
|
|
108 |
// These are the wide char variants of printf-scanf family
|
|
|
109 |
|
|
|
110 |
-wprintf( 1, wprintf )
|
|
|
111 |
-wprintf( 2, fwprintf, swprintf )
|
|
|
112 |
-wscanf( 1, wscanf )
|
|
|
113 |
-wscanf( 2, fwscanf, swscanf )
|
|
|
114 |
|
|
|
115 |
// The following options are used to adjust our function mimicry to
|
|
|
116 |
// the actual library as provided by MS.
|
|
|
117 |
|
|
|
118 |
-function( wcstombs(1) ) // remove the check for a NULL first arg to wcstombs()
|
|
|
119 |
|
|
|
120 |
// The following options are required by most compilers to
|
|
|
121 |
// noiselessly process iostream.h
|
|
|
122 |
|
|
|
123 |
-elib(1717) // empty prototypes
|
|
|
124 |
-elib(522) // function return value ignored
|
|
|
125 |
-elib(1053) // prototypes cannot be distinguished
|
|
|
126 |
-elib(1721) // unusual operator =() declaration
|
|
|
127 |
-elib(1720) // assignment op has non-const parameter
|
|
|
128 |
-elib(655) // bitwise operator combining compatible enum's
|
|
|
129 |
-elib(641) // converting enum's to int
|
|
|
130 |
-elib(537) // repeated include file (ios.h)
|
|
|
131 |
-elib(1511) // member (rdbuf) hides nonvirtual member
|
|
|
132 |
-elib(1712) // default constructor not defined for class
|
|
|
133 |
-elib(1736) // redundant access specifier
|
|
|
134 |
// both a member and an ordinary function
|
|
|
135 |
-esym(1702,operator<<,operator>>)
|
|
|
136 |
|
|
|
137 |
// These functions return things that are frequently ignored.
|
|
|
138 |
|
|
|
139 |
-esym(534,*operator<<,*operator>>)
|
|
|
140 |
|
|
|
141 |
// The following additional options seem to be needed.
|
|
|
142 |
|
|
|
143 |
-elib(506) // constant value Boolean
|
|
|
144 |
-elib(620) // el or one? (some constants end in 'l' not 'L')
|
|
|
145 |
-elib(648) // overflow in computing constant (3<<16)
|
|
|
146 |
-elib(659) // nothing follows '}' on some line
|
|
|
147 |
-elib(723) // suspicious use of '='
|
|
|
148 |
-elib(747) // significant prototype coercion
|
|
|
149 |
-elib(740) // unusual pointer casts
|
|
|
150 |
-elib(1007) // virtual functions within extern "C" block
|
|
|
151 |
-elib(1029) // default argument repeated -- can't dist. char, signed char
|
|
|
152 |
-elib(1055) // call to rdbuf() questioned?
|
|
|
153 |
-elib(1504) // apparently useless structs
|
|
|
154 |
-elib(1708,1709) // minor C/C++ declaration conflict
|
|
|
155 |
-elib(1707) // operator new declared w/o 'static'
|
|
|
156 |
-elib(1722) // assignment op does not return reference
|
|
|
157 |
-elib(149) // default argument found in C code.
|
|
|
158 |
-elib(578) // declaration of time hides delaration of global time().
|
|
|
159 |
-elib(761) // two equivalent typedef declarations
|
|
|
160 |
-elib(1065) // same name declared as "C" and not "C"
|
|
|
161 |
-elib(1066) // same name declared as "C" and not "C"
|
|
|
162 |
-elib(1704) // constructor with private access declaration
|
|
|
163 |
-elib(1735) // default parameter within virtual function
|
|
|
164 |
-elib(773) // macros that look like unparenthesized expressions
|
|
|
165 |
-elib(806) // 1-bit bitfields typed int
|
|
|
166 |
-elib(1501) // 0-length data members
|
|
|
167 |
-elib(1510) // base class has no destructor
|
|
|
168 |
-elib(1516) // data member hides inherited member
|
|
|
169 |
-elib(1509) // base class destructor is not virtual
|
|
|
170 |
|
|
|
171 |
// Special Notice: You may be receiving mysterious 1058 errors
|
|
|
172 |
// when you use "iomanipulator"s. For example:
|
|
|
173 |
// cout << setw(4) << 4;
|
|
|
174 |
// results in Error 1058 (assigning a const to a ref) because the
|
|
|
175 |
// manipulator setw returns a non-lvalue which is assigned to a reference.
|
|
|
176 |
// This reflects an oversight in the Microsoft header file: iomanip.h
|
|
|
177 |
// Therein you may change the declaration:
|
|
|
178 |
// friend ostream& operator<<(iostream& s, IOMANIP(T) & sm) { ...
|
|
|
179 |
// to:
|
|
|
180 |
// friend ostream& operator<<(iostream& s, const IOMANIP(T) & sm) { ...
|
|
|
181 |
// to reflect the fact that sm is not modified by this function.
|
|
|
182 |
|
|
|
183 |
// In the following option we define __uuidof() and suppress
|
|
|
184 |
// Errors 50 and 69 and 1924 in exprs. containing same
|
|
|
185 |
-d"__uuidof()= /*lint --e(50,69,1924) */ (_GUID)0"
|
|
|
186 |
|
|
|
187 |
-esym(123,FD_SET) // defined as macro and as typedef
|
|
|
188 |
-esym(1726,endl,ends) // taking the address of an overloaded function
|
|
|
189 |
-esym(18,Data_t::Data_t) // definition not matching declaration
|
|
|
190 |
|
|
|
191 |
-elib(10) // expecting ')' -- comdef.h has a: #if defined( id
|
|
|
192 |
-elib(43) // vacuous array within _MIDL_FORMAT_STRING
|
|
|
193 |
-elib(602) // benign comment within comment
|
|
|
194 |
-elib(657) // declaring "anonymous struct" in union _LARGE_INTEGER
|
|
|
195 |
-elib(799) // long numerical constant for max. __int64
|
|
|
196 |
-elib(1502) // nothrow has no data members
|
|
|
197 |
-elib(1505) // no access specifier in base class specifier
|
|
|
198 |
-elib(1515) // AFX_THREAD_STATE member has no default constructor
|
|
|
199 |
-elib(1706) // Unusual declaration with a scope operator
|
|
|
200 |
-elib(1725) // data member is a reference
|
|
|
201 |
-elib(1548) // conflicting exception specifications
|
|
|
202 |
-elib(1737) // hiding global operator new
|
|
|
203 |
-elib(1739) // binary operator should be non-member function
|
|
|
204 |
-elib(1748) // non-virtual base class included twice
|
|
|
205 |
-elib(1759) // post-fix operator returns a reference
|
|
|
206 |
|