Python and bragging about C89


People who brag about how cool and modern they are to require a C89 compiler (that’s you Python 2.6) should not be using // for comments. Maybe they meant they require a C99 compiler.

And yes, this really matters. On AIX 6.1 the Python 2.6 configure script selects a C89 compiler («cc_r -qlanglvl=extc89» if you must know). Which barfs on their warthog creating code.

Meh. Maybe I’ll even file a bug report.

4 Responses to “Python and bragging about C89”

  1. Sorry about that. We really do strive to avoid // comments. But could the configure script be changed to select a C99 compiler?

  2. jnoller Says:

    Yes, it’s a bug (and yes, you should file it)

  3. Christian Heimes Says:

    Indeed, it’s a bug. I found many more occurrences of // comments and one usage of “inline” which isn’t C89 compatible, too. All C89 incompatibilities are fixed in the trunk, release 26 maintenance branch and py3k branch. All three branches are compiling with -std=c89 -Werror again.

  4. drj11 Says:

    Okay. I’m glad you really do want to make it C89 compatible. I couldn’t find a statement to that effect. Something like «to build python you will need a good C89 conforming compiler».

    I was in fact in the middle of reporting a bug, and getting my bug tracker thingy password reset, and collecting transcripts, and… well, you know.

    Anyway, I did hack the configure script to select a more permissive compiler; then the build broke later on. Bug report on Monday. It’s a bit of dangerous situation when it’s easier to report a bug on my blog than in the tracker.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: