Unix Technical Forum

error: array type has incomplete element type ??

This is a discussion on error: array type has incomplete element type ?? within the AIX Operating System forums, part of the Unix Operating Systems category; --> This is a part of the code : -------------------------------------------------------------- extern struct dummy temp[]; error: array type has incomplete element ...


Go Back   Unix Technical Forum > Unix Operating Systems > AIX Operating System

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-05-2008, 12:54 PM
onkar
 
Posts: n/a
Default error: array type has incomplete element type ??


This is a part of the code :
--------------------------------------------------------------
extern struct dummy temp[];
error: array type has incomplete element type
--------------------------------------------------------------

which i compiled without any error on :

$gcc -v
Reading specs from /usr/bin/../lib/gcc-lib/powerpc-ibm-aix5.1.0.0
/2.9-aix51-020209/specs
gcc version 2.9-aix51-020209

but the same code doesnt compile on the :
$gcc -v
Using built-in specs.
Target: powerpc-ibm-aix5.3.0.0
Configured with: ../configure --with-as=/usr/bin/as --with-ld=/usr/bin/
ld
--disable-nls --enable-languages=c,c++ --prefix=/opt/freeware
--enable-threads --enable-version-specific-runtime-libs
--host=powerpc-ibm-aix5.3.0.0
Thread model: aix
gcc version 4.0.0

please suggest me the arguments I must give to gcc 4.0 to get the
above
code compiled.



Onkar


PS :


I have already gone through the article :
<http://www.open-std.org/jtc1/sc22/wg14/www/docs/dr_047.html>.

the code I am compiling is large and it is difficult to change it
now.
Please suggest me something that GCC 4.0 has for backward
compatibility.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-05-2008, 12:54 PM
=?UTF-8?B?TMWRcmluY3p5IFpzaWdtb25k?=
 
Posts: n/a
Default Re: error: array type has incomplete element type ??

onkar wrote:
> This is a part of the code :
> --------------------------------------------------------------
> extern struct dummy temp[];
> error: array type has incomplete element type


I don't think this should work (perhaps struct dummy was somewhere in
the headers defined)...
Instead, you can define a pointer to an undefined structure:

extern struct notdefinedyet *ptr;
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 10:16 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com