error 1000: Unexpected symbol
Hi All,
I have a code which is used for conversion from binary to ASCII.
This code works absolutely fine on Linux and Solaris
And the same is giving many errors and warnings on HPUX. The machine on which i am compliing is "HP-UX kautilya B.11.11 U 9000/800 876920620 unlimited-user license"
Below I have pasted the errors i get on compiling
cc: "converter.c", line 865: error 1000: Unexpected symbol: "{".
cc: "converter.c", line 915: error 1000: Unexpected symbol: "{".
cc: "converter.c", line 870: error 1588: "size" undefined.
cc: "converter.c", line 870: error 1566: Test expression in for must be scalar.
cc: "converter.c", line 919: error 1588: "first" undefined.
cc: "converter.c", line 925: error 1566: Test expression in for must be scalar.
cc: "converter.c", line 929: error 1560: Modifiable lvalue required with operator "++".
cc: "converter.c", line 931: error 1588: "j" undefined.
cc: "converter.c", line 931: error 1564: Expression in while must be scalar.
cc: "converter.c", line 934: error 1560: Modifiable lvalue required with operator "++".
cc: "converter.c", line 941: error 1000: Unexpected symbol: "else".
cc: "converter.c", line 948: warning 557: Missing declaration specifiers, "int" assumed.
cc: "converter.c", line 948: error 1584: Inconsistent type declaration: "cur_add".
cc: "converter.c", line 953: warning 558: Empty declaration.
cc: "converter.c", line 965: warning 557: Missing declaration specifiers, "int" assumed.
cc: "converter.c", line 965: error 1584: Inconsistent type declaration: "blkSize".
cc: "converter.c", line 965: error 1521: Incorrect initialization.
cc: "converter.c", line 968: warning 557: Missing declaration specifiers, "int" assumed.
cc: "converter.c", line 968: error 1584: Inconsistent type declaration: "version".
cc: "converter.c", line 968: error 1521: Incorrect initialization.
cc: "converter.c", line 971: error 1000: Unexpected symbol: "if".
cc: "converter.c", line 969: warning 557: Missing declaration specifiers, "int" assumed.
cc: "converter.c", line 969: error 1584: Inconsistent type declaration: "verval".
cc: "converter.c", line 969: error 1521: Incorrect initialization.
cc: "converter.c", line 972: error 1000: Unexpected symbol: "{".
cc: "converter.c", line 973: error 1584: Inconsistent type declaration: "blkSize1".
cc: "converter.c", line 973: error 1521: Incorrect initialization.
cc: "converter.c", line 974: warning 557: Missing declaration specifiers, "int" assumed.
cc: "converter.c", line 974: error 1584: Inconsistent type declaration: "blkSize1".
cc: "converter.c", line 974: warning 604: Pointers are not assignment-compatible.
cc: "converter.c", line 974: warning 563: Argument #1 is not the correct type.
cc: "converter.c", line 974: warning 604: Pointers are not assignment-compatible.
cc: "converter.c", line 974: warning 563: Argument #2 is not the correct type.
cc: "converter.c", line 974: error 1521: Incorrect initialization.
cc: "converter.c", line 977: error 1000: Unexpected symbol: "}".
cc: "converter.c", line 975: warning 557: Missing declaration specifiers, "int" assumed.
cc: "converter.c", line 975: error 1584: Inconsistent type declaration: "blockSize".
cc: "converter.c", line 975: error 1521: Incorrect initialization.
cc: "converter.c", line 980: error 1573: Type of "blockSize" is undefined due to an illegal declaratio
cc: "converter.c", line 980: error 1584: Inconsistent type declaration: "blockSize".
cc: "converter.c", line 980: error 1521: Incorrect initialization.
cc: "converter.c", line 982: error 1000: Unexpected symbol: "}".
cc: "converter.c", line 981: warning 557: Missing declaration specifiers, "int" assumed.
cc: "converter.c", line 991: warning 558: Empty declaration.
cc: "converter.c", line 998: error 1000: Unexpected symbol: "while".
cc: "converter.c", line 996: warning 557: Missing declaration specifiers, "int" assumed.
cc: "converter.c", line 1001: error 1000: Unexpected symbol: "!=".
cc: "converter.c", line 1041: error 1000: Unexpected symbol: "if".
cc: "converter.c", line 1039: error 1573: Type of "size" is undefined due to an illegal declaration.
cc: "converter.c", line 1041: error 1508: Illegal type combination.
cc: "converter.c", line 1044: warning 557: Missing declaration specifiers, "int" assumed.
cc: "converter.c", line 1047: error 1000: Unexpected symbol: "while".
cc: "converter.c", line 1045: warning 557: Missing declaration specifiers, "int" assumed.
cc: "converter.c", line 1045: error 1584: Inconsistent type declaration: "cur_add".
cc: "converter.c", line 1058: error 1000: Unexpected symbol: ";".
cc: "converter.c", line 1065: error 1000: Unexpected symbol: "for".
cc: "converter.c", line 1063: error 1573: Type of "size" is undefined due to an illegal declaration.
cc: "converter.c", line 1063: error 1584: Inconsistent type declaration: "size".
cc: "converter.c", line 1063: error 1521: Incorrect initialization.
cc: "converter.c", line 1065: error 1000: Unexpected symbol: ";".
cc: "converter.c", line 1066: error 1000: Unexpected symbol: "{".
cc: panic 2017: Cannot recover from earlier errors, terminating.
Can anyone help me please to resolve this as the errors that have come up seems to be so unrealistic like unexpected symbol ; and {. I also checked the lines where the error is reflected. But they seem absolutely fine as per C syntax and coding standards.
Hoping for a quick response.Thanks in advance