------- Comment #2 from bangerth at dealii dot org  2008-02-12 06:26 -------
Not a bug: The name of a member (static or not) without class qualification
can not be used in an address-of expression or decay to a pointer as 
desired in the current context:

5.19/2:
  Other expressions are considered  constant-expressions  only  for  the
  purpose      of     non-local     static     object     initialization
  (_basic.start.init_).  Such constant expressions shall evaluate to one
  of the following:
  --  a null pointer value (_conv.ptr_),
  --  a null member pointer value (_conv.mem_),
  --  an arithmetic constant expression,
  --  an address constant expression,
  [...]

5.19/4
  An address constant expression is a pointer to an  lvalue  designating
  an object of static storage duration, a string literal (_lex.string_),
  or a function.  The pointer shall be  created  explicitly,  using  the
  unary & operator, or implicitly using a non-type template parameter of
  pointer type, or  using  an  expression  of  array  (_conv.array_)  or
  function  (_conv.func_)  type.

5.3.1/2
  The result of the unary & operator is a pointer to its  operand.   The
  operand  shall  be an lvalue or a qualified-id.


-- 

bangerth at dealii dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bangerth at dealii dot org
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35167

Reply via email to