Subversion Repositories DevTools

Rev

Details | Last modification | View Log | RSS feed

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