Gcc On Solaris Sparc Versus Solaris Intel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Gentle People?

I am currently running gcc 3.1 on both my Ultra 5
Solaris 8 Sparc machine and on Solaris 8 Intel machine.
The Application C source code that compiles and executes
perfectly on the Ultra 5 will not compile on the Intel machine!

The compilation errors, shown below, seem to relate to
syntax errors, and not simply missing files. Remember this
same code compiles perfectly on the Sparc machine. There is no
inline assembly language or obvious machine dependent code
involved.

Why would there be such a difference in the between gcc on
Sparc versus Intel? I would of thought that the C Parcer Defination
and thus top level compiler behavior would be identical for all gcc
versions andf platforms?

Someone mentioned that the header files are different:
I wonder why? I would of thought at that level of abstraction
they would be identical.

Would an update to a newew version of code fix this problem?

Thanks for the help.
Thomas Dineen

gcc cmd_parser.c -ggdb -w -c -o cmd_parser.o
In file included from cmd_parser.c:13:
structures.h:484: parse error before "exec_struct_sun"
structures.h:489: parse error before "Exec_union"
structures.h:498: parse error before ’}’ token

typedef union
{
unsigned char load[BUF_SIZE];
exec_struct_sun Exec_load; // Line 484
} Exec_union;

typedef struct
{
Exec_union un; // Line 489
int n_page_size;
int n_segment_size;
int n_text_offset;
int n_data_offset;
int n_text_rel_offset;
int n_data_rel_offset;
int n_symbol_offset;
int n_string_offset;
} Exec_Struct; // Line 498

// Cut from another .h file:

typedef struct {
unsigned char a_dynamic:1; /* has a __DYNAMIC */
unsigned char a_toolversion:7; /* version of toolset used create this file */
unsigned char a_machtype; /* machine type */
unsigned short a_magic; /* magic number */
unsigned int a_text; /* size of text segment */
unsigned int a_data; /* size of initialized data */
unsigned int a_bss; /* size of uninitialized data */
unsigned int a_syms; /* size of symbol table */
unsigned int a_entry; /* entry point */
unsigned int a_trsize; /* size of text relocation */
unsigned int a_drsize; /* size of data relocation */
} exec_struct_sun;



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux