code that could be improved

Joseph S. Myers
Tue Mar 2 11:35:00 GMT 2004

On Tue, 2 Mar 2004, Zack Weinberg wrote:

> > Why that form?  'foo' is more correct for plain ASCII, unless and until we
> > develop some system for proper quotes (and likewise proper copyright
> > symbols) to be used when LC_MESSAGES=C if LC_CTYPE permits. 
> A batch conversion to the preferred form would be a good idea, I
> think.  Now's a good time to do it, being stage 1...

After tree-ssa merges might be better, as there are probably various new
messages involving various styles of quoting on tree-ssa.  (As doc
changes, simple quoting style changes could reasonably be done at least up
to the end of stage 3.)

I wonder whether %D and similar should default to being quoted (with some 
flag for the few places they aren't), and whether in general any such 
global diagnostics change should use special formats

%` for a left quote (' in C locale)
%' for a right quote (' in C locale)
%qs for quoted string
%qD for unquoted decl
... (I'd rather distinguish the flags for quoting strings and unquoting 
decls, but %Q is already used in the C++ front end; it could be 

This would allow for future refinements to C locale quoting when the
character set permits.  It does however presume that each language has a
single left-quote string and a single right-quote string that are
appropriate in all cases of quoting.

Joseph S. Myers

More information about the Gcc-bugs mailing list