[Python-bugs-list] [ python-Bugs-442998 ] 2.2a1: compiler warnings

noreply@sourceforge.net noreply@sourceforge.net
Tue, 07 Aug 2001 12:23:29 -0700


Bugs item #442998, was opened at 2001-07-20 01:09
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=442998&group_id=5470

Category: Python Interpreter Core
Group: Platform-specific
>Status: Closed
>Resolution: Fixed
Priority: 3
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Guido van Rossum (gvanrossum)
Summary: 2.2a1: compiler warnings

Initial Comment:
I've done a port to OpenVMS. Here are some compiler
warnings:

-----
};
^
%CC-I-TRAILCOMMA, Trailing comma found in enumerator
list. at line number 482 in file CEVAL.C

-----
There are lots of warnings in TYPEOBJECT.C like:

RICHCMP_WRAPPER(lt, Py_LT);
..........................^
%CC-I-EXTRASEMI, Extraneous semicolon.
at line number 1707 in file TYPEOBJECT.C

RICHCMP_WRAPPER(le, Py_LE);
..........................^
%CC-I-EXTRASEMI, Extraneous semicolon.
at line number 1708 in file TYPEOBJECT.C

and:

SLOT1(sq_concat, add, PyObject *, O);
....................................^
%CC-I-EXTRASEMI, Extraneous semicolon.
at line number 1956 in file TYPEOBJECT.C

SLOT1(sq_repeat, mul, int, i);
.............................^
%CC-I-EXTRASEMI, Extraneous semicolon.
at line number 1957 in file TYPEOBJECT.C

and:
		ADD(sq->sq_length, tab_len);
................^
%CC-W-PTRMISMATCH, In this statement, the referenced
type of the pointer value "sq->sq_length" is "function
(pointer to struct _object) returning int", which is
not compatible with "void".
at line number 1842 in file TYPEOBJECT.C

		ADD(sq->sq_concat, tab_add);
................^
%CC-W-PTRMISMATCH, In this statement, the referenced
type of the pointer value "sq->sq_concat" is "function
(pointer to struct _object, pointer to struct _object)
returning pointer to struct _object", which is not
compatible with "void".
at line number 1843 in file TYPEOBJECT.C

		add_staticmethodwrappers(type, tab_new, 
type->tp_new);
.......................................................
.^
%CC-W-PTRMISMATCH, In this statement, the referenced
type of the pointer value "type->tp_new" is "function
(pointer to struct _typeobject, pointer to struct
_object, pointer to struct _object) returning pointer
to struct _object",which is not compatible with "void".
at line number 1917 in file TYPEOBJECT.C

There are 100+ warnings which I don't include all, OK?

-----
4 times messages like this in UNICODEOBJECT.C:

            *p++ = hexdigit[(ch >> 28) & 0xf];
.............................^
%CC-I-RIGHTSHIFTOVR, In this statement, the right shift
count "28" is greater than or equal to the size of the
unpromoted operand "ch".
at line number 1448 in file UNICODEOBJECT.C

-----
If you need specific values from my CONFIG.H, please
let me know.

----------------------------------------------------------------------

>Comment By: Guido van Rossum (gvanrossum)
Date: 2001-08-07 12:23

Message:
Logged In: YES 
user_id=6380

The ones I promised to fix have all been addressed.
Closing this report to make room for new ones.

----------------------------------------------------------------------

Comment By: Guido van Rossum (gvanrossum)
Date: 2001-07-20 09:32

Message:
Logged In: YES 
user_id=6380

I'm sorry, but I don't want to fix most of these.

Trailing commas in lists are legal C, and esthetics and easy
extensibility tell me that it's better to keep them.

The extraneous semicolons after RICHCMP_WRAPPER() are also
legal in C, and I need them so the Emacs auto-indent mode
doesn't screw up.

I will add (void *) casts to the function arguments in the
ADD() macro and the add_staticmethodwrappers() call.

I think I can add an #ifdef to the Unicode fragment.


----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=442998&group_id=5470