This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: addition to c99status


On Tue, 2 Jan 2001, Geoffrey Keating wrote:

> became well-defined: it behaves the same as if it had said 'return
> 0;'.  GCC doesn't implement this yet, and so I propose this patch...

(a) GCC does implement this (except it lets DEFAULT_MAIN_RETURN override
it on platforms with a conflicting definition).  See the diffs between
revisions 1.134 and 1.135 of c-decl.c.  It's arguable whether this should
be enabled outside C99 mode, but I tend to favour making broken (under the
old semantics) programs show their brokenness when run from makefiles and
returning nonzero exit status through lack of a return value, until C99
mode is the default (which shouldn't be until it is essentially fully
implemented, since portable programs may check __STDC_VERSION__ for C99
features, and while the value of __STDC_VERSION__ is a C99 feature that
GCC implements in C99 mode, there are other features it doesn't).

(b) The feature list is directly from C99, and the list there doesn't
claim to cover every minute difference (in particular, simply having
everything Done won't really be enough for C99 compliance without some
assurance, e.g. third party testsuites, that all the standard requirements
are implemented), so, if you think this feature is worth noting on the
list then add a mention in the notes at the bottom where differences from
the C99 list are detailed.

-- 
Joseph S. Myers
jsm28@cam.ac.uk


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]