This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Problem with the EGCS cpp?


> I'm surprised the scope resolution operator :: does not allow
> whitespace on either side, since it is grammatically an operator, not
> part of an identifier.  This might be a bug in the C++ front end.  Or
> I might be demonstrating once again that I know squat about C++.

Neither, nor. g++ allows white space around the scope operator, just
as you'd expect.

namespace A{
 int x;
}

void f()
{
  A ::x=1;
}

compiles fine for me, and I can't see a reason why it shouldn't.

Regards,
Martin


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]