Bug 47676 - error: field âOttybâ has incomplete type
Summary: error: field âOttybâ has incomplete type
Status: RESOLVED INVALID
Alias: None
Product: gcc
Classification: Unclassified
Component: driver (show other bugs)
Version: unknown
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-10 12:15 UTC by AK
Modified: 2011-02-23 13:28 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2011-02-10 12:43:35


Attachments
Detailed description and header file extract (1019 bytes, text/plain)
2011-02-10 12:15 UTC, AK
Details

Note You need to log in before you can comment on or make changes to this bug.
Description AK 2011-02-10 12:15:37 UTC
Created attachment 23293 [details]
Detailed description and header file extract

Hello,

Scenario:
Environment migrated-
HP-UX --> Linux 
acc --> gcc
----------------
Compilation of the existing code giving below error:

+ gcc -I.-D_HPUX_SOURCE -D_XPG2 -DUNIX -c io_util_FILE.c -o io_util_FILE.o
In file included from ./io_util.h:15,
                 from io_util_FILE.c:13:
/usr/local/include/ncurses/term.h:698: error: field âOttybâ has incomplete type
/usr/local/include/ncurses/term.h:699: error: field âNttybâ has incomplete type
----------------
Header file extract and description is attached for reference.

Thank you.
Comment 1 Jonathan Wakely 2011-02-10 12:43:35 UTC
I don't know why you think this is a gcc bug but please follow the instructions at http://gcc.gnu.org/bugs/ and provide preprocessed source.

This is more likely to be a bug in your code. Even if it's a problem with the ncurses/term.h header, that's not a GCC bug.
Comment 2 AK 2011-02-10 12:55:11 UTC
Thanks Jonathan for initial view.
The same code is being used before, which was compiling properly, but when migrated to Linux+gcc, it is giving this issue.
In the menwhile, I will also check the instructions sent by you.
Any further suggestions will be of big help.


(In reply to comment #1)
> I don't know why you think this is a gcc bug but please follow the instructions
> at http://gcc.gnu.org/bugs/ and provide preprocessed source.
> This is more likely to be a bug in your code. Even if it's a problem with the
> ncurses/term.h header, that's not a GCC bug.
Comment 3 Jonathan Wakely 2011-02-10 13:52:48 UTC
(In reply to comment #2)
> The same code is being used before, which was compiling properly, but when
> migrated to Linux+gcc, it is giving this issue.

That's not a compiler bug. That means your code is not portable.

This code will compile on some UNIX platforms, but not on GNU/Linux:

  #include <sys/mman.h>
  caddr_t* p = 0;

But that's not a GCC bug, it's because the code is not portable.

Anyway, if you think it is a bug you need to follow the bug reporting instructions.
Comment 4 Jonathan Wakely 2011-02-23 13:28:12 UTC
closing due to lack of response