This is the mail archive of the
mailing list for the binutils project.
Re: Variables from a C++ namespace in GNU inline assembler
- From: Ian Lance Taylor <iant at google dot com>
- To: Johannes Schauer <j dot schauer at email dot de>
- Cc: binutils at sourceware dot org
- Date: Tue, 24 Nov 2009 14:41:10 -0800
- Subject: Re: Variables from a C++ namespace in GNU inline assembler
- References: <4B0BA95B.email@example.com>
Johannes Schauer <firstname.lastname@example.org> writes:
> I wonder how to use C++ namespace variables in gnu inline assembler.
> In intel syntax (VC++) it looks like this:
> But i am unable to find a proper way of doing the same thing in gas as
> it tells me:
> Error: junk `::Bar' after expression
> whenever i try something which involves the double colon notation.
> Is there a sane way to circumvent this issue?
In GNU assembler you don't refer to symbols directly in the assembly
code. You refer to them as operands. For details please read the
friendly gcc manual.