473,378 Members | 1,393 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,378 software developers and data experts.

Which C compiler is best to use?(TO Martin Ambuhl for his suggestions)


Hello sir,
First sorry if seen this as again posted due to network
problem. Thanks for pointing me that void main() is wrong to use
************************************************** ***************************
void main()


^^^^
Why do so many people post without
a) following the newsgroup
b) checking the FAQ
or even
c) learning the first thing about C from even the most basic textbook?

It is impossible to take seriously a question from someone who could
screw up something so basic.

^^^^
You're dead already.
************************************************** ***************************
^^^^
How can anyone have the gall to post three questions all with the same
basic error?
************************************************** ************************

Above are all your 3 posts. Now what i want to ask if you mean to say
if
such above mistake is making me dead in C then first of all tell me
which
compiler are you using for C programming?
I have tested my code with
Microsoft VC++ 6.0
Then it seems Microsoft compiler is wrong to use then why not you write
a
email to Microsoft that add some patch or show warning about not to use
void main but use int main.

Also as per your suggestion i check and found on linux GCC is the
compiler that shows
warning only and allow to execute code. but where can i get graphical
frontend for gcc compiler for WINDOWS OS?

It seems you have more information so please kindly reply me and
please
you only give me link for downloading that Graphical Frontend GCC
compiler.
Thanks for your help.

Nov 15 '05 #1
10 1633

ra*******@gmail.com wrote:
Hello sir,
First sorry if seen this as again posted due to network
problem. Thanks for pointing me that void main() is wrong to use
************************************************** ***************************
> void main()


^^^^
Why do so many people post without
a) following the newsgroup
b) checking the FAQ
or even
c) learning the first thing about C from even the most basic textbook?

It is impossible to take seriously a question from someone who could
screw up something so basic.

^^^^
You're dead already.
************************************************** ***************************
^^^^
How can anyone have the gall to post three questions all with the same
basic error?
************************************************** ************************

Above are all your 3 posts. Now what i want to ask if you mean to say
if
such above mistake is making me dead in C then first of all tell me
which
compiler are you using for C programming?
I have tested my code with
Microsoft VC++ 6.0
Then it seems Microsoft compiler is wrong to use then why not you write
a
email to Microsoft that add some patch or show warning about not to use
void main but use int main.

Also as per your suggestion i check and found on linux GCC is the
compiler that shows
warning only and allow to execute code. but where can i get graphical
frontend for gcc compiler for WINDOWS OS?

It seems you have more information so please kindly reply me and
please
you only give me link for downloading that Graphical Frontend GCC
compiler.
Thanks for your help.


ok i found one compiler on http://www.c-frame.com/ is it ok with you
to use me that as perfect compiler that follows all C syntax rules

Nov 15 '05 #2
On Fri, 05 Aug 2005 06:44:01 -0700, rahul8143 wrote:
> void main()
^^^^
It is impossible to take seriously a question from someone who could
screw up something so basic.

