Creazy compiler problem ...

When I try to compile the program below

#define x(a, b, c, ,d ,e)
{
a=1;
b=2;
c=3;
d=4;
e=5;
}

int main( void)
{
int a1, b1,c1,d1,e1;
x(a1,b1,c1,d1,e1)
}

I got the error message:

qcc -o t t.c

t.c:10: badly punctuated parameter list in #define' t.ccc: /usr/lib/gcc-lib/ntox86/2.95.2/cpp error 33: In function main’:
t.c:18: parse error before `}’
cc: /usr/lib/gcc-lib/ntox86/2.95.2/cc1 error 33

Any work around available ??


Regards

Armin

#define x(a, b, c, ,d ,e)
#define x(a, b, c, d ,e) \

“Armin Steinhoff” <a-steinhoff@web_.de> píse v diskusním príspevku
news:3CE10090.4446959B@web_.de…

When I try to compile the program below

#define x(a, b, c, ,d ,e)
{
a=1;
b=2;
c=3;
d=4;
e=5;
}

int main( void)
{
int a1, b1,c1,d1,e1;
x(a1,b1,c1,d1,e1)
}

I got the error message:

qcc -o t t.c

t.c:10: badly punctuated parameter list in #define' t.ccc: /usr/lib/gcc-lib/ntox86/2.95.2/cpp error 33: In function main’:
t.c:18: parse error before `}’
cc: /usr/lib/gcc-lib/ntox86/2.95.2/cc1 error 33

Any work around available ??


Regards

Armin

Armin Steinhoff <a-steinhoff@web_.de> wrote in article <3CE11F3D.15ACF711@web_.de>…
[x]

My real problem was (not in this example) an unvisible :wink: > Also it allows to convert from DOS

to QNX and vice versa :wink: Just my 2 cents. Best regards!

Eduard.
ed1k at ukr dot net

Stepan Hejny wrote:

#define x(a, b, c, ,d ,e)
#define x(a, b, c, d ,e)

Wow … just overlooked that :slight_smile:

My real problem was (not in this example) an unvisible in the
sequences of
behind the back slashes :slight_smile: … so the line continuation didn’t
work and I
got always the message “stray ‘’ in program”

Some problems are trivial … but hard to find :slight_smile:

Thanks Stephan

Armin



“Armin Steinhoff” <a-steinhoff@web_.de> píse v diskusním príspevku
news:3CE10090.4446959B@web_.de…

When I try to compile the program below

#define x(a, b, c, ,d ,e)
{
a=1;
b=2;
c=3;
d=4;
e=5;
}

int main( void)
{
int a1, b1,c1,d1,e1;
x(a1,b1,c1,d1,e1)
}

I got the error message:

qcc -o t t.c

t.c:10: badly punctuated parameter list in #define' t.ccc: /usr/lib/gcc-lib/ntox86/2.95.2/cpp error 33: In function main’:
t.c:18: parse error before `}’
cc: /usr/lib/gcc-lib/ntox86/2.95.2/cc1 error 33

Any work around available ??


Regards

Armin

using ped
it dumps when i try open a text file containing CR LF :slight_smile:


“ed1k” <ed1k@spamerstrap.com> pí¹e v diskusním pøíspìvku
news:01c1fb54$ddeff600$106fa8c0@ED1K…

Armin Steinhoff <a-steinhoff@web_.de> wrote in article
3CE11F3D.15ACF711@web_.de>…
[x]
My real problem was (not in this example) an unvisible :wink: > Also it
allows to convert from DOS
to QNX and vice versa > :wink: > Just my 2 cents. Best regards!

Eduard.
ed1k at ukr dot net

Usually I try preprocessing the files to see what I get. In this case it
was the preprocessor that was choking which gave a little clue. I missed
this error the first few times too until I saw that it was the preprocessor
erroring. Tricky one that. Almost as good as the parse error when you’ve
got a ‘:’ instead of a ‘;’ (and a small font :wink:

Kris

“Armin Steinhoff” <a-steinhoff@web_.de> wrote in message
news:3CE11F3D.15ACF711@web_.de…

Stepan Hejny wrote:

#define x(a, b, c, ,d ,e)
#define x(a, b, c, d ,e) \

Wow … just overlooked that > :slight_smile:

My real problem was (not in this example) an unvisible in the
sequences of
CR> behind the back slashes > :slight_smile: > … so the line continuation didn’t
work and I
got always the message “stray ‘’ in program”

Some problems are trivial … but hard to find > :slight_smile:

Thanks Stephan

Armin




“Armin Steinhoff” <a-steinhoff@web_.de> píse v diskusním príspevku
news:3CE10090.4446959B@web_.de…

When I try to compile the program below

#define x(a, b, c, ,d ,e)
{
a=1;
b=2;
c=3;
d=4;
e=5;
}

int main( void)
{
int a1, b1,c1,d1,e1;
x(a1,b1,c1,d1,e1)
}

I got the error message:

qcc -o t t.c

t.c:10: badly punctuated parameter list in #define' t.ccc: /usr/lib/gcc-lib/ntox86/2.95.2/cpp error 33: In function main’:
t.c:18: parse error before `}’
cc: /usr/lib/gcc-lib/ntox86/2.95.2/cc1 error 33

Any work around available ??


Regards

Armin

ed1k wrote:

Armin Steinhoff <a-steinhoff@web_.de> wrote in article <3CE11F3D.15ACF711@web_.de>…
[x]
My real problem was (not in this example) an unvisible :wink: > Also it allows to convert from DOS
to QNX and vice versa > :wink: > Just my 2 cents. Best regards!

Wow … thanks for that hint. It looks like I have missed something!

Regards

Armin



Eduard.
ed1k at ukr dot net