This is the mail archive of the gcc@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: [RFC] Adding Python as a possible language and it's usage


On Wed, Jul 18, 2018 at 06:56:31AM -0400, David Malcolm wrote:
> > alternatively we could handle the generated files like those we still
> > need flex for:

We can't, because unlike the flex output, the option handling is heavily
target specific and storing in the tarball a collection of per-target
specially generated results would be a nightmare.

> Rationale:
> 
> Python 2.6 onwards is broadly compatible with Python 3.*. and is about
> to be 10 years old.  (IIRC it was the system python implementation in
> RHEL 6).  I'm guessing that many older systems have Python 2 installed,
> but not Python 3, and anything we write is likely to be compatible with
> even older Python 2.* implementations.
> 
> Python 3.3 reintroduced the 'u' prefix for unicode string literals (PEP
> 414), which makes it much easier to write scripts that work with both
> 2.* and 3.*.  Python 3.3 is almost 6 years old.
> 
> (this is just a suggestion)

Then the question is also whether to use python2, python3 or python
binaries.  E.g. on some distros python without suffix generates ugly
warnings and that already affects dg-extract-results.sh which just runs
python -c ... rather than first looking for python2 or python3 and only
falling back to python if those don't exist.  Some other contrib/ scripts
look only for python3.

	Jakub


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