By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,837 Members | 1,842 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,837 IT Pros & Developers. It's quick & easy.

Info about the GNU C Compiler...?

P: n/a
I know it is a free compiler. But does it follow any standard? If so
which standard is it? (Ansi, Ecma, etc?)

Apr 26 '07 #1
Share this Question
Share on Google+
31 Replies


P: n/a
Le 26-04-2007, arun <de*******@gmail.coma écrit*:
I know it is a free compiler. But does it follow any standard? If so
which standard is it? (Ansi, Ecma, etc?)
Did you have a single look at GCC documentation before posting ?
Google GCC -http://gcc.gnu.org/onlinedocs/ ->
* GCC 4.1.2 Manual ->
# 1 Programming Languages Supported by GCC
# 2 Language Standards Supported by GCC

Marc Boyer
Apr 26 '07 #2

P: n/a
arun said:
I know it is a free compiler. But does it follow any standard? If so
which standard is it? (Ansi, Ecma, etc?)
The gcc/glibc implementation conforms extremely well to the 1989 ANSI C
Standard, which was later adopted by ISO as ISO/IEC 9899:1990.

It does not claim to conform to the later 1999 ISO Standard, but does in
fact support most of that Standard's changes to C. It reached this "not
quite there" conformance level some years ago, and shows no signs of
approaching C99 any more closely for the foreseeable future.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at the above domain, - www.
Apr 26 '07 #3

P: n/a
In article <HN*********************@bt.com>,
Richard Heathfield <rj*@see.sig.invalidwrote:
>arun said:
>I know it is a free compiler. But does it follow any standard? If so
which standard is it? (Ansi, Ecma, etc?)
>The gcc/glibc implementation conforms extremely well to the 1989 ANSI C
Standard, which was later adopted by ISO as ISO/IEC 9899:1990.
[OT]
Does gcc still assert __STDC__ when language extensions have been
allowed (i.e., when the compiler was not invoked in strict
conformance mode) ? They used to do that, and would excuse it
by saying "Compilers which do not adhere to the ANSI/ISO standards
are free to do whatever they want, including asserting macros that
might lead a program to believe that it ws being compiled by
an ANSI/ISO standard compiler."
--
"No one has the right to destroy another person's belief by
demanding empirical evidence." -- Ann Landers
Apr 26 '07 #4

P: n/a
Richard Heathfield wrote:
arun said:
>I know it is a free compiler. But does it follow any standard? If so
which standard is it? (Ansi, Ecma, etc?)

The gcc/glibc implementation conforms extremely well to the 1989 ANSI C
Standard, which was later adopted by ISO as ISO/IEC 9899:1990.

It does not claim to conform to the later 1999 ISO Standard, but does in
fact support most of that Standard's changes to C. It reached this "not
quite there" conformance level some years ago, and shows no signs of
approaching C99 any more closely for the foreseeable future.
.... like most C compilers...
Apr 26 '07 #5

P: n/a
On Thu, 26 Apr 2007 15:22:30 +0000, Richard Heathfield
<rj*@see.sig.invalidwrote:
>>
I know it is a free compiler. But does it follow any standard? If so
which standard is it? (Ansi, Ecma, etc?)
The gcc/glibc implementation conforms extremely well to the 1989 ANSI C
Standard, which was later adopted by ISO as ISO/IEC 9899:1990.
Especially when called with the options

-std=c89 -pedantic
or
-std=iso9899:1990 -pedantic
or
-ansi -pedantic
G.

--

E-mail: info<at>simple-line<Punkt>de
Apr 26 '07 #6

P: n/a
On Thu, 26 Apr 2007 15:22:30 +0000, Richard Heathfield
<rj*@see.sig.invalidwrote:
>
It does not claim to conform to the later 1999 ISO Standard, but does in
fact support most of that Standard's changes to C.
For more details, see:

http://gcc.gnu.org/gcc-4.1/c99status.html
>
It reached this "not quite there" conformance level some years ago, and
shows no signs of approaching C99 any more closely for the foreseeable
future.
Indeed. :-(
(For example,

feature: variable-length arrays -- Broken
feature: complex (and imaginary) support in <complex.h-- Broken
feature: inline functions -- Broken

and so on...)
G.

--

E-mail: info<at>simple-line<Punkt>de
Apr 26 '07 #7

P: n/a
In article <f0**********@canopus.cc.umanitoba.ca>,
Walter Roberson <ro******@ibd.nrc-cnrc.gc.cawrote:
>Does gcc still assert __STDC__ when language extensions have been
allowed (i.e., when the compiler was not invoked in strict
conformance mode) ? They used to do that, and would excuse it
by saying "Compilers which do not adhere to the ANSI/ISO standards
are free to do whatever they want, including asserting macros that
might lead a program to believe that it ws being compiled by
an ANSI/ISO standard compiler."
That's an argument as to why it's legal, but presumably they have a
real reason for doing it. Most likely it's that people usually use
__STDC__ to ensure that standard features are available, rather than
to ensure that extensions are not.

Can you give an example of using __STDC__ for the latter purpose?

-- Richard
--
"Consideration shall be given to the need for as many as 32 characters
in some alphabets" - X3.4, 1963.
Apr 26 '07 #8

P: n/a
ri*****@cogsci.ed.ac.uk (Richard Tobin) writes:
In article <f0**********@canopus.cc.umanitoba.ca>,
Walter Roberson <ro******@ibd.nrc-cnrc.gc.cawrote:
>>Does gcc still assert __STDC__ when language extensions have been
allowed (i.e., when the compiler was not invoked in strict
conformance mode) ? They used to do that, and would excuse it
by saying "Compilers which do not adhere to the ANSI/ISO standards
are free to do whatever they want, including asserting macros that
might lead a program to believe that it ws being compiled by
an ANSI/ISO standard compiler."

That's an argument as to why it's legal, but presumably they have a
real reason for doing it. Most likely it's that people usually use
__STDC__ to ensure that standard features are available, rather than
to ensure that extensions are not.
In fact, using it to ensure that extensions are not available is a
misuse. C99 4p6:

A conforming implementation may have extensions (including
additional library functions), provided they do not alter the
behavior of any strictly conforming program.

In its default non-conforming mode, I think gcc's main point of
non-conformance is its failure to issue some required diagnostics.
Can you give an example of using __STDC__ for the latter purpose?
--
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."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
Apr 26 '07 #9

P: n/a
arun wrote:
>
I know it is a free compiler. But does it follow any standard?
If so which standard is it? (Ansi, Ecma, etc?)
Is what a free compiler?

--
<http://www.cs.auckland.ac.nz/~pgut001/pubs/vista_cost.txt>
<http://www.securityfocus.com/columnists/423>
<http://www.aaxnet.com/editor/edit043.html>
<http://kadaitcha.cx/vista/dogsbreakfast/index.html>
cbfalconer at maineline dot net

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

Apr 27 '07 #10

P: n/a
CBFalconer said:
arun wrote:
>>
I know it is a free compiler. But does it follow any standard?
If so which standard is it? (Ansi, Ecma, etc?)

Is what a free compiler?
GNU C.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at the above domain, - www.
Apr 27 '07 #11

P: n/a
Ok. Is it also true that parts of the linux kernel was made with the
same compiler?

Apr 27 '07 #12

P: n/a
In article <11**********************@n15g2000prd.googlegroups .com>,
arun <de*******@gmail.comwrote:
>Ok. Is it also true that parts of the linux kernel was made with the
same compiler?
The Linux kernel is certainly copmiled with GCC.

-- Richard

--
"Consideration shall be given to the need for as many as 32 characters
in some alphabets" - X3.4, 1963.
Apr 27 '07 #13

P: n/a
arun wrote:
>
Ok. Is it also true that parts of the linux kernel was made with the
same compiler?
What same compiler. What else is supposed to be true? Don't
assume your readers can see the subject line. See below.

--
If you want to post a followup via groups.google.com, ensure
you quote enough for the article to make sense. Google is only
an interface to Usenet; it's not Usenet itself. Don't assume
your readers can, or ever will, see any previous articles.
More details at: <http://cfaj.freeshell.org/google/>

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

Apr 27 '07 #14

P: n/a
In article <46***************@yahoo.com>,
CBFalconer <cb********@maineline.netwrote:
>arun wrote:
>>
I know it is a free compiler. But does it follow any standard?
If so which standard is it? (Ansi, Ecma, etc?)

Is what a free compiler?
No. "what" is not a free compiler.

"Who" might be, though.

Apr 27 '07 #15

P: n/a
CBFalconer <cb********@yahoo.comwrites:
arun wrote:
>>
Ok. Is it also true that parts of the linux kernel was made with the
same compiler?

What same compiler. What else is supposed to be true? Don't
assume your readers can see the subject line. See below.
Huh? What below?

The subject, btw, is an integral part of a post. Hence it is called the
"subject".
Apr 28 '07 #16

P: n/a
Richard wrote:
The subject, btw, is an integral part of a post. Hence it is called the
"subject".
"Integral part" doesn't necessarily mean "conveniently visible".

Exhibits (as it weren't) A, B, and C: my heart, your brain, and
CBFalconer's liver.

--
Organic Hedgehog
"Our future looks secure, but it's all out of our hands"
- Magenta, /Man and Machine/

Apr 28 '07 #17

P: n/a
Chris Dollin wrote:
Richard wrote:
>The subject, btw, is an integral part of a post. Hence it is called the
"subject".

"Integral part" doesn't necessarily mean "conveniently visible".
And, as anyone who has more than 5 minutes experience in newsgroups
knows, it doesn't necessarily mean, and all too frequently doesn't mean
"even tangentially related to the post." That's one of the reasons that
many regulars don't even bother looking at them when they _are_
"conveniently visible." The basic rule of thumb is: if it is worth
saying at all, its worth stating in the body of the post. Something so
unimportant that you can't be bothered putting in the body of the post
is *properly* ignored.

Apr 28 '07 #18

P: n/a
Richard wrote:
CBFalconer <cb********@yahoo.comwrites:
>arun wrote:
>>Ok. Is it also true that parts of the linux kernel was made with the
same compiler?
What same compiler. What else is supposed to be true? Don't
assume your readers can see the subject line. See below.

Huh? What below?

The subject, btw, is an integral part of a post. Hence it is called the
"subject".
Your post has the headers quoted below. What is your standard for
deciding that one of them is "an integral part of a post"? How many of
these should we inspect to discover information you have hidden,
information so negligible and unimportant that you can't bother to put
it in the body of the post? Damn! If I'd only known that you were
using "Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.91 (gnu/linux)" I could
have figured out what you question was. Acutally, if I had noticed that
you were using gmail.com, I would have realized that you were clueless.
Path: uni-berlin.de!individual.net!not-for-mail
From: Richard <rg****@gmail.com>
Newsgroups: comp.lang.c
Subject: Re: Info about the GNU C Compiler...? (Then what about linux?)
Date: Sat, 28 Apr 2007 02:41:58 +0200
Lines: 14
Message-ID: <87************@gmail.com>
References: <11*********************@n35g2000prd.googlegroups. com>
<46***************@yahoo.com<MZ******************* **@bt.com>
<11**********************@n15g2000prd.googlegroups .com>
<46***************@yahoo.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Trace: individual.net 0zVNQfcqY7FBCv+diSDYJAU+038Qo5mdeyjeAFCAf4nAAddjqI
X-Orig-Path: news.individual.net!news
User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.91 (gnu/linux)
Cancel-Lock: sha1:D3lwwjKKGTS+VUuz2G1LOpE/Q4g=
Xref: uni-berlin.de comp.lang.c:837691
Apr 28 '07 #19

P: n/a
The Linux kernel is certainly copmiled with GCC.
--Richard
So considering the fact that

a) the GNU C compiler adopts an open standard,
b) and the compiler is free,

