public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Compiler error indication - Continue..
@ 2002-10-03  2:50 George Thanos
  0 siblings, 0 replies; only message in thread
From: George Thanos @ 2002-10-03  2:50 UTC (permalink / raw)
  To: gcc-help; +Cc: Yannis at Telecom

Continuing my previous email I have to add the following.. (I apologise 
for the long listing )

Changing some attributes in the bash-script provided by John Love-Jensen 
(thanks!), I receive
bash-2.05a$  grep -n -w __kernel_fd_set $(echo $(e1-coff-gcc -I 
include/  -M init/main.c)| sed -e 's@ \\ @ @g'| cut -d ' ' -f3-)
include/linux/types.h:13:typedef __kernel_fd_set                fd_set;
include/linux/posix_types.h:38:} __kernel_fd_set; */

e1-coff-gcc is the compiler I use..

I also have to state the following. Trying to transform the original 
typedefinition to something simpler
**...from**
typedef struct {
        unsigned long fds_bits [__FDSET_LONGS];
} __kernel_fd_set;

that I receive the compiler error...
/mnt/disk2/home/gthanos/HyLinux/src/uClinux-2.4.x/include/linux/posix_types.h:38: 
two or more data types in declaration of `__kernel_fd_set'

**...to**
typedef unsigned long __kernel_fd_set;

The new compiler error I receive is..
/mnt/disk2/home/gthanos/HyLinux/src/uClinux-2.4.x/include/linux/posix_types.h:40: 
long, short, signed or unsigned invalid for `__kernel_fd_set

**QUETION: What are multiple data types within a type declaration for 
gcc? I don't understand...
It is not multiple definition for sure, because when I define a type 
twice I receive a separate/different notice about the multi-definition 
error.

Using the problematic linux header files in order to compile a simple 
source like the following one..
#include <linux/types.h>
int addi( int a, int b)
{
        return (a+b);
}

int main()
{
       /*  fd_set is a type definition located inside the linux headers */
        fd_set set;

        set.fds_bits[0] = 0;
        set.fds_bits[1] = 1;
        set.fds_bits[2] = addi( set.fds_bits[0], set.fds_bits[1] );

        return 1;
}

It passes Ok by compiling
e1-coff-gcc -S  TestFile.c -I <include_path>

I am really confused and I don't understand the compiler errors I receive...
Is there anybody who can understand the error and can tell me what I 
have to fix or look for?

Thanks,

- George

-- 
________________________________________
George Thanos
National Technical University of Athens
Department of Electrical Engineering
Telecommunications Laboratory
Phone : +30 10 772 2422
email : gthanos@telecom.ece.ntua.gr
________________________________________


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-10-03  9:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-03  2:50 Compiler error indication - Continue George Thanos

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).