www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/12/19/09:33:10

From: "A.Appleyard" <A DOT APPLEYARD AT fs2 DOT mt DOT umist DOT ac DOT uk>
To: DJGPP AT sun DOT soe DOT clarkson DOT edu
Date: Tue, 19 Dec 1995 13:23:12 GMT
Subject: An oddity re array args

  Re this short program with an error (name omitted after `double'):-
int zxcvbnm(int i, int j, double[i][j]){int k; k=2; return 42;}
  When I compiled it (with djgpp) as C++, the compiler swore at me thus:-

t$$.cc:1: `i' was not declared in this scope
t$$.cc:1: `j' was not declared in this scope
Segmentation violation in pointer 0x00000008 at d8:5cebc

EXCEPTION OCCURRED!  Information dumped to core file:
    "t$gccdbg"

  but compiled as C the compiler said nothing.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019