On Mon, 2025-02-03 at 11:49 +0100, Basile Starynkevitch wrote:
> > 
> > 
> > I'm in the process of writing my own C compiler for educational
> > purposes.
> 
> 
> Then look also into https://frama-c.com/ and
> https://github.com/bstarynk/bismon
> and https://nwcc.sourceforge.net/ and https://bellard.org/tcc/
> 
> > To this end, I have decided to integrate into my compiler my own
> > C++ port (
> > https://github.com/johnythecarrot/mjolnir ) of the Rust crate
> > Ariadne (
> > https://github.com/zesterer/ariadne ) which provides nice, fancy
> > and readable
> > diagnostics for use in compilers and the like. See the first link
> > for an idea
> > of how my library outputs diagnostics.
> > 
> > I had the idea of perhaps contributing this diagnostics system to
> > GCC in one
> > way or another, under a flag perhaps, but considered it might be an
> > unwelcome
> > addition. I was told that there's no harm in raising it with the
> > GCC
> > developers.
> > 
> > This message serves as a gauge of interest from the GCC developers
> > for
> > something of this kind. I am aware the current format of my
> > diagnostics do not
> > comply with the GNU Standards, and I'd therefore also like to
> > politely ask for
> > input on your suggestions on making it comply while retaining its
> > cleanliness.
> > 
> > I am the sole developer of Mjolnir and can therefore relicense it
> > as
> > necessary. Mjolnir still has a couple of issues to iron out and
> > features to
> > implement, such as multi-line span displaying.
> 
> As far as I understand, GCC code needs to be GPL licensed with a
> copyright
> assignment contract to the FSF. (See
> https://gcc.gnu.org/legacy-ml/gcc/2006-12/msg00008.html
> and https://arxiv.org/abs/1109.0779 ....)
> 
> regarding your fancy diagnostic system, consider working at the
> GIMPLE level and
> implementing it (at first) as an open source GCC plugin.
> https://gcc.gnu.org/onlinedocs/gccint/GIMPLE.html
> https://gcc.gnu.org/onlinedocs/gccint/Plugins.html

Basile, I don't think that's a good idea.

What Tuur seems to be advocating for is:
(a) improvements to GCC's diagnostics subsystem (in terms of internal
API and presentation), which is part of GCC's core functionality,
and/or
(b) a new approach to parsing C++, which sounds like essentially a
replacement of the existing C++ frontend (and thus very ambitious)

Neither of these would be appropriate as a plugin.

Hope this is constructive
Dave

Reply via email to