This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: C constant expressions proposals
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: "Joseph S. Myers" <jsm at polyomino dot org dot uk>
- Cc: gcc at gcc dot gnu dot org
- Date: 14 Aug 2004 03:25:20 +0200
- Subject: Re: C constant expressions proposals
- Organization: Integrable Solutions
- References: <Pine.LNX.4.61.0408102349580.12535@digraph.polyomino.org.uk>
"Joseph S. Myers" <jsm@polyomino.org.uk> writes:
| I have now prepared detailed semi-formal models of the interpretation of
| the C constant expression rules, and their extension to GNU C, along with
| ordinary English text descriptions of those extensions to constant
| expressions that are de facto present in GNU C (as part of the present
| "whatever the compiler of the day happens to fold to a constant is
| constant") and which seem likely to have been widely used or the
| preservation of which has been specifically requested in past discussions
| of constant expressions. Also included are some notes on the benefits
| naturally associated with implementation of well-defined constant
| expression rules, apart from better conformance.
|
| http://www.srcf.ucam.org/~jsm28/gcc/#const
|
| Feedback welcome on these models; the (newly revised and expanded)
| discussion of problems with constant expression rules in C99; the
| particular extensions that should be accepted in GNU C; and anything else
| about these proposals.
I would like to mention the following proposal
Generalized Constant Expressions
http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2003/n1521.pdf
that has been well received and encouraged at the Kona meeting of the
C++ standards meeting. I believe, in all modesty, that it is a
extension worth having in GNU C and GNU C++, pending final vote from
the C++ standards committee.
-- Gaby