Re: Compile Errors
- From: Mark McIntyre <markmcintyre@xxxxxxxxxxx>
- Date: Sun, 12 Feb 2006 00:47:34 +0000
On 11 Feb 2006 09:55:05 -0800, in comp.lang.c , "Technoid"
<dadams@xxxxxxxxxxxxxxxx> wrote:
I'm working on a legacy test platform with a compiler that expects K&R
style C (as opposed to ANSI). How does this affect the required syntax
for my code? Would it affect syntax for function prototypes?
Very much so, since K&R C doesn't allow prototypes AFAIR. You can have
declarations tho.
When I attempt to make or compile my C code, the compiler complains
about the syntax of the function prototypes, even though the syntax is
correct.
Example syntax:
void function_name(void);
This isn't valid pre-ANSI C. You need to remove the void, and any
other parameters, from the prototype to turn it into a plain old
declaration.
Mark McIntyre
--
"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it."
--Brian Kernighan
----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
.
- References:
- Compile Errors
- From: Technoid
- Compile Errors
- Prev by Date: Re: how to write a program that takes arguments from commandline?
- Next by Date: Re: Why foo and bar in every tutorial i read?
- Previous by thread: Re: Compile Errors
- Next by thread: Command Line Interface (CLI): your recommendations
- Index(es):
Relevant Pages
|