public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* re: subscripted value is neither array nor pointer
@ 2000-03-13  0:47 Peter Jordan
  2000-03-13  1:04 ` Alexandre Oliva
  0 siblings, 1 reply; 5+ messages in thread
From: Peter Jordan @ 2000-03-13  0:47 UTC (permalink / raw)
  To: gcc; +Cc: gcc-bugs

[-- Attachment #1: Type: text/plain, Size: 2195 bytes --]

>> t-> osd2.linux2.l_i_reserved2[0] =

>Take a look at the preprocessed code first, it may turn out to be some
>preprocessing issue, such as the wrong header file getting included or
>something.

Urk. I thought it might have been a known "change" and not a bug.
Here goes ...


Reading specs from /usr/lib/gcc-lib/i686-pc-linux-gnu/2.96/specs
gcc version 2.96 20000306 (experimental)
 /usr/lib/gcc-lib/i686-pc-linux-gnu/2.96/cpp -lang-c -v -I../../lib -I../../lib -D__GNUC__=2 -D__GNUC_MINOR__=96 -D__GNUC_PATCHLEVEL__=0 -D__ELF__ -Dunix -Dlinux -D__ELF__ -D__unix__ -D__linux__ -D__unix -D__linux -Asystem(posix) -D__OPTIMIZE__ -g -Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i386__ -D__tune_pentiumpro__ -DHAVE_LINUX_FS_H=1 -DHAVE_STDLIB_H=1 -DHAVE_UNISTD_H=1 -DHAVE_STDARG_H=1 -DHAVE_ERRNO_H=1 -DHAVE_MALLOC_H=1 -DHAVE_MNTENT_H=1 -DHAVE_PATHS_H=1 -DHAVE_DIRENT_H=1 -DHAVE_GETOPT_H=1 -DHAVE_SETJMP_H=1 -DHAVE_SIGNAL_H=1 -DHAVE_TERMIOS_H=1 -DHAVE_LINUX_FD_H=1 -DHAVE_LINUX_MAJOR_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_NET_IF_H=1 -DHAVE_NETINET_IN_H=1 -DHAVE_VPRINTF=1 -DSIZEOF_SHORT=2 -DSIZEOF_INT=4 -DSIZEOF_LONG=4 -DSIZEOF_LONG_LONG=8 -DHAVE_GETRUSAGE=1 -DHAVE_LLSEEK=1 -DHAVE_STRDUP=1 -DHAVE_STRCASECMP=1 -DHAVE_SRANDOM=1 -DHAVE_FCHOWN=1 -DHAVE_MALLINFO=1 -DHAVE_INO_T=1 -DHAVE_EXT2_IOCTLS=1 swapfs.c swapfs.i
GNU CPP version 2.96 20000306 (experimental) (cpplib)
 (i386 Linux/ELF)
ignoring duplicate directory `../../lib'
#include "..." search starts here:
#include <...> search starts here:
 ../../lib
 /usr/local/include
 /usr/i686-pc-linux-gnu/include
 /usr/lib/gcc-lib/i686-pc-linux-gnu/2.96/include
 /usr/include
End of search list.
 /usr/lib/gcc-lib/i686-pc-linux-gnu/2.96/cc1 swapfs.i -quiet -dumpbase swapfs.c -g -O2 -version -o swapfs.s
GNU C version 2.96 20000306 (experimental) (i686-pc-linux-gnu) compiled by GNU C version 2.96 20000306 (experimental).
swapfs.c: In function `ext2fs_swap_inode':
swapfs.c:119: subscripted value is neither array nor pointer
swapfs.c:120: subscripted value is neither array nor pointer
swapfs.c:121: subscripted value is neither array nor pointer
swapfs.c:122: subscripted value is neither array nor pointer



[-- Attachment #2: swapfs.i.gz --]
[-- Type: application/x-gzip, Size: 15466 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: subscripted value is neither array nor pointer
  2000-03-13  0:47 subscripted value is neither array nor pointer Peter Jordan
@ 2000-03-13  1:04 ` Alexandre Oliva
  2000-03-13  2:28   ` subscripted value is neither array nor pointer(close?) PJ
  2000-03-13  2:50   ` subscripted value (../../lib vs. ../../../lib explained) PJ
  0 siblings, 2 replies; 5+ messages in thread
From: Alexandre Oliva @ 2000-03-13  1:04 UTC (permalink / raw)
  To: Peter Jordan; +Cc: Zack Weinberg

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1349 bytes --]

On Mar 13, 2000, Peter Jordan <pjordan@noname.blackwire.com> wrote:

t-> osd2.linux2.l_i_reserved2[0] =

>> Take a look at the preprocessed code first, it may turn out to be some
>> preprocessing issue, such as the wrong header file getting included or
>> something.

> Urk. I thought it might have been a known "change" and not a bug.

May be, we never know.  That's why it always helps to have as much
information as possible.

In the preprocessed code you posted, you'll find:

# 19 "/usr/include/linux/ext2_fs.h" 2 3
[snip]
struct ext2_inode {
[snip]
                        __u32   l_i_reserved2;
                } linux2;

Note, it is not an array, because it comes from
/usr/include/linux/ext2_fs.h, not from .../lib/ext2_fs.h.  And there's
something else intriguing me:

>  /usr/lib/gcc-lib/i686-pc-linux-gnu/2.96/cpp -lang-c -v -I../../lib -I../../lib [...]
> ignoring duplicate directory `../../lib'

However, the original command line said: -I../../lib -I../../../lib
Can you confirm that the GCC snapshot is indeed modifying the second
-I flag?

-- 
Alexandre Oliva     http://www.ic.unicamp.br/~oliva/     Enjoy Guaraná
Cygnus Solutions, a Red Hat company        aoliva@{redhat, cygnus}.com
Free Software Developer and Evangelist    CS PhD student at IC-Unicamp
oliva@{lsd.ic.unicamp.br, gnu.org}   Write to mailing lists, not to me

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: subscripted value is neither array nor pointer(close?)
  2000-03-13  1:04 ` Alexandre Oliva
@ 2000-03-13  2:28   ` PJ
  2000-03-13  4:21     ` tytso
  2000-03-13  2:50   ` subscripted value (../../lib vs. ../../../lib explained) PJ
  1 sibling, 1 reply; 5+ messages in thread
From: PJ @ 2000-03-13  2:28 UTC (permalink / raw)
  To: gcc, gcc-bugs; +Cc: tytso

> # 19 "/usr/include/linux/ext2_fs.h" 2 3
> [snip]
> struct ext2_inode {
> [snip]
>                         __u32   l_i_reserved2;
>                 } linux2;

Thanks.  I am learning.

> Note, it is not an array, because it comes from
> /usr/include/linux/ext2_fs.h, not from .../lib/ext2_fs.h.  And there's
> something else intriguing me:

There is no ../../lib/ext2_fs.h !  There is a
../../include/linux/ext2_fs.h though, but that is not in the search
path.  THe latter also defines:

                        __u32   l_i_reserved2[2];

Furthermore the linux kernel source for 2.2.14 has
in include/linux/ext2_fs.h

                        __u32   l_i_reserved2[2];

BUT

the source tree for 2.3.49 has
                        __u16   l_i_uid_high;   /* these 2 fields    */
                        __u16   l_i_gid_high;   /* were reserved2[0] */
                        __u32   l_i_reserved2;


So. I guess I should either get rid of that 2.3.49 source tree,
(haven't booted it yet) or fix the search path.


> > ignoring duplicate directory `../../lib'

> However, the original command line said: -I../../lib -I../../../lib
> Can you confirm that the GCC snapshot is indeed modifying the second
> -I flag?

Nope.  I looked again at my post and it shows both as -I../../lib,
with no -I../../../lib

Thanks very much for your help.

Peter (who once upon a time lived in Campina Grande long ago)
-- 
pjordan at blackwire.com	323-665-0893         Black Wire Media
"The meaning of a value is determined by how it is used" : Ousterhout 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: subscripted value (../../lib vs. ../../../lib explained)
  2000-03-13  1:04 ` Alexandre Oliva
  2000-03-13  2:28   ` subscripted value is neither array nor pointer(close?) PJ
@ 2000-03-13  2:50   ` PJ
  1 sibling, 0 replies; 5+ messages in thread
From: PJ @ 2000-03-13  2:50 UTC (permalink / raw)
  To: gcc

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 600 bytes --]

> However, the original command line said: -I../../lib -I../../../lib
> Can you confirm that the GCC snapshot is indeed modifying the second
> -I flag?
> -- 
> Alexandre Oliva     http://www.ic.unicamp.br/~oliva/     Enjoy Guaraná

Oops.
I've been jumping around directories too much.  The -I../../../lib
came from when I did it the right way in a build subdir.
They are both ../../lib when I failed to do it(./configure, make) that way.

Thanks again.
Peter
-- 
pjordan at blackwire.com	323-665-0893         Black Wire Media
"The meaning of a value is determined by how it is used" : Ousterhout 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: subscripted value is neither array nor pointer(close?)
  2000-03-13  2:28   ` subscripted value is neither array nor pointer(close?) PJ
@ 2000-03-13  4:21     ` tytso
  0 siblings, 0 replies; 5+ messages in thread
From: tytso @ 2000-03-13  4:21 UTC (permalink / raw)
  To: pjordan; +Cc: gcc, gcc-bugs

This is fixed in e2fsprogs 1.19-WIP.  You can get it from 

	http://e2fsprogs.sourceforge.net

						- Ted

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2000-03-13  4:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-03-13  0:47 subscripted value is neither array nor pointer Peter Jordan
2000-03-13  1:04 ` Alexandre Oliva
2000-03-13  2:28   ` subscripted value is neither array nor pointer(close?) PJ
2000-03-13  4:21     ` tytso
2000-03-13  2:50   ` subscripted value (../../lib vs. ../../../lib explained) PJ

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).