public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Doc on error messages
@ 2001-02-26  3:18 Thomas Garsiot
  2001-02-26  3:51 ` Soubhik Bhattacharya
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Thomas Garsiot @ 2001-02-26  3:18 UTC (permalink / raw)
  To: gcc-help

Hi there,

I'm sure I'm not the first on to ask this question, but I haven't been
able to find an answer on the web, in the archives of this list or in
news groups ...

Is there any exhaustive (or at least important) documentation on GCC's
error messages ?

I found some pages on frequent error messages, but there are often only
the 5 most frequent error messages and of course ... mine is not among
them :-)
I have a "dereferencing pointer to incomplete type" error, and I have no
idea of what an incomplete type is.

Thanks in advance for directing me to a good page on error messages.

Cheers,

    Thomas


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Doc on error messages
  2001-02-26  3:18 Doc on error messages Thomas Garsiot
@ 2001-02-26  3:51 ` Soubhik Bhattacharya
  2001-02-26  4:00 ` Puneet Singhal
  2001-02-26 13:02 ` Alexandre Oliva
  2 siblings, 0 replies; 7+ messages in thread
From: Soubhik Bhattacharya @ 2001-02-26  3:51 UTC (permalink / raw)
  To: Thomas Garsiot; +Cc: gcc-help

r u using a multi-dimensional array? 


On Mon, 26 Feb 2001, Thomas Garsiot wrote:

:Hi there,
:
:I'm sure I'm not the first on to ask this question, but I haven't been
:able to find an answer on the web, in the archives of this list or in
:news groups ...
:
:Is there any exhaustive (or at least important) documentation on GCC's
:error messages ?
:
:I found some pages on frequent error messages, but there are often only
:the 5 most frequent error messages and of course ... mine is not among
:them :-)
:I have a "dereferencing pointer to incomplete type" error, and I have no
:idea of what an incomplete type is.
:
:Thanks in advance for directing me to a good page on error messages.
:
:Cheers,
:
:    Thomas
:
:

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: Doc on error messages
  2001-02-26  3:18 Doc on error messages Thomas Garsiot
  2001-02-26  3:51 ` Soubhik Bhattacharya
@ 2001-02-26  4:00 ` Puneet Singhal
  2001-02-26  9:44   ` Thomas Garsiot
  2001-02-26 13:02 ` Alexandre Oliva
  2 siblings, 1 reply; 7+ messages in thread
From: Puneet Singhal @ 2001-02-26  4:00 UTC (permalink / raw)
  To: Thomas Garsiot, gcc-help

Hi Thomas,

>Is there any exhaustive (or at least important) documentation on GCC's
>error messages ?
>
>I found some pages on frequent error messages, but there are often only
>the 5 most frequent error messages and of course ... mine is not among
>them :-)
>I have a "dereferencing pointer to incomplete type" error, and I have no
>idea of what an incomplete type is.

Send the code which gives this error.
And the exact error message that gcc gives.

I am not aware of any errors page but I can help u with this one.

;-)
Puneet aka Victor


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Doc on error messages
  2001-02-26  4:00 ` Puneet Singhal
@ 2001-02-26  9:44   ` Thomas Garsiot
  0 siblings, 0 replies; 7+ messages in thread
From: Thomas Garsiot @ 2001-02-26  9:44 UTC (permalink / raw)
  To: Puneet Singhal; +Cc: gcc-help

Here are the details of the code you requested :

actually this is some code extracted from UCD-SNMP :

struct sockaddr_in *pduIp;
struct snmp_pdu *template_pdu;


pduIp = (struct sockaddr_in *)&(template_pdu->agent_addr);
pduIp->sin_family   = AF_INET;



----------------------------------
type definitions :
#define _UCD_SS_MAXSIZE   92  /* <= sizeof( sockaddr_un ) */
#define _UCD_SS_ALIGNSIZE (sizeof (long))

#define _UCD_SS_PAD1SIZE  (_UCD_SS_ALIGNSIZE - sizeof( unsigned short ))
#define _UCD_SS_PAD2SIZE  (_UCD_SS_MAXSIZE - \
  (sizeof( unsigned short ) + _UCD_SS_PAD1SIZE + _UCD_SS_ALIGNSIZE ))
