This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Preprocessor keyword #echo is missing
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: Martin Sebor <sebor at roguewave dot com>
- Cc: Zack Weinberg <zack at codesourcery dot com>, "J. Grant" <jg-web at jguk dot org>, Falk Hueffner <falk dot hueffner at student dot uni-tuebingen dot de>, gcc-bugs <gcc-bugs at gcc dot gnu dot org>
- Date: 12 Feb 2003 11:56:59 +0100
- Subject: Re: Preprocessor keyword #echo is missing
- Organization: Integrable Solutions
- References: <3E301211.7090405@gmx.net><87bs2725gs.fsf@student.uni-tuebingen.de> <3E308BD8.40401@gmx.net><878yxbqs6j.fsf@egil.codesourcery.com> <3E30976B.7030506@gmx.net><873cnjqq63.fsf@egil.codesourcery.com> <3E37E3F5.4060709@jguk.org><87fzquwupv.fsf@egil.codesourcery.com> <3E494030.90803@roguewave.com>
Martin Sebor <sebor@roguewave.com> writes:
| Zack Weinberg wrote:
| > "J. Grant" <jg-web@jguk.org> writes:
| >
| >>>Frankly I do not consider the elimination of that extra text to be
| >>>sufficient justification for adding another directive. You can do
| >>>gcc ... 2>&1 | sed -e 's/warning: #warning //' if it really bugs you.
| >>
| >>I am using this currently, an #echo solution would be a better way to
| >>resolve this though.
| > I honestly do not see why you think that.
| > Note that even #warning is an extension, and has been controversial.
| >
| >>OK, well would you consider that #echo would be a useful addition to
| >>the GCC preprocessor language? I personally do and I can not believe
| >>I am the only one who sees this gap that needs filling.
| > Sorry, but I do not see a need.
|
| A #echo at the compiler level rather than at the preprocessor level
| would, IMHO, be extremely useful in the context of metaprogramming.
| At the very least, it would provide a framework for the proposed
| implementation of the static assert feature:
|
| http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/papers/2002/n1381.htm
Hi Martin,
As you know, I (and Joddy and Robert) reported on that paper at the
last Santa Cruz meeting. The declaration form proposed in the paper
doesn't integrate into the language general rules. Robert and I
agreed on pursing the idea from expression point of view. But there
remains some corner cases to work out.
At any rate I would not support a preprocessor extension to implement
that -- for reasons given the the refrenced paper.
-- Gaby