GCC 4 error.


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users GCC 4 error.
# 1  
Old 06-17-2009
GCC 4 error.

Hello, dont know much about C, or gcc, but I am trying to compile a program that built fine in gcc3, but is outputting errors in gcc4,

int load_REs(char *, char [][]); #this line is causing the error

DB_Query.h:22: error: array type has incomplete element type

any help would be appreciated.
# 2  
Old 06-17-2009
In C:
Code:
char [][]

that is an incomplete type because the second [] has to contain a const (number).
It is not really a bug, your code has a problem.

In your .h file handle it like this, maybe:
Code:

#define COL_SZ 12
int load_REs(char *, char [][COL_SZ]); #this line is causing the error

# 3  
Old 06-18-2009
Such incomplete types have actually been declared illegal as far as the C language standard is concerned since circa 1992. See Defect Report #047.

GCC3 silently supported a lot of "extensions" to the C standard such as incomplete types and lvalue casts. In GGC4 such extensions were dropped.
# 4  
Old 06-23-2009
Hi ,
As my understanding ,i guess this problem when occurs the compiler does n't support that type casting . in the code u r trying to cast the variable .
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Programming

gcc compiling error

I am using gcc to compile c objects on solaris 5.10 and hit the following error messages: /usr/include/sys/vfs.h:323: error: syntax error before "statvfs64_t" /usr/include/sys/vfs.h:334: error: syntax error before "statvfs64_t" gmake: *** Error 1 The c program files were copied over from... (3 Replies)
Discussion started by: med7006
3 Replies

2. UNIX for Dummies Questions & Answers

GCC compiler Ld fatal error

Hi all I'm trying to install sudo. When I first ran the sudo configure script it errored saying that I didn't have a C compiler. I have since installed the GCC 3.4.6 package for sol8 from sun freeware. Doing that resolved the no C complier found error. I was then getting an error saying... (1 Reply)
Discussion started by: Donkey25
1 Replies

3. Solaris

gcc lib error

Hi, I am working with solaris 9(SunOS mgsun 5.9 Generic_112233-07 sun4u sparc SUNW,Sun-Blade-100).I install the gcc 3.4.6 from sunfreeware website and when I am trying to run it,I am getting the error-- # gcc ld.so.1: gcc: fatal: libiconv.so.2: open failed: No such file or directory Killed... (2 Replies)
Discussion started by: smartgupta
2 Replies

4. Solaris

Installing gcc - recieve error message gcc : cannot execute

AIM- Install Oracle 11g on Solaris using VMWare Steps 1.Logged on as root 2.Created subfolders à /usr/local/bin & /usr/local/bin/gcc 3.Downloaded gcc & libiconv & unzipped them on my harddrive & burnt them on CD 4.Copied files from CD to /usr/local/bin/gcc 5.Terminal (root) à pkgadd -d... (8 Replies)
Discussion started by: Ackers
8 Replies

5. Solaris

Error when installing GCC

GCC 3.4.6 was installed in Solaris 2.8. I ran the commands ./configure and make. When running make install I got the below mentioned errors at the end. Please help me in resolving the same. make: *** Error 1 make: Leaving directory `/gmsp/antony/gcc-3.4.6/sparc-sun-solaris2.8/sparcv9/libf2c'... (1 Reply)
Discussion started by: chrisanto_2000
1 Replies

6. Programming

compilation error in gcc

Hi, Should be too simple... I wrote a sample c++ program like #include <iostream.h> int main() {$ int ab=455; cout << ab << endl; return 1; } I am getting error like $ gcc u1.cpp Undefined first referenced ... (9 Replies)
Discussion started by: ls1429
9 Replies

7. Solaris

error while installing gcc

Hi friends, i down loaded the gcc*.gz file and i am getting the following error when i am trying to install it on solaris 8 ======================================================= Processing package instance <SMCgcc342> from </export/gcc-3.4.2-sol8-sparc-local> gcc (sparc) 3.4.2 FSF... (1 Reply)
Discussion started by: sveera
1 Replies

8. Linux

gcc install error

I download a gcc3.0.tar.gz file ,then tar it. Continue,I change current path to gcc3.0 and press ./configure The error appeared ,it is CC command not found . Please tell me What can I do to pass on. (1 Reply)
Discussion started by: fansings
1 Replies

9. Programming

Error in compile C by gcc

Hi all, I compile my c program and get following result hrnpfc01.c:1387: stray '\' in program hrnpfc01.c:1387: parse error before `,' hrnpfc01.c:1388: stray '\' in program hrnpfc01.c:1388: parse error before `,' hrnpfc01.c:1396: stray '\' in program hrnpfc01.c:1396: parse error before... (4 Replies)
Discussion started by: zico
4 Replies

10. Shell Programming and Scripting

Error in gcc

Hi:- I am new for Unix and wants to install gcc compiler on my Linux system. I donwload the file and tried to install it but getting following messaged, # ./configure Configuring for a i686-pc-linux-gnuoldld host. Created "Makefile" in /home/gcc-3.0.1 using "mt-frag" ./configure: cc: command... (6 Replies)
Discussion started by: s_aamir
6 Replies
Login or Register to Ask a Question