does this mean that we cannot anti-socially hack linux?

--deostroll

PS: Frankly I don't know what to do about the fact other ppl not being
able to read my prev posts! And, yes, I am doing all of this from
google groups.

Apr 28 '07 #20

P: n/a
On Sat, 28 Apr 2007 02:41:58 +0200, in comp.lang.c , Richard
<rg****@gmail.comwrote:
>CBFalconer <cb********@yahoo.comwrites:
>arun wrote:
>>>
Ok. Is it also true that parts of the linux kernel was made with the
same compiler?

What same compiler. What else is supposed to be true? Don't
assume your readers can see the subject line. See below.

Huh? What below?
The below that was in his sig.
>The subject, btw, is an integral part of a post.
So is the X-Tace line. Would you expect to need to read that to
understand a post?
>Hence it is called the "subject".
"Hence" ?
--
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
Apr 28 '07 #21

P: n/a
In article <11**********************@y80g2000hsf.googlegroups .com>,
deostroll <de*******@gmail.comwrote:
>The Linux kernel is certainly copmiled with GCC.
>So considering the fact that

a) the GNU C compiler adopts an open standard,
b) and the compiler is free,

does this mean that we cannot anti-socially hack linux?
I have no idea how you reach that conclusion!

P.S. if you add a Followup-To: header, make sure it's syntactically correct.

