This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
const error
- To: egcs-bugs at egcs dot cygnus dot com
- Subject: const error
- From: Manuel Menezes de Sequeira <Manuel dot Sequeira at iscte dot pt>
- Date: Mon, 10 Jan 2000 17:11:33 +0000
- Organization: ISCTE
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