[Python-bugs-list] [ python-Bugs-666880 ] readonly is now a compiler keyword

SourceForge.net noreply@sourceforge.net
Sun, 12 Jan 2003 22:04:20 -0800


Bugs item #666880, was opened at 2003-01-12 18:52
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=666880&group_id=5470

Category: Build
Group: None
>Status: Closed
>Resolution: Invalid
Priority: 5
Submitted By: John Malmberg (wb8tyw)
Assigned to: Nobody/Anonymous (nobody)
Summary: readonly is now a compiler keyword

Initial Comment:
In module bufferobject.c, a variable is named readonly.

This conflicts with the new C keyword readonly.

Please change the name of this variable so that it does
not conflict.

Python: 2.3a1 pre-release
Operating System: OpenVMS Alpha 7.3-1


$ CC/PREFIX=ALL
/WARN=ENABLE=(LEVEL4,QUESTCODE)/include=(PRJ_SRC:,PRJ_INCLUDE:,P
RJ_PARSER:,PRJ_PYTHON:,PRJ_MODULES:,FRONTPORT__DIR:)/define=(MOD_'f$element(0,"-
",f$parse("LCL_OBJECTS:BUFFEROBJECT",,,"NAME"))',
HAVE_CONFIG_H)/NESTED_INCLUDE_DIR=NONE/-
object=LCL_OBJECTS:BUFFEROBJECT.OBJ
PRJ_OBJECTS:BUFFEROBJECT.C

_PyBuffer_FromMemory(PyObject *base, void *ptr, int
size, int readonly)
..............................................................^
%CC-I-READONLYEXT, readonly is a language extension.
at line number 18 in file
PROJECT_ROOT:[PYTHON.OBJECTS]BUFFEROBJECT.C;1

        b->b_readonly = readonly;
........................^
%CC-E-BADEXPR, Invalid expression.
at line number 36 in file
PROJECT_ROOT:[PYTHON.OBJECTS]BUFFEROBJECT.C;1

        return _PyBuffer_FromMemory(base, (char *)p +
offset, size, readonly);
....................................................................^
%CC-E-BADEXPR, Invalid expression.
at line number 79 in file
PROJECT_ROOT:[PYTHON.OBJECTS]BUFFEROBJECT.C;1

_PyBuffer_FromMemory(PyObject *base, void *ptr, int
size, int readonly)
..............................................................^
%CC-I-STORMODDCL, In this declaration, a storage class
modifier without a declarator is meaningless.
at line number 18 in file
PROJECT_ROOT:[PYTHON.OBJECTS]BUFFEROBJECT.C;1

_PyBuffer_FromMemory(PyObject *base, void *ptr, int
size, int readonly)
..............................................................^
%CC-E-PARMSTORMOD, In this declaration, a parameter
cannot have a storage class modifier.
at line number 18 in file
PROJECT_ROOT:[PYTHON.OBJECTS]BUFFEROBJECT.C;1

                     getreadbufferproc proc, int readonly)
.................................................^
%CC-I-STORMODDCL, In this declaration, a storage class
modifier without a declarator is meaningless.
at line number 44 in file
PROJECT_ROOT:[PYTHON.OBJECTS]BUFFEROBJECT.C;1

                     getreadbufferproc proc, int readonly)
.................................................^
%CC-E-PARMSTORMOD, In this declaration, a parameter
cannot have a storage class
modifier.


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

>Comment By: John Malmberg (wb8tyw)
Date: 2003-01-13 01:04

Message:
Logged In: YES 
user_id=686238

I should have researched this before submittiing.

"readonly" is an obsolete VAX C keyword that is an alias for
"const".

I though I had VAX C compatablilty mode disabled in the
compiler.

Compiler is COMPAQ C 6.5.

It appears that the only way to get the compiler to disable
that extension is to make it accept only strict ANSI89
compatability.

This has greatly increased the number of informational
diagnostics that I am getting.



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

Comment By: Tim Peters (tim_one)
Date: 2003-01-12 22:53

Message:
Logged In: YES 
user_id=31435

readonly isn't a keyword in the C89 or C99 ANSI/ISO C 
standards, so the source of the problem remains unclear.  
Is this a vendor extension specific to the C compiler you're 
using -- and which C compiler is that?  A better solution 
may be to disable a non-standard compiler extension.

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

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