Re: error: expected '=', ',', ';', 'asm' or '__attrib



In article <MPG.2000d13782aaec369896b1@xxxxxxxxxxxxxxxxx>, Robert Adsett
says...
In article <4596eed3$0$18582$88260bb3@xxxxxxxxxxxxxxxxx>, Sergey
Kubushin says...
Robert Adsett <subscriptions@xxxxxxxxxxxxxxxxxxxxx> wrote:
In article <1167470530.933569.143970@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
techie.embedded@xxxxxxxxx says...
Hi

I'm trying to compile an ADC Driver & come acrosss the following error.
I've no experience writing drivers before, and hence have no clue how
to fix it.
Hope someone out there has encountered the problem & suggesst a fix for
the same.

The Error is I get is :

qadc.c: At top level:
qadc.c:97: error: expected '=', ',', ';', 'asm' or '__attribute__'
before 'qadc_read'
make: *** [qadc.o] Error 1
[root@localhost qadc]#
<snip>
/* Structure to declare our file access functions. */
struct file_operations qadc_fops =
{
open: qadc_open,
read: qadc_read,
write: qadc_write,
release: qadc_release
};

Well, the above isn't valid C so I'd start there.

It was some time back but now it's changed.

As of? AFAIR it isn't part of C89/90 and the more recent changes are
not generally available. It's certainly the line the compiler is
complaining about.

I did a little checking, the only reference Ive found to member
initialization in C uses the following syntax

struct point location = { .y = 13, .x = 10 };

No mention of the syntax above. Even that is only present in C99 and so
far from widely available.

Do you have a reference for the validity of the syntax in the original
post?

Robert

--
Posted via a free Usenet account from http://www.teranews.com

.



Relevant Pages

  • Re: error: expected =, ,, ;, asm or __attrib
    ... I'm trying to compile an ADC Driver & come acrosss the following error. ... I've no experience writing drivers before, and hence have no clue how ... to fix it. ...
    (comp.arch.embedded)
  • SHANDLE_PTR??!!
    ... I'm trying to compile a code and I keep getting ... error: identifier 'SHANDLE_PTR' ... can I fix this??? ...
    (microsoft.public.development.device.drivers)
  • Re: error: expected =, ,, ;, asm or __attrib
    ... I'm trying to compile an ADC Driver & come acrosss the following error. ... I've no experience writing drivers before, and hence have no clue how ... to fix it. ...
    (comp.arch.embedded)
  • Re: Compiling VB6 programs
    ... Most languages, including VB.Net, continue syntax checking even after the ... That way you can fix a bunch of errors at the same time. ... without waiting for a compile. ... It's easier to stop the compile on the first error. ...
    (microsoft.public.vb.general.discussion)
  • Re: Segfault City
    ... it will at least compile if you just use gcc -o foo foo.c, ... "Use the following syntax: %s"), ... have anybody doing quality assurance of the code -- which, ...
    (comp.lang.c)