Re: [PATCH] Multibyte awareness for diagnostics (PR 49973)

2019-12-09 Thread Lewis Hyatt
On Mon, Dec 09, 2019 at 03:12:31PM -0500, David Malcolm wrote: > On Fri, 2019-12-06 at 15:31 -0500, Lewis Hyatt wrote: > > On Fri, Dec 06, 2019 at 10:54:30AM -0500, David Malcolm wrote: > > [...] > > > > The patch is OK for trunk with the nits above fixed. Do you have > > > commit access? (I've

Re: [PATCH] Multibyte awareness for diagnostics (PR 49973)

2019-12-09 Thread David Malcolm
On Fri, 2019-12-06 at 15:31 -0500, Lewis Hyatt wrote: > On Fri, Dec 06, 2019 at 10:54:30AM -0500, David Malcolm wrote: [...] > > The patch is OK for trunk with the nits above fixed. Do you have > > commit access? (I've got my own patch [1] that touches diagnostic- > > show-locus.c which I'll ne

Re: [PATCH] Multibyte awareness for diagnostics (PR 49973)

2019-12-06 Thread David Malcolm
On Tue, 2019-11-26 at 11:28 -0500, Lewis Hyatt wrote: > New version 4 patch attached, and responses below too. > Thanks for the various updates; sorry about the delay in responding. [...] > > As noted above, m_x_offset should be renamed to clarify its units > > ("m_x_offset_display"?) > > > >

Re: [PATCH] Multibyte awareness for diagnostics (PR 49973)

2019-11-22 Thread David Malcolm
On Thu, 2019-11-21 at 21:43 -0500, David Malcolm wrote: > This is the column number as reported in the diagnostic i.e the > COL_NUM > when printing e.g. > warning: FILENAME:LINE_NUM:COL_NUM: some message > > It seems to me that PR 49973 and this patch cover two separate > things: On re-reading,

Re: [PATCH] Multibyte awareness for diagnostics (PR 49973)

2019-11-21 Thread David Malcolm
On Wed, 2019-11-20 at 11:35 -0500, Lewis Hyatt wrote: > My apologies, that patch had whitespace issues. Corrected version > attached. > > On Wed, Nov 20, 2019 at 11:27:08AM -0500, Lewis Hyatt wrote: > > On Tue, Nov 19, 2019 at 12:30:39PM -0500, David Malcolm wrote: > > > Thanks for posting this pa

Re: [PATCH] Multibyte awareness for diagnostics (PR 49973)

2019-11-19 Thread Joseph Myers
On Tue, 19 Nov 2019, David Malcolm wrote: > If we're going with this approach (which I'll leave to Joseph), perhaps I think reusing the glibc generator is appropriate. -- Joseph S. Myers jos...@codesourcery.com

Re: [PATCH] Multibyte awareness for diagnostics (PR 49973)

2019-11-19 Thread Joseph Myers
On Tue, 19 Nov 2019, David Malcolm wrote: > If we're going with this approach, and redistributing those unicode data > files as part of our repo and tarballs, do we need some kind of > copyright/license statement that spells out the situation? What does > glibc do for this? glibc includes the fi

Re: [PATCH] Multibyte awareness for diagnostics (PR 49973)

2019-11-19 Thread David Malcolm
On Fri, 2019-09-27 at 16:41 -0400, Lewis Hyatt wrote: > On Thu, Sep 26, 2019 at 08:46:56PM +, Joseph Myers wrote: > > On Thu, 26 Sep 2019, Lewis Hyatt wrote: > > > > > A couple notes: > > > - In order to avoid any portability problems with wchar_t, > > > the > > > equivalent of wcwidth()

Re: [PATCH] Multibyte awareness for diagnostics (PR 49973)

2019-10-18 Thread Lewis Hyatt
On Fri, Sep 27, 2019 at 4:41 PM Lewis Hyatt wrote: > > On Thu, Sep 26, 2019 at 08:46:56PM +, Joseph Myers wrote: > > On Thu, 26 Sep 2019, Lewis Hyatt wrote: > > > > > A couple notes: > > > - In order to avoid any portability problems with wchar_t, the > > > equivalent of wcwidth() from lib

Re: [PATCH] Multibyte awareness for diagnostics (PR 49973)

2019-09-27 Thread Lewis Hyatt
On Thu, Sep 26, 2019 at 08:46:56PM +, Joseph Myers wrote: > On Thu, 26 Sep 2019, Lewis Hyatt wrote: > > > A couple notes: > > - In order to avoid any portability problems with wchar_t, the > > equivalent of wcwidth() from libc is implemented in-house. > > I'm uneasy about contrib/gen_wcw

Re: [PATCH] Multibyte awareness for diagnostics (PR 49973)

2019-09-26 Thread Lewis Hyatt
On Thu, Sep 26, 2019 at 4:47 PM Joseph Myers wrote: > > On Thu, 26 Sep 2019, Lewis Hyatt wrote: > > > A couple notes: > > - In order to avoid any portability problems with wchar_t, the > > equivalent of wcwidth() from libc is implemented in-house. > > I'm uneasy about contrib/gen_wcwidth.cpp d

Re: [PATCH] Multibyte awareness for diagnostics (PR 49973)

2019-09-26 Thread Joseph Myers
On Thu, 26 Sep 2019, Lewis Hyatt wrote: > A couple notes: > - In order to avoid any portability problems with wchar_t, the > equivalent of wcwidth() from libc is implemented in-house. I'm uneasy about contrib/gen_wcwidth.cpp doing the generation using host libc's wcwidth. The effect is tha

[PATCH] Multibyte awareness for diagnostics (PR 49973)

2019-09-26 Thread Lewis Hyatt
Hello- PR preprocessor/49973 addresses the fact that the column number in diagnostics is not correct if the source lines contain multibyte characters. The attached patch corrects this. The outlines of it were discussed starting here: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49973#c13. If it lo