[PATCH] [2/6] Convert non-printing characters to their octal sequence before emitting #line directive or __FILE__ macro
Joerg Sonnenberger
joerg at britannica.bec.de
Wed Sep 11 16:07:26 PDT 2013
On Wed, Sep 11, 2013 at 03:21:31PM -0700, Arthur O'Dwyer wrote:
> On Wed, Sep 11, 2013 at 2:22 PM, Yunzhong Gao
> <Yunzhong_Gao at playstation.sony.com> wrote:
> > Arthur wrote:
> > > If #include directives will use UTF-8, then __FILE__ must also use UTF-8, so
> > > that this will work:
> > >
> > > #include __FILE__
> > >
> > > And I would expect #line directives also to use UTF-8. The only good rationale
> > > I can imagine is that you're dealing with badly behaved third-party generators
> > > such as lex/yacc which dump malformed #line directives into the source file.
> > >
> > > The patch looks good to me, but the stated rationale is misleading; I don't
> > > think this patch helps with anything on a well-behaved system (even one
> > > where the filesystem charset is Shift-JIS). It merely helps Clang not-barf on
> > > malformed input (such as that produced by a badly behaved lex/yacc).
> >
> > For some reason, your replies just won't appear in Phabricator while Eli's went
> > in just fine. Weird.
>
> Phabricator requires you to sign in with your Facebook account, which
> I don't particularly want to do, so all my replies are sent as email
> messages instead of Phabricator comments.
You can also use a github account or a number of other mechanisms.
Joerg
More information about the cfe-commits
mailing list