Article View: gnu.g++.bug
Article #101Re: [rosalia@tdo-serv.lanl.gov: interesting gcc confustion]
From: Mike Stump
Date: Mon, 20 Jul 1992 18:34
Date: Mon, 20 Jul 1992 18:34
40 lines
1582 bytes
1582 bytes
This problem should not exist in the next release of gcc.
It now reads:
t6.cc: In function `void zero_double_matrix (double **, int, int)':
t6.cc:2: conflicting types for `m'
t6.cc:2: previous declaration of `m'
t6.cc:6: warning: comparison between pointer and integer
> Date: Wed, 15 Jul 92 12:33:24 MDT
> From: rosalia@tdo-serv.lanl.gov (Mark Galassi)
> To: rms@prep.ai.mit.edu
> Cc: msw@p.lanl.gov, greendog@max.physics.sunysb.edu, nerd@percival.rain.com,
> batie@agora.rain.com
> I was compiling a C routine with g++ and got an amusing error message:
> void zero_double_matrix(double **m, int n, int m)
> {
> int i, j;
> for (i = 0; i < n; ++i) {
> for (j = 0; j < m; ++j) {
> m[i][j] = 0;
> }
> }
> }
> and I got
> >misc.cc: In function `void zero_double_matrix (double **, int, int)':
> >misc.cc:661: parse errors have confused me too much
> >Make: *** [misc.o] Error 1
> >Make: *** Waiting for unfinished jobs....
> It took me a while to realise that the 'm' was both the matrix and the
> size of the matrix.
> I thought I would report it because it might be an error that could be
> handled better.
Technical Details
Message-ID:
<9207201834.AA18144@cygnus.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!cygnus.com!mrsShow Full Headers
Complete Article Headers
Newsgroups: gnu.g++.bug Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!cygnus.com!mrs From: mrs@cygnus.com (Mike Stump) Subject: Re: [rosalia@tdo-serv.lanl.gov: interesting gcc confustion] Message-ID: <9207201834.AA18144@cygnus.com> Sender: gnulists@ai.mit.edu Organization: GNUs Not Usenet Distribution: gnu Date: Mon, 20 Jul 1992 18:34:15 GMT Approved: bug-g++@prep.ai.mit.edu Lines: 44