bug-glibc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: errno macro is not compatible with equal named c++ members


From: Andreas Jaeger
Subject: Re: errno macro is not compatible with equal named c++ members
Date: 18 Jun 2001 21:58:41 +0200
User-agent: Gnus/5.090004 (Oort Gnus v0.04) XEmacs/21.4 (Academic Rigor)

Georg Maaß <address@hidden> writes:

> C macros are not compatible with equal named member functions or member
> properties of c++ classes.

errno is a reserved name by ISO C - you are not allowed to use that
name as e.g. member.

Andreas

> If I spend a errno property or method to a class there is no more
> distinction between the member property and the macro, because I can't
> use a scope operator for the macro. Instead of macros I would prefer
> variables and methods bound to a namespace like error. This would give
> me the ability to access the error information provided by some C func-
> tions also inside classes, that define there own equal named property to
> store that retrived information.
> 
> If your provide the errno as a predefined global variable instead of a
> macro, the g++ developers get a chance to wrap a namespace around it.
> 
> Greetings, Georg

-- 
 Andreas Jaeger
  SuSE Labs address@hidden
   private address@hidden
    http://www.suse.de/~aj



reply via email to

[Prev in Thread] Current Thread [Next in Thread]