PR# 15235 C code for expanded local generates warnings

Problem Report Summary
Submitter: prestoat2000
Category: Compiler
Priority: Medium
Date: 2009/01/05
Class: Bug
Severity: Serious
Number: 15235
Release: 6.4.76402
Confidential: No
Status: Closed
Responsible:
Environment: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.8.1.13) Gecko/20080328 Firefox/2.0.0.13 Solaris 10 on SPARC
Synopsis: C code for expanded local generates warnings

Description
The C code for a routine that references a constant STRING attribute
of a local that is of an expanded type generates warnings:

"../E1/estructure.h", line 39: warning: zero or negative subscript

Note that the generated C code is not ISO C according to Sun Studio 12
(won't compile with -Xc flag to C compiler).



To Reproduce
Freeze with attached classes and config file.
Compile C code, using Sun Studio 12 as the C compiler.
Generates "zero or negative subscript" warning.
Problem Report Interactions
From:manus_eiffel    Date:2009/01/05    Status: Closed    Download   
It should be fixed in rev#76592.

From:manus_eiffel    Date:2009/01/05    Status: Analyzed    Download   
I've added test#ccomp081 to show the problem which will only fail on platforms where the C compiler refuses our generated C code.

From:prestoat2000    Date:2009/01/05    Download   
Attachments for problem report #15235

Attachment: test.e     Size:212
Attachment: values.e     Size:63
Attachment: test.ecf     Size:937