<snip> Above are all your [Martin Ambuhl's] 3 posts. Now what i want to ask ...
Before you ask any more questions, perhaps you would answer Martin's,
which rephrased are:

Do you regularly read the posts in this newsgroup?
Do you know what a FAQ is?
If so, do you know where to find the FAQ for this newsgroup?
If so, have you read it?
Do you have a basic C textbook and have you read it?
where can i get graphical
frontend for gcc compiler for WINDOWS OS?


Hunt around the software sites on the web. There are plenty to choose
from. I don't know about the availability of graphical debuggers but I'd
be surprised if you couldn't find something.

Nov 15 '05 #3
ra*******@gmail.com writes:

[...regarding void main()...]
Now what i want to ask if you mean to say if such above mistake
is making me dead in C then first of all tell me which compiler
are you using for C programming? I have tested my code with
Microsoft VC++ 6.0
The compiler in use is irrelevant. The only portable return type
for main() is int. Some compilers and runtime systems will
accept other types. This doesn't mean that the code is correct,
only that it works on some systems.
Then it seems Microsoft compiler is wrong to use then why not
you write a email to Microsoft that add some patch or show
warning about not to use void main but use int main.
Microsoft knows. They don't care.
Also as per your suggestion i check and found on linux GCC is
the compiler that shows warning only and allow to execute
code. but where can i get graphical frontend for gcc compiler
for WINDOWS OS?


It would seem that this is your problem, not ours.
--
int main(void){char p[]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuv wxyz.\
\n",*q="kl BIcNBFr.NKEzjwCIxNJC";int i=sizeof p/2;char *strchr();int putchar(\
);while(*q){i+=strchr(p,*q++)-p;if(i>=(int)sizeof p)i-=sizeof p-1;putchar(p[i]\
);}return 0;}
Nov 15 '05 #4

Netocrat wrote:
On Fri, 05 Aug 2005 06:44:01 -0700, rahul8143 wrote:
> void main()
^^^^
It is impossible to take seriously a question from someone who could
screw up something so basic.

<snip>
Above are all your [Martin Ambuhl's] 3 posts. Now what i want to ask ...


Before you ask any more questions, perhaps you would answer Martin's,
which rephrased are:

Do you regularly read the posts in this newsgroup?

yes Do you know what a FAQ is? yes If so, do you know where to find the FAQ for this newsgroup? yes If so, have you read it? not completely. Do you have a basic C textbook and have you read it? yes
where can i get graphical
frontend for gcc compiler for WINDOWS OS?


Hunt around the software sites on the web. There are plenty to choose
from. I don't know about the availability of graphical debuggers but I'd
be surprised if you couldn't find something.

there's no problem to search ans i already did it (check my
last post)but i require some authetication from members of this group
for that software otherwise if i got something similar to Microsoft
VC++ then i will again continuing with my mistakes in writing programs.

Nov 15 '05 #5

Ben Pfaff wrote:
ra*******@gmail.com writes:

[...regarding void main()...]
Now what i want to ask if you mean to say if such above mistake
is making me dead in C then first of all tell me which compiler
are you using for C programming? I have tested my code with
Microsoft VC++ 6.0
The compiler in use is irrelevant. The only portable return type
for main() is int. Some compilers and runtime systems will
accept other types. This doesn't mean that the code is correct,
only that it works on some systems.
Then it seems Microsoft compiler is wrong to use then why not
you write a email to Microsoft that add some patch or show
warning about not to use void main but use int main.


Microsoft knows. They don't care.
Also as per your suggestion i check and found on linux GCC is
the compiler that shows warning only and allow to execute
code. but where can i get graphical frontend for gcc compiler
for WINDOWS OS?


It would seem that this is your problem, not ours.

ok its my problem that i am not able to find a good compiler that
meets C standards. I thought may be members of this group help me to
use correct compiler on windows other than usual one Microsoft VC++ 6. --
int main(void){char p[]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuv wxyz.\
\n",*q="kl BIcNBFr.NKEzjwCIxNJC";int i=sizeof p/2;char *strchr();int putchar(\
);while(*q){i+=strchr(p,*q++)-p;if(i>=(int)sizeof p)i-=sizeof p-1;putchar(p[i]\
);}return 0;}


Nov 15 '05 #6
ra*******@gmail.com writes:
Ben Pfaff wrote:
ra*******@gmail.com writes:

[...regarding void main()...]
> Now what i want to ask if you mean to say if such above mistake
> is making me dead in C then first of all tell me which compiler
> are you using for C programming? I have tested my code with
> Microsoft VC++ 6.0


The compiler in use is irrelevant. The only portable return type
for main() is int. Some compilers and runtime systems will
accept other types. This doesn't mean that the code is correct,
only that it works on some systems.
[...]
> Also as per your suggestion i check and found on linux GCC is
> the compiler that shows warning only and allow to execute
> code. but where can i get graphical frontend for gcc compiler
> for WINDOWS OS?


It would seem that this is your problem, not ours.

ok its my problem that i am not able to find a good compiler that
meets C standards. I thought may be members of this group help me to
use correct compiler on windows other than usual one Microsoft VC++ 6.


You seem to be confused. Defining main() to return `void' is
undefined behavior. This means that a compiler may treat it any
way, and it is not required to diagnose it. Thus, the Microsoft
compiler's behavior is standard conforming. The GCC behavior is
simply more helpful.
--
"To get the best out of this book, I strongly recommend that you read it."
--Richard Heathfield
Nov 15 '05 #7
On Fri, 05 Aug 2005 09:45:00 -0700, rahul8143 wrote:
Netocrat wrote:
On Fri, 05 Aug 2005 06:44:01 -0700, rahul8143 wrote:
> > void main()
>
> ^^^^

<snip>
Do you regularly read the posts in this newsgroup? yes


Perhaps you missed the thread(s) that have occurred within the last month
or so in which it was discussed that the only portable return type for
main is int. You also have ignored Keith Thompson's direct advice to you
that main should return int in an earlier thread.

I'm trying to give you the benefit of the doubt.
Do you know what a FAQ is?

yes
If so, do you know where to find the FAQ for this newsgroup?

yes
If so, have you read it?

not completely.


Check out questions 11.12, 11.13 and 11.15.

Most of the questions you've posted recently would have been easily
answered by reading the FAQ, your text book or following the group.
i require some authetication from members of this group for that
software otherwise if i got something similar to Microsoft VC++ then i
will again continuing with my mistakes in writing programs.


As far as I'm aware VC++ is ANSI compliant, or can be run in such a mode.
The point is that you can't rely on your compiler to tell you whether code
you write is standards-compliant. Sometimes it can't know or isn't
required to diagnose it. It's up to you to know.

Nov 15 '05 #8
On Fri, 05 Aug 2005 07:21:03 -0700, Ben Pfaff <bl*@cs.stanford.edu> wrote:
ra*******@gmail.com writes:

[...regarding void main()...]

Then it seems Microsoft compiler is wrong to use then why not
you write a email to Microsoft that add some patch or show
warning about not to use void main but use int main.


Microsoft knows. They don't care.


Actually, Microsoft has the following prototype in crt0.c (startup
routines), which is called function in __crt0():

int __cdecl main(int, char **, char **); /*generated by compiler*/

Allowing the user that kind of access to the startup libraries makes it
pointless to force main() to have a specific return value or function
prototype. Even though there is no ultimate purpose to change tho
function declaration, the user still has the option to make his own
personal start function.

Having main declared incorrectly should be as issue between the programmer
and startup libraries - not between the programmer and the compiler. It
should be no different than prototyping a function as returning a pointer
when it really returns a struct.
Nov 15 '05 #9
bk***@ncf.ca (Raymond Martineau) writes:
[...]
Having main declared incorrectly should be as issue between the programmer
and startup libraries - not between the programmer and the compiler. It
should be no different than prototyping a function as returning a pointer
when it really returns a struct.


Having main declared incorrectly should be an issue between the
programmer and the implementation. Though the compiler is not
obligated to warn about void main(), it would be helpful if it did so
(especially to those of us here who have to deal with the resulting
bad code).

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Nov 15 '05 #10
ra*******@gmail.com wrote on 05/08/05 :
Also as per your suggestion i check and found on linux GCC is the
compiler that shows
warning only and allow to execute code. but where can i get graphical
frontend for gcc compiler for WINDOWS OS?


Dev-C++ at http://www.bloodshed.net/

--
Emmanuel
The C-FAQ: http://www.eskimo.com/~scs/C-faq/faq.html
The C-library: http://www.dinkumware.com/refxc.html

"There are 10 types of people in the world today;
those that understand binary, and those that dont."
Nov 15 '05 #11

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

Similar topics

1
by: ds | last post by:
hello, i want to know the difference between vb.net and asp.net in intranet application. to bulid a intranet application which is best suited,vb.net or asp.net. i want to know the performance...
1
by: hpy_awad | last post by:
I am searching tpo compile programs that written under Zortech compiler . which compiler is nearest to Zortech because I can not get it direct from net ?
12
by: Francois Grieu | last post by:
Can #include safely use a preprocessing token, as in #define HEADERFILE "stdio.h" #include HEADERFILE int main(void) {return printf("Hello, world\n")*0;} TIA, François Grieu
1
by: rahul8143 | last post by:
Hello sir, Thanks for pointing me that void main() is wrong to use ***************************************************************************** > void main() ^^^^ Why do so many people post...
7
by: ajm | last post by:
Hi All, given an object file is there any way (or tool) to determine which compiler created it ? tia, A.
0
by: King Kong | last post by:
we are developing a custom information management system that is only a web based solution what we want to ask is 1. which is best MVC/Front Controller/application controller/page controller?...
48
by: meyer | last post by:
Hi everyone, which compiler will Python 2.5 on Windows (Intel) be built with? I notice that Python 2.4 apparently has been built with the VS2003 toolkit compiler, and I read a post from Scott...
1
by: esd | last post by:
Hello folks, the two code blocks below do the same thing, which is set a few form field values. Clearly the first method is the most elegant but my question is which is best in terms of lightest...
4
by: ddp1809 | last post by:
Which are Best available tool for project development in C programming language? From Where to get them? Is Turbo C Outdated?
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.