Path: 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 Can a conforming Standard C implementation header ``pre-qualify'' a standard type by ``hardwiring'' a qualifier into its typedef? E.g. can 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 behave as if typedef const struct {/*...etc...*/} FILE; defines FILE? Can behave as if struct tm { const int inconvenient; int tm_sec; /*...etc...*/}; defines struct tm? Can behave as if typedef const unsigned size_t; defines size_t?