public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* newbie
@ 2002-07-08 12:17 Guy Lepine
  2002-07-08 21:30 ` Unfamiliar GCC error message [was Re: newbie] Zane Dodson
  0 siblings, 1 reply; 2+ messages in thread
From: Guy Lepine @ 2002-07-08 12:17 UTC (permalink / raw)
  To: 'gcc-help@gcc.gnu.org'

Good day,
	I am fairly new with gcc and some compilation errors I get do not
make much sense to me.  I was wondering if there was a reference in which I
could find more detailed explanations about the errors I get.  E.g. the
following one is not obvious to me:

"passing const CClass as 'this' argument of 'CClass::Method(...)' discards
qualifiers"

Thanks in advance,

_______________________________
Guy Lépine, ing.
Concepteur logiciel / Software Designer
_______________________________
Ce message et son(ses) fichier(s) adjoint(s) peuvent contenir de
l'information légale privilégiée ou confidentielle de Mediatrix.  Il est
destiné exclusivement au(x) destinataire(s) identifié(s).  Si vous n'êtes
pas un destinataire indiqué dans ce message (ou responsable de la livraison
du message au destinataire), vous ne pouvez copier ou livrer ce message ou
son(ses) fichier(s) adjoint(s) à quiconque.  Vous devriez plutôt effacer de
façon permanente ce message et son(ses) fichier(s) adjoint(s) et aimablement
en avertir l'expéditeur par courriel.  Aucune garantie n'est donnée que ce
courriel ou son(ses) fichier(s) adjoint(s) ne contiennent pas de virus
informatique ou autre défectuosité.

This message and its attachment(s) contain protected proprietary and
confidential information of Mediatrix.  It is intended solely for the named
addressee(s).  If you are not an addressee indicated in this message (or
responsible for delivery of the message to an addressee), you may not copy
or deliver this message or its attachment(s) to anyone.  Rather, you should
permanently delete this message and its attachment(s) and kindly notify the
sender by email.  No warranty is made that the email or attachment(s) are
free from computer virus or other defect.




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

* Re: Unfamiliar GCC error message [was Re: newbie]
  2002-07-08 12:17 newbie Guy Lepine
@ 2002-07-08 21:30 ` Zane Dodson
  0 siblings, 0 replies; 2+ messages in thread
From: Zane Dodson @ 2002-07-08 21:30 UTC (permalink / raw)
  To: Guy Lepine; +Cc: 'gcc-help@gcc.gnu.org'

On Mon, Jul 08, 2002 at 03:17:18PM -0400, Guy Lepine wrote:
| Good day,
| 	I am fairly new with gcc and some compilation errors I get do not
| make much sense to me.  I was wondering if there was a reference in which I
| could find more detailed explanations about the errors I get.  E.g. the
| following one is not obvious to me:
| 
| "passing const CClass as 'this' argument of 'CClass::Method(...)' discards
| qualifiers"

Although I don't know of any GCC-specific documentation on the
errors, the terminology used in error messages (such as the one you
show above) come from the C++ standard.

The ultimate reference is the ISO/IEC 14882:1998 which defines the
language.  You can find most of the terminology there (although
sometimes it's rather buried).  It is available for $18.00 from
www.ansi.org (select `Standards Info' and search for 14882).
Stroustrup's book also uses much of the jargon and is an easier
read.

With regard to your specific error message above, it sounds as if
CClass::Method() has been declared non-const and you are attempting
to invoke it with a const instance of CClass.  The relevant section
in Stroustrup's book on this topic is `Constant Member Functions',
section 10.2.6.  In the ISO standard, this information is in section
9.3.2, `The this pointer'.

Best regards,

--
Zane Dodson
zdodson@zdodson.com

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

end of thread, other threads:[~2002-07-09  4:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-08 12:17 newbie Guy Lepine
2002-07-08 21:30 ` Unfamiliar GCC error message [was Re: newbie] Zane Dodson

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