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


"Joseph S. Myers" <jsm@polyomino.org.uk> writes:

[...]

| Proposed specification:
| 
| %`      Opening quote
| %'      Closing quote
| (where strings output from the compiler will consist of whatever-language
| text, an opening quote, decl name etc. from the source file, then a
| closing quote and maybe more text - the decl name or whatever will be a
| left-to-right oriented string even if the language is right-to-left, so
| the clear specification of quotes as opening or closing rather than left
| or right is relevant for RTL languages to set them so that the Unicode
| bidirectional algorithm, applied to the compiler output (which is always
| in logical rather than display ordering), yields proper results)

Absolutely.

| q       Flag in all formats other than %%, %`, %' to indicate that the 
| format output is surrounded by quotes; thus, %qs, %qD, %#qD or %q#D 
| (equivalent), %qd, ....

Hmm, I rather mandate thr flag q commint first, e.g. I would not like
the the funny %#qD.  It shoud be %q#D -- and when the C front-end
support the + location, it could be %q+D ( and %q+#D, ahem).

| Implementing these formats doesn't require anything special to be done
| about better quoting in C locale with UTF-8; that's separate (though while
| the strings may be translated as _("`") and _("'") we do probably want to
| arrange the default left quote, for C locale or no translation available,
| to be "'" rather than "`"). 

I agree.

| If however formats in the compiler are
| globally changed to this style before tree-ssa is merged, some track needs
| to be kept of the various global changes and they need either applying to
| tree-ssa as well or applying after the merge to new strings brought in
| from tree-ssa.

I think, we can implement the scheme and wait for the tree-ssa merge
before changing the quoting in the diagnostics.


Thanks!

-- Gaby


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