This is the mail archive of the gcc-bugs@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]

Patch for va_arg and references



Geoff --

  Your recent patch to c-common.c breaks these test cases:

FAIL: g++.jason/thunk3.C (test for excess errors)
FAIL: g++.other/vaarg1.C (test for excess errors)
FAIL: g++.other/vaarg2.C (test for excess errors)
FAIL: g++.pt/vaarg.C (test for excess errors)

  on i686-pc-linux-gnu.

  The reason is that `&ap' is not an lvalue in C++ (even though `ap'
is), and references must be bound to lvalues.  Effectively, we've now
got:

  extern void va_start (void *&);
  void *ap;
  va_start (&ap);

which isn't legal C++.

-- Mark

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