Article View: comp.std.c
Article #3127Can an implementation ``pre-qualify'' a standard type?
From: Paul Eggert
Date: Mon, 10 Jun 1991 23:21
Date: Mon, 10 Jun 1991 23:21
24 lines
1221 bytes
1221 bytes
Can a conforming Standard C implementation header ``pre-qualify'' a
standard type by ``hardwiring'' a qualifier into its typedef? E.g. can
<signal.h> behave as if
typedef volatile int sig_atomic_t;
defines sig_atomic_t? Rumor has it that at least one would-be
conforming implementation does this to head off common programming errors.
If you answered ``yes'' to the above question, where does this sort of
thing stop, and why? Is `volatile' permitted but `const' forbidden here?
For example, can <stdio.h> behave as if
typedef const struct {/*...etc...*/} FILE;
defines FILE? Can <time.h> behave as if
struct tm { const int inconvenient; int tm_sec; /*...etc...*/};
defines struct tm? Can <stddef.h> behave as if
typedef const unsigned size_t;
defines size_t?
Technical Details
Message-ID:
<1991Jun10.232144.24618@twinsun.com>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!ucla-cs!twinsun!eggertShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!ucla-cs!twinsun!eggert From: eggert@twinsun.com (Paul Eggert) Newsgroups: comp.std.c Subject: Can an implementation ``pre-qualify'' a standard type? Message-ID: <1991Jun10.232144.24618@twinsun.com> Date: 10 Jun 91 23:21:44 GMT Sender: usenet@twinsun.com Organization: Twin Sun, Inc Lines: 24 Nntp-Posting-Host: twinsun