Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c > #105235
| From | BartC <bc@freeuk.com> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: Double-underline-itis |
| Date | 2017-03-01 13:04 +0000 |
| Organization | A noiseless patient Spider |
| Message-ID | <o96gp9$d8n$1@dont-email.me> (permalink) |
| References | <o951ti$ch6$1@dont-email.me> <87tw7doktz.fsf@bsb.me.uk> <o96c5h$l84$1@dont-email.me> <878topnpqm.fsf@bsb.me.uk> |
On 01/03/2017 12:30, Ben Bacarisse wrote:
> BartC <bc@freeuk.com> writes:
>> You mean that
>>
>> #define restrict
>>
>> won't work because someone could have....
>>
>> I don't even understand the problem. These are system headers,
>> designed to work with a particular implementation, so will know
>> whether 'restrict' is supported or not. What's the point of such a
>> keyword being introduced if it then goes onto use something else?
>
> Many implementations support various C standards. As I said, you could
> include a different header for C90, C99 and so on but it's easier to
> #define __restrict__ to either nothing or restrict depending on the
> language version.
I've just come across __signed__! How many C systems don't support 'signed'?
typedef __signed__ char __s8;
typedef unsigned char __u8;
Is this so __signed__ could be defined as 'unsigned' according to some
compiler option? That seems unlikely when you declaring distinct s8 and
u8 types.
(In a file from a Linux set of includes, one of various assorted headers
that get loaded even when just using a handful of standard headers in
the user-code. include\asm-generic\int-ll64.h
This was just after I had to 'remove' one time.h because it didn't
define clock(). But there were 4 other time.h files in sub-directories,
so no worries!
What a mess these system headers are. I hadn't realised they were so
Heath Robinson, looking like a bunch of hacks put together to meet some
deadline, instead of something more permanent.
Anyway these headers do seem to rely heavily on the use of "__" prefixes
absolutely everywhere. And, for some reason that I'm not sure has been
explained yet, on "__" suffixes.)
--
Bartc
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Double-underline-itis BartC <bc@freeuk.com> - 2017-02-28 23:44 +0000
Re: Double-underline-itis supercat@casperkitty.com - 2017-02-28 15:54 -0800
Re: Double-underline-itis Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-03-01 01:19 +0000
Re: Double-underline-itis David Brown <david.brown@hesbynett.no> - 2017-03-01 09:11 +0100
Re: Double-underline-itis BartC <bc@freeuk.com> - 2017-03-01 11:45 +0000
Re: Double-underline-itis Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-03-01 12:30 +0000
Re: Double-underline-itis BartC <bc@freeuk.com> - 2017-03-01 13:04 +0000
Re: Double-underline-itis Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-03-01 15:29 +0000
Re: Double-underline-itis gazelle@shell.xmission.com (Kenny McCormack) - 2017-03-01 15:47 +0000
Re: Double-underline-itis Keith Thompson <kst-u@mib.org> - 2017-03-01 09:30 -0800
Re: Double-underline-itis supercat@casperkitty.com - 2017-03-01 10:14 -0800
Re: Double-underline-itis Tim Rentsch <txr@alumni.caltech.edu> - 2017-04-16 18:45 -0700
csiph-web