code should not use c99 features

Bug #587158 reported by Amaury Forgeot d'Arc
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
PylibLZMA
Fix Committed
Low
Per Øyvind Karlsen

Bug Description

msvc compilers don't implement c99 features:
- local variables must appear at the start of a block
- expressions with { } are forbidden
- array initialization with { } is only accepted at the declaration point.

Revision history for this message
Per Øyvind Karlsen (proyvind) wrote :

Well, I think the subject for this bug is a bit off, using c99 features isn't really something to be considered a bug.. ;p
I don't plan on "fixing" this for the python 2.X version (hey, it explicitly compiles with gnu99 or a reason;),
but I'm already planning on dealing with this in the py3k branch to prepare it for inclusion with python.

If you really want this for the python 2.x version, I'd be happy to accept patches though, I'm planning on doing a
0.6.0 release with the same features I'm currently working on in the py3k branch sometime soon anwyays.. :)

Revision history for this message
Anders F Björklund (afb) wrote :

liblzma is also written in C99, so you need to backport that too.

Revision history for this message
Per Øyvind Karlsen (proyvind) wrote : Re: [Bug 587158] Re: code should not use c99 features

2010/8/4 Anders F Björklund <email address hidden>:
> liblzma is also written in C99, so you need to backport that too.
liblzma is written in a bit of both gnu89 & gnu99, so this might be
needed (ie it doesn't use bo
>
> --
> code should not use c99 features
> https://bugs.launchpad.net/bugs/587158
> You received this bug notification because you are the registrant for
> PylibLZMA.
>
> Status in PylibLZMA: New
>
> Bug description:
> msvc compilers don't implement c99 features:
> - local variables must appear at the start of a block
> - expressions with { } are forbidden
> - array initialization with { } is only accepted at the declaration point.
>
>
>

Revision history for this message
Per Øyvind Karlsen (proyvind) wrote :

2010/8/4 Per Øyvind Karlsen <email address hidden>:
> 2010/8/4 Anders F Björklund <email address hidden>:
>> liblzma is also written in C99, so you need to backport that too.
liblzma is written in a bit of both gnu89 & gnu99, so this might be
needed (ie it doesn't use stdbool.h, declaration within looops (ie.
'(int i =0; i++; i <10), etc. for being able to built without c99.

It does at least build fine using gnu89 with gcc, and I think it would
be pretty similar situation for msvc. Also if you look at the headers,
there's various gcc macros and defines to determine c standard version
used, and for non-c99, various variables, macros etc. are declared for
achieving compatibility..
>>
>> --
>> code should not use c99 features
>> https://bugs.launchpad.net/bugs/587158
>> You received this bug notification because you are the registrant for
>> PylibLZMA.
>>
>> Status in PylibLZMA: New
>>
>> Bug description:
>> msvc compilers don't implement c99 features:
>> - local variables must appear at the start of a block
>> - expressions with { } are forbidden
>> - array initialization with { } is only accepted at the declaration point.
>>
>>
>>
>

Revision history for this message
Per Øyvind Karlsen (proyvind) wrote :

As I made py3k version c89 compatible, I've just as well backported it to trunk branch as well. :)

Changed in pyliblzma:
status: New → Fix Committed
assignee: nobody → Per Øyvind Karlsen (proyvind)
importance: Undecided → Low
Revision history for this message
Per Øyvind Karlsen (proyvind) wrote : Invitation to connect on LinkedIn

LinkedIn
------------

Bug,

I'd like to add you to my professional network on LinkedIn.

- Per Øyvind

Per Øyvind Karlsen
lead rpm developer @ Mandriva at FreeCode
Oslo Area, Norway

Confirm that you know Per Øyvind Karlsen
https://www.linkedin.com/e/-s7w09s-grhg724i-6c/isd/3899407574/wmemweN2/

--
(c) 2011, LinkedIn Corporation

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.