home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 14 Text
/
14-Text.zip
/
C6_BUGS.ZIP
/
C6_20064.BUG
< prev
next >
Wrap
Text File
|
1990-09-11
|
2KB
|
96 lines
Q61308 /Fs Does Not Locate Error When #line Directive Is Specified
Microsoft C Compiler (C)
5.10 6.00 | 5.10 6.00
MS-DOS | OS/2
Summary:
When the #line preprocessor directive is used with a filename label,
/Fs generates a source listing with the correct error count but fails
to correctly locate the errors in the listing file.
Sample Code
-----------
#include <stdio.h>
#line 1 "hello"
void main()
{
intt x; /* the error is here */
printf("hello");
}
More Information:
Below is the normal source listing generated by the compiler:
Line# Source Line Microsoft C Compiler Version 6.00
1
2 #include <stdio.h>
3
4 void main()
5 {
6 intt x; /* the error is here */
***** test.c(6) : error C2065: 'intt' : undefined
***** test.c(6) : error C2146: syntax error : missing ';' before ...
***** test.c(6) : error C2065: 'x' : undefined
7
8 printf("hello");
9 }
3 errors detected
When compiled with a #line directive and a filename label, the source
listing fails to indicate the error, only the number of errors. For
example:
Line# Source Line Microsoft C Compiler Version 6.00
1 #include <stdio.h>
2
3 #line 1 "foobar"
4
5 void main()
6 {
7
8 intt x; /* error is here */
9
10 printf("hello");
11 }
3 errors detected
If the filename label ("foobar" in this case) is not specified, the
source listing contains the error messages, but they are not in the
correct place. For example:
Line# Source Line Microsoft C Compiler Version 6.00
1
2 #include <stdio.h>
3 #line 1
4
***** test.c(4) : error C2065: 'intt' : undefined
***** test.c(4) : error C2146: syntax error : missing ';' before ...
***** test.c(4) : error C2065: 'x' : undefined
5 void main()
6 {
7 intt x; /* the error is here */
8
9 printf("hello");
10 }
3 errors detected
Microsoft has confirmed this to be a problem with C version 6.00. We
are researching this problem and will post new information here as it
becomes available.
Keywords: buglist6.00
COPYRIGHT Microsoft Corporation, 1990.
Updated 90/07/12 05:22