-- Richard
--
"Consideration shall be given to the need for as many as 32 characters
in some alphabets" - X3.4, 1963.
Apr 28 '07 #22

P: n/a
In article <YM*******************@fe1.news.blueyonder.co.uk >,
Chris Dollin <eh@electrichedgehog.netwrote:
>The subject, btw, is an integral part of a post. Hence it is called the
"subject".
>"Integral part" doesn't necessarily mean "conveniently visible".
Which are these newsreaders that don't make the subject conveniently
visible while reading a short article (I could imagine it scrolling
of the screen in a long one). And why don't their users get them
fixed?

-- Richard
--
"Consideration shall be given to the need for as many as 32 characters
in some alphabets" - X3.4, 1963.
Apr 28 '07 #23

P: n/a
"Richard Tobin" <ri*****@cogsci.ed.ac.ukwrote in message
news:f0***********@pc-news.cogsci.ed.ac.uk...
In article <11**********************@n15g2000prd.googlegroups .com>,
arun <de*******@gmail.comwrote:
>>Ok. Is it also true that parts of the linux kernel was made with the
same compiler?
The Linux kernel source was made by humans using text editors. If you meant
a particular pre-compiled kernel, the answer depends on who did the
compiling; you'd have to ask the person(s) you got it from. If you compiled
it yourself, hopefully you know the answer.
The Linux kernel is certainly copmiled with GCC.
Well, that's one option. You can compile it with ICC as well, if you wish,
or possibly other compilers. Since the Linux kernel makes heavy use of GCC
extensions and other non-portable code, though, it's not particularly easy
to find other options.

S

--
Stephen Sprunk "Those people who think they know everything
CCIE #3723 are a great annoyance to those of us who do."
K5SSS --Isaac Asimov
--
Posted via a free Usenet account from http://www.teranews.com

Apr 29 '07 #24

P: n/a
I have no idea how you reach that conclusion!
-- Richard
Eh, well, I assume virus writers would use a non-standard C compiler.
Your linux os might contain a standard version of the C compiler. In
such cases those evil programs would not run the way it was thought
to...I don't know; its a wild idea.

I may be wrong or outright silly. But tell me this, if you were to
install something on linux via downloading from the internet, would
you do it? Do you ever download from the internet like how you do on
Windows? Or do you just get the source code of the application you
want and you make binaries of it yourself?

How do we do it (install programs) on a linux os?

Apr 29 '07 #25

P: n/a
You can compile it with ICC as well...
Whats the ICC?
--deostroll

Apr 29 '07 #26

P: n/a
"deostroll" <de*******@gmail.comwrote in message
news:11**********************@o5g2000hsb.googlegro ups.com...
>You can compile it with ICC as well...

