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]

suggest backporting fix for C++ asm ("..." :: "x") to 2.95


If you write, say in a header file

extern inline void
outb (unsigned char value, unsigned short port)
{
  __asm__ __volatile__ ("outb %b0,%w1"::"a" (value), "Nd" (port));
}

g++ will complain about syntax errors, since :: is the scope operator.
This was fixed in the development branch:

2000-02-1  Ulrich Drepper  <drepper@redhat.com>

        * parse.y (simple_stmt): Allow :: token in asm parameter list.
        * parse.c: Rebuilt.

but has not been fixed in 2.95.  I'd like to see this put into 2.95.3
as it causes compilation failures with glibc 2.1's <sys/io.h> and C++.
(e.g. see http://cgi.debian.org/cgi-bin/bugreport.cgi?archive=no&bug=57914)

zw

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