typedef struct {
    unsigned char sa_len;
    unsigned char sa_family;

    char  sa_data[ _UCD_SS_PAD1SIZE ];
    long  sa_align;
    char  sa_pad2[ _UCD_SS_PAD2SIZE ];

} snmp_ipaddr;

struct snmp_pdu {
[...]
    snmp_ipaddr agent_addr;
[...]
 };


-----------------
/*
 * Socket address, internet style.
 */
struct sockaddr_in {
 u_char sin_len;
 u_char sin_family;
 u_short sin_port;
 struct in_addr sin_addr;
 char sin_zero[8];
};
struct in_addr {
 u_long s_addr;
};

I tried to include only the useful part.  Sorry if it's a little messy.

Thanks in advance for your help.

Cheers,

    Thomas




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Doc on error messages
  2001-02-26  3:18 Doc on error messages Thomas Garsiot
  2001-02-26  3:51 ` Soubhik Bhattacharya
  2001-02-26  4:00 ` Puneet Singhal
@ 2001-02-26 13:02 ` Alexandre Oliva
  2001-02-26 13:16   ` Doc on error messages --More questions " sherry
  2 siblings, 1 reply; 7+ messages in thread
From: Alexandre Oliva @ 2001-02-26 13:02 UTC (permalink / raw)
  To: Thomas Garsiot; +Cc: gcc-help

On Feb 26, 2001, Thomas Garsiot <garsiot@st2e.com> wrote:

> I have a "dereferencing pointer to incomplete type" error, and I have no
> idea of what an incomplete type is.

An incomplete type is one that has been declared but not defined.  For
example, a forward-declared struct is an incomplete type before it is
actually given a definition.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Doc on error messages --More questions on error messages
  2001-02-26 13:02 ` Alexandre Oliva
@ 2001-02-26 13:16   ` sherry
  2001-02-26 13:33     ` Alexandre Oliva
  0 siblings, 1 reply; 7+ messages in thread
From: sherry @ 2001-02-26 13:16 UTC (permalink / raw)
  To: Alexandre Oliva; +Cc: gcc-help

So, there is no doc/page/info on error messages ?

I have seen an error that says:
looser throw specifier for virtual `foo`
And that happens when the base class has a throw() spec while the derived
class does not.

But why is this an error?


Alexandre Oliva wrote:

> On Feb 26, 2001, Thomas Garsiot <garsiot@st2e.com> wrote:
>
> > I have a "dereferencing pointer to incomplete type" error, and I have no
> > idea of what an incomplete type is.
>
> An incomplete type is one that has been declared but not defined.  For
> example, a forward-declared struct is an incomplete type before it is
> actually given a definition.
>
> --
> Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
> Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
> CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
> Free Software Evangelist    *Please* write to mailing lists, not to me

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Doc on error messages --More questions on error messages
  2001-02-26 13:16   ` Doc on error messages --More questions " sherry
@ 2001-02-26 13:33     ` Alexandre Oliva
  0 siblings, 0 replies; 7+ messages in thread
From: Alexandre Oliva @ 2001-02-26 13:33 UTC (permalink / raw)
  To: sherry; +Cc: gcc-help

On Feb 26, 2001, sherry <sherry@zeroknowledge.com> wrote:

> So, there is no doc/page/info on error messages ?

Yep.

> I have seen an error that says:
> looser throw specifier for virtual `foo`

> And that happens when the base class has a throw() spec while the derived
> class does not.

> But why is this an error?

Because the C++ Standard says so.

Just think of it.  Given:

base *x;
x->foo();

if you were allowed to throw exceptions not defined in the base class
interface, how would one be able to trust exception specifications?

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2001-02-26 13:33 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-02-26  3:18 Doc on error messages Thomas Garsiot
2001-02-26  3:51 ` Soubhik Bhattacharya
2001-02-26  4:00 ` Puneet Singhal
2001-02-26  9:44   ` Thomas Garsiot
2001-02-26 13:02 ` Alexandre Oliva
2001-02-26 13:16   ` Doc on error messages --More questions " sherry
2001-02-26 13:33     ` Alexandre Oliva

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