Whats the ICC?
ICC is Intel's compiler, intended to be a drop-in replacement for GCC on
Linux and for MSVC on Windows. To achieve that, they had to implement all
of the various extensions of the compilers they were trying to replace.

S

--
Stephen Sprunk "Those people who think they know everything
CCIE #3723 are a great annoyance to those of us who do."
K5SSS --Isaac Asimov
--
Posted via a free Usenet account from http://www.teranews.com

Apr 29 '07 #27

P: n/a
On Apr 29, 2:17 pm, deostroll <deostr...@gmail.comwrote:
I have no idea how you reach that conclusion!
-- Richard

Eh, well, I assume virus writers would use a non-standard C compiler.
Your linux os might contain a standard version of the C compiler. In
such cases those evil programs would not run the way it was thought
to...I don't know; its a wild idea.

I may be wrong or outright silly. But tell me this, if you were to
install something on linux via downloading from the internet, would
you do it? Do you ever download from the internet like how you do on
Windows? Or do you just get the source code of the application you
want and you make binaries of it yourself?

How do we do it (install programs) on a linux os?
Anyone care to comment on this?
--deostroll

May 17 '07 #28

P: n/a
deostroll <de*******@gmail.comwrites:
On Apr 29, 2:17 pm, deostroll <deostr...@gmail.comwrote:
I have no idea how you reach that conclusion!
-- Richard

Eh, well, I assume virus writers would use a non-standard C compiler.
Your linux os might contain a standard version of the C compiler. In
such cases those evil programs would not run the way it was thought
to...I don't know; its a wild idea.

I may be wrong or outright silly. But tell me this, if you were to
install something on linux via downloading from the internet, would
you do it? Do you ever download from the internet like how you do on
Windows? Or do you just get the source code of the application you
want and you make binaries of it yourself?

How do we do it (install programs) on a linux os?

Anyone care to comment on this?
--deostroll
Apparently not, since nobody commented when you posted the same thing
three weeks ago, and it has little to do with C programming.

--
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."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
May 18 '07 #29

P: n/a
Ok how about some info about when it comes to installing programs or
packages...do we have to download the application's entire source code
or the application binaries as such?

I would not go for the latter, because there is no way of being sure
that that app works fine on my sys (i.e without harming it); bcos the
source code is not there. Hence I would go for the former option.

But what do ppl normally do?

--deostroll

May 23 '07 #30

P: n/a
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

deostroll wrote:
Ok how about some info about when it comes to installing programs or
packages...do we have to download the application's entire source code
or the application binaries as such?
Well, that question entirely off topic here in comp.lang.c. FWIW, pre-compiled
programs have nothing to do with the C language, and C source code has
everything to do with the C language. You may make your inferences accordingly.
- --
Lew Pitcher

Master Codewright & JOAT-in-training | Registered Linux User #112576
http://pitcher.digitalfreehold.ca/ | GPG public key available by request
- ---------- Slackware - Because I know what I'm doing. ------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Armoured with GnuPG

iD8DBQFGVGxJagVFX4UWr64RAnrdAKC1urmO8oGpd714PwVlCs nfELHAiACg4qY3
SU7MIiEdni9//b1nFH2Jp58=
=U58j
-----END PGP SIGNATURE-----
May 23 '07 #31

P: n/a
deostroll wrote:
>
Ok how about some info about when it comes to installing programs
or packages...do we have to download the application's entire
source code or the application binaries as such?

I would not go for the latter, because there is no way of being
sure that that app works fine on my sys (i.e without harming it);
bcos the source code is not there. Hence I would go for the former
option.

But what do ppl normally do?
See the sig. below. Also, please do not use funny abbreviations,
such as ppl, app. These are probably totally confusing to people
who do not sport English as their base language.

--
If you want to post a followup via groups.google.com, ensure
you quote enough for the article to make sense. Google is only
an interface to Usenet; it's not Usenet itself. Don't assume
your readers can, or ever will, see any previous articles.
More details at: <http://cfaj.freeshell.org/google/>

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

May 24 '07 #32

This discussion thread is closed

Replies have been disabled for this discussion.