This is the mail archive of the gcc-bugs@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]
Other format: [Raw text]

Re: code that could be improved


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 
reassigned.)

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
jsm@polyomino.org.uk


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