Re: Allowable global declaration in C
Joseph M. Newcomer wrote:
Well, if it has an error, I suppose there was some text with that error message? Would it
be asking too much to say what it is?
If you read my comments under the code, all would have been clear to you.
It works fine under VC++1.0 and VC++6.0. But does not compile without
error under gcc 4.2 and 4.4.
The whole point is whether someone with VS2010 will compile the code or
not. If not, then it shows that MS has further made their C compiler
ISO compliant.
What is the point of this question?
I am confused because you ask about something that compiles in VS C++, but the subject
line asks a question about C?
Please ask a coherent question, and note that any question which is of the form "why do I
get an error message" which is NOT accompanied by both the text of the error message and
an indication of what the line numbers are in the sample source will be treated as noise
and ignored.
The question was coherent. Did you try and compile the code?
joe
On Wed, 06 Apr 2011 10:44:09 -0600, GreyCloud <cumulus@mist.com> wrote:
will this code compile on VS2010 C?
#include <stdio.h>
FILE *yyout = stdout;
int main()
{
char c;
c = 'X';
putc(c, yyout);
putc('\n', yyout);
fclose(yyout);
return 0;
}
This compiles fine under VS C++ 1.0 and 6.0.
However, will not under gcc 4.2 or 4.4.
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
--
"It is impossible to defeat an ignorant man in argument."
William G. McAdoo.
American Government official (1863-1941).