473,404 Members | 2,170 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

preprocessor in c

first here is the code
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
/*errors.c*/
#include <stdio.h>
#define MAX 1000
/* this is the main function */
int main(){
prntf("hello\n");
//const float pi = 3.0;
rturn 0;
}
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
when i do preprocess with "cl /E error.c" with VS complier
i got message such as:

""""""""""""""""""""""""""""""
....
...
....
#pragma pack(pop)
#line 704 "C:\\Program Files\\Microsoft Visual Studio 8\\VC\\INCLUDE\
\stdio.h"

#line 706 "C:\\Program Files\\Microsoft Visual Studio 8\\VC\\INCLUDE\
\stdio.h"

#line 2 "C:\\DotKu\\Visual Studio 2005\\Projects\\Error\\Error\
\Error.cpp"
....
....
""""""""""""""""""""""""""""""""""

any one know what does these "# 704" means?

Feb 14 '08 #1
3 1432

"DotKu" <lw***@hotmail.comwrote in message news:
first here is the code
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
/*errors.c*/
#include <stdio.h>
#define MAX 1000
/* this is the main function */
int main(){
prntf("hello\n");
//const float pi = 3.0;
rturn 0;
}
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

when i do preprocess with "cl /E error.c" with VS complier
i got message such as:

""""""""""""""""""""""""""""""
...
..
...
#pragma pack(pop)
#line 704 "C:\\Program Files\\Microsoft Visual Studio 8\\VC\\INCLUDE\
\stdio.h"

#line 706 "C:\\Program Files\\Microsoft Visual Studio 8\\VC\\INCLUDE\
\stdio.h"

#line 2 "C:\\DotKu\\Visual Studio 2005\\Projects\\Error\\Error\
\Error.cpp"
...
...
""""""""""""""""""""""""""""""""""

any one know what does these "# 704" means?
It claims to have found an error in stdio.h.
Which is suspicious. I suspect that stdio.h illegally defines MAX on your
system.

--
Free games and programming goodies.
http://www.personal.leeds.ac.uk/~bgy1mm

Feb 14 '08 #2
"Malcolm McLean" <re*******@btinternet.comwrites:
"DotKu" <lw***@hotmail.comwrote in message news:
>first here is the code
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
/*errors.c*/
#include <stdio.h>
#define MAX 1000
/* this is the main function */
int main(){
prntf("hello\n");
//const float pi = 3.0;
rturn 0;
}
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

when i do preprocess with "cl /E error.c" with VS complier
i got message such as:

""""""""""""""""""""""""""""""
...
..
...
#pragma pack(pop)
#line 704 "C:\\Program Files\\Microsoft Visual Studio 8\\VC\\INCLUDE\
\stdio.h"

#line 706 "C:\\Program Files\\Microsoft Visual Studio 8\\VC\\INCLUDE\
\stdio.h"

#line 2 "C:\\DotKu\\Visual Studio 2005\\Projects\\Error\\Error\
\Error.cpp"
...
...
""""""""""""""""""""""""""""""""""

any one know what does these "# 704" means?
It claims to have found an error in stdio.h.
Which is suspicious. I suspect that stdio.h illegally defines MAX on
your system.
There's not error report there that I can see. The text "Error" is
just in the OP's file name.

The pre-processor is simply producing line control directives.

--
Ben.
Feb 14 '08 #3
On Wed, 13 Feb 2008 17:42:02 -0800 (PST), DotKu <lw***@hotmail.com>
wrote:
>first here is the code
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
/*errors.c*/
You tell us here that the file extension is c.
>#include <stdio.h>
#define MAX 1000
/* this is the main function */
int main(){
prntf("hello\n");
//const float pi = 3.0;
rturn 0;
}
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

when i do preprocess with "cl /E error.c" with VS complier
i got message such as:

""""""""""""""""""""""""""""""
...
..
...
#pragma pack(pop)
#line 704 "C:\\Program Files\\Microsoft Visual Studio 8\\VC\\INCLUDE\
\stdio.h"

#line 706 "C:\\Program Files\\Microsoft Visual Studio 8\\VC\\INCLUDE\
\stdio.h"

#line 2 "C:\\DotKu\\Visual Studio 2005\\Projects\\Error\\Error\
\Error.cpp"
Your compiler is telling us it is cpp. Odds are the compiler is the
more accurate of the two which means this is being processed as C++
code and not C code.
>...
...
""""""""""""""""""""""""""""""""""

any one know what does these "# 704" means?

Remove del for email

--
Posted via a free Usenet account from http://www.teranews.com

Feb 18 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

205
by: Jeremy Siek | last post by:
CALL FOR PAPERS/PARTICIPATION C++, Boost, and the Future of C++ Libraries Workshop at OOPSLA October 24-28, 2004 Vancouver, British Columbia, Canada http://tinyurl.com/4n5pf Submissions
24
by: Nudge | last post by:
I have an array, and an unrolled loop which looks like this: do_something(A); do_something(A); .... do_something(A); I thought: why should I type so much? I should write a macro. So I was...
16
by: Trying_Harder | last post by:
Is it possible to redefine a macro with global scope after undefining it in a function? If yes, could someone explain how? /If/ my question above isn't very clear you can refer to the...
13
by: seemanta dutta | last post by:
Greetings C gurus, I have used preprocessor directives since a very long time. But whenever I see some professional piece of C code, the linux kernel for example, I get literally confused by the...
18
by: /* frank */ | last post by:
My teacher said that array in C is managed by preprocessor. Preprocesser replace all array occurences (i.e. int a ) with something that I don't understand/remember well. What's exactly happens...
13
by: Chris Croughton | last post by:
Is the following code standard-compliant, and if so what should it do? And where in the standard defines the behaviour? #include <stdio.h> #define DEF defined XXX int main(void) { int...
9
by: Walter Roberson | last post by:
I have run into a peculiarity with SGI's C compiler (7.3.1.2m). I have been reading carefully over the ANSI X3.159-1989 specification, but I cannot seem to find a justification for the behaviour....
2
by: Paolo | last post by:
I imported a VC++6.0 project into VC++7.1. The conversion operation makes a mess with Preprocessor Definitions, adding a "$(NoInherit)" for each file. For example: I had a DLL project in VC++6.0...
32
by: spibou | last post by:
Is the output of the C preprocessor deterministic ? What I mean by that is , given 2 compilers which conform to the same standard, will their preprocessors produce identical output given as input...
31
by: Sam of California | last post by:
Is it accurate to say that "the preprocessor is just a pass in the parsing of the source file"? I responded to that comment by saying that the preprocessor is not just a pass. It processes...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.