Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - parse error before `::' on PPC build: (4 Items)
   
parse error before `::' on PPC build  
When my program includes this file:
ppc8260.h 
which in turn includes the file:
/../qnx630/target/qnx6/usr/include/ppc/cache.h

The compiler gives me an error on this line:
   __asm__ __volatile__( "dcbf 0,%0;" :: "r" (__dst));

The error is:
/.../qnx630/target/qnx6/usr/include/ppc/cache.h:25: parse error before ‘::’

1) What is this error about? And
2) When I build the ethernet driver through the QNX supplied makefile this same file is included in all the modules, yet
 it doesn’t produce an error. Only when my program includes this file do I get the error. I’ve use all the same 
compiler options that the make file does. So why just for my file?
Thanks
Re: parse error before `::' on PPC build  
On Fri, Jul 25, 2008 at 03:53:48PM -0400, Russell Shulman wrote:
> When my program includes this file:
> ppc8260.h 
> which in turn includes the file:
> /../qnx630/target/qnx6/usr/include/ppc/cache.h
> 
> The compiler gives me an error on this line:
>    __asm__ __volatile__( "dcbf 0,%0;" :: "r" (__dst));
> 
> The error is:
> /.../qnx630/target/qnx6/usr/include/ppc/cache.h:25: parse error before ???::???
> 
> 1) What is this error about? And
> 2) When I build the ethernet driver through the QNX supplied makefile this same file is included in all the modules, 
yet it doesn???t produce an error. Only when my program includes this file do I get the error. I???ve use all the same 
compiler options that the make file does. So why just for my file?
> Thanks

I can't think of anything off hand.  You might making the .i
(preprocessed file) in both instances and compare the difference.

-seanb
Re: parse error before `::' on PPC build  
This has been fixed in our trunk lib/cache

The C++ compiler was getting confused by the :: - add a space in between the two colons, wherever you seen them in that 
file.

In future it's a good idea to note that you are using C++ - most people here will assume you are using C.

Cheers,

Colin

Sean Boudreau wrote:
> On Fri, Jul 25, 2008 at 03:53:48PM -0400, Russell Shulman wrote:
>> When my program includes this file:
>> ppc8260.h 
>> which in turn includes the file:
>> /../qnx630/target/qnx6/usr/include/ppc/cache.h
>>
>> The compiler gives me an error on this line:
>>    __asm__ __volatile__( "dcbf 0,%0;" :: "r" (__dst));
>>
>> The error is:
>> /.../qnx630/target/qnx6/usr/include/ppc/cache.h:25: parse error before ???::???
>>
>> 1) What is this error about? And
>> 2) When I build the ethernet driver through the QNX supplied makefile this same file is included in all the modules, 
yet it doesn???t produce an error. Only when my program includes this file do I get the error. I???ve use all the same 
compiler options that the make file does. So why just for my file?
>> Thanks
> 
> I can't think of anything off hand.  You might making the .i
> (preprocessed file) in both instances and compare the difference.
> 
> -seanb
> 
> _______________________________________________
> Networking Drivers
> http://community.qnx.com/sf/go/post11196
> 

-- 
cburgess@qnx.com
Re: parse error before `::' on PPC build  
Thanks. Actually I was using C. The problem was I inadvertently invoked the C++ compiler ('QCC' vs. 'qcc'). Good to know
 about the double colon thing though.