cannot compile same code on RHL 7.2 and 9.0

S

Slavisa

When I make my program on RedHat 9.0 everything goes fine, but when I try to
make on Red Hat 7.2 I get following errors:


logic2_msgcln.c:178: warning: initialization makes integer from pointer
without a cast
logic2_msgcln.c:178: initializer element is not constant
logic2_msgcln.c:178: warning: data definition has no type or storage class
logic2_msgcln.c:185: parse error before `void'
logic2_msgcln.c:225: parse error before `('
logic2_msgcln.c:225: warning: type defaults to `int' in declaration of
`__result'
logic2_msgcln.c:225: warning: data definition has no type or storage class
logic2_msgcln.c:225: parse error before `}'
logic2_msgcln.c:225: conflicting declarations of `__result'
logic2_msgcln.c:225: `__result' previously declared here
logic2_msgcln.c:225: `l' undeclared here (not in a function)
logic2_msgcln.c:225: `__s2' undeclared here (not in a function)
logic2_msgcln.c:225: parse error before `if'
logic2_msgcln.c:225: warning: type defaults to `int' in declaration of
`__result'
logic2_msgcln.c:225: conflicting declarations of `__result'
logic2_msgcln.c:225: `__result' previously defined here
logic2_msgcln.c:225: warning: data definition has no type or storage class
logic2_msgcln.c:225: parse error before `}'
logic2_msgcln.c:225: warning: type defaults to `int' in declaration of
`__result'
logic2_msgcln.c:225: warning: data definition has no type or storage class
logic2_msgcln.c:225: parse error before `}'
logic2_msgcln.c:225: redefinition of `__result'
logic2_msgcln.c:225: `__result' previously defined here
logic2_msgcln.c:225: `__s1' undeclared here (not in a function)
logic2_msgcln.c:225: warning: passing arg 1 of `l_object_get_type' makes
pointer from integer without a cast
logic2_msgcln.c:225: parse error before `if'
logic2_msgcln.c:225: warning: type defaults to `int' in declaration of
`__result'
logic2_msgcln.c:225: conflicting declarations of `__result'
logic2_msgcln.c:225: `__result' previously defined here
logic2_msgcln.c:225: warning: data definition has no type or storage class
logic2_msgcln.c:225: parse error before `}'



The thing is that I don't have `__result' in my code nor `__s1' etc.
This is what I have on RedHat 9.0:
compat-gcc-7.3-2.96.118
gcc-g77-3.2.2-5
libgcc-3.2.2-5
compat-gcc-c++-7.3-2.96.118
gcc-gnat-3.2.2-5
gcc-3.2.2-5
gcc-c++-3.2.2-5
gcc-java-3.2.2-5


glib-1.2.10-10
glibc-2.3.2-11.9
glib2-devel-2.2.1-1
glibc-kernheaders-2.4-8.10
glib-devel-1.2.10-10
glibc-common-2.3.2-11.9
glib2-2.2.1-1
glibc-devel-2.3.2-11.9


... and on Red Hat 7.2 :
gcc-2.96-112.7.2
gcc-g77-2.96-112.7.2
gcc-c++-2.96-112.7.2


glib10-1.0.6-10
glib-devel-1.2.10-5
glibc-devel-2.2.4-32
glib-1.2.10-5
compat-glibc-6.2-2.1.3.2
glib2-2.0.6-2
glib2-devel-2.0.6-2
glibc-common-2.2.4-32
glibc-2.2.4-32


Installing newer version of gcc is excluded. Any suggestions ?
 
D

Derk Gwen

# When I make my program on RedHat 9.0 everything goes fine, but when I try to
# make on Red Hat 7.2 I get following errors:

Do you have a header file that ends in something like
#endif
without a new line after the #endif or some other final preprocessor command?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,043
Latest member
CannalabsCBDReview

Latest Threads

Top