This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
suggest backporting fix for C++ asm ("..." :: "x") to 2.95
- To: gcc at gcc dot gnu dot org
- Subject: suggest backporting fix for C++ asm ("..." :: "x") to 2.95
- From: Zack Weinberg <zack at wolery dot cumb dot org>
- Date: Mon, 1 May 2000 10:38:37 -0700
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