Re: C is too old? opinions?
- From: Keith Thompson <kst-u@xxxxxxx>
- Date: Fri, 28 Sep 2007 13:08:54 -0700
Richard <rgrdev@xxxxxxxxx> writes:
"Charlie Gordon" <news@xxxxxxxxxxx> writes:
"jacob navia" <jacob@xxxxxxxxxxxxxxxx> a écrit dans le message de news:
46fa7a46$0$5101$ba4acef3@xxxxxxxxxxxxxxxxx
[...]
Why not
#pragma once
Chqrlie?
As others have mentioned, portability is an issue.
You insisted that this pragma is supported by many compilers, among which
gcc.
I cannot find any mention of it in the documentation for my current gcc
version 4.1.x.
If they support if, it is undocumented and probably deprecated.
So I will not use it..
Then don't. Easy. But for many C programmers who daily weigh up the
benefits of standard adherent C and "mainstream adopted" C it is not
such an easy decision. If I was building a code base for the main 3 PC
OS platforms and all the mainstream compilers used this pragma I know I
would use it.
It saves a little typing, at the expense of losing any guarantee that
it will continue to be supported, or even that it works exactly the
way you think it does. (As Chqrlie and I have both pointed out, gcc
doesn't even document it.) I don't see any great benefit from that.
--
Keith Thompson (The_Other_Keith) kst-u@xxxxxxx <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"
.
- Follow-Ups:
- Re: C is too old? opinions?
- From: Jean-Marc Bourguet
- Re: C is too old? opinions?
- From: Richard Harter
- Re: C is too old? opinions?
- References:
- Re: C is too old? opinions?
- From: Jack Klein
- Re: C is too old? opinions?
- From: pete
- Re: C is too old? opinions?
- From: Keith Thompson
- Re: C is too old? opinions?
- From: Charlie Gordon
- Re: C is too old? opinions?
- From: jacob navia
- Re: C is too old? opinions?
- From: Charlie Gordon
- Re: C is too old? opinions?
- From: Richard
- Re: C is too old? opinions?
- Prev by Date: Re: Handling allocation failures?
- Next by Date: Re: Meaning of __in , __out, __in_opt
- Previous by thread: Re: C is too old? opinions?
- Next by thread: Re: C is too old? opinions?
- Index(es):
Relevant Pages
|