This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

const error


I think I found a problem with egcs:

Code:

    void f(const int (&m)[2]) {
        m[0] = 0;
    }

Compiler version (installed via RPM):
    reported by rpm: egcs-1.1.2-12
    reported by 'g++ --version': egcs-2.91.66

OS: 
    RedHat linux 6.0 (kernel-2.2.5-15)

Compile command: 
    g++ -c whatever.C

Result of compilation:
    No output.

I think the compiler should issue an error, since the elements of m are
const.

--
Manuel Menezes de Sequeira              Manuel.Sequeira@iscte.pt
Tel: +351.1.7903909                     Mobile: +351.936.2337428
Fax: +351.1.7903099             URL: http://torga.iscte.pt/~mms/
Gab. 9, DCTI, ISCTE,  Av. Forças Armadas,  1600 LISBOA, Portugal

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]