[Bug translation/79618] prevent missing space in multiline string literals

egallager at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Mar 13 05:36:00 GMT 2019


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79618

--- Comment #4 from Eric Gallager <egallager at gcc dot gnu.org> ---
(In reply to David Malcolm from comment #2)
> Good idea.
> 
> We can't do it at run-time from inside the diagnostics subsystem, as the
> line-breaking information is lost when the literal is compiled.
> 
> So from an implementation POV, I believe this would have to happen inside
> xgettext when it scans the sources to create .pot files, so that it can
> enforce one of the variants described in comment #1 (presumably as a new
> --check option to xgettext).
> 
> In theory, we could do it with a compiler plugin that detects such strings,
> but given that xgettext is scanning the strings already, presumably this
> would be better implemented as an xgettext test.
> 
> Alternatively, I guess we could implement some kind of preprocessing hack to
> run when generating the .pot files, but presumably other projects would find
> this useful, so it seems to make more sense as an xgettext feature.

none of these solutions sound very trivial; I don't think this bug meets the
"with trivial fixes" criterion for the meta-bug it's now blocking.


More information about the Gcc-bugs mailing list