Informix Error -4479: Warning: non-ANSI comment indicator. Use "--" for ANSI compatibility.
Cause and resolution
Warning: non-ANSI comment indicator. Use "--" for ANSI compatibility.
If you want your SQL statements to comply with ANSI standards, you must use the two-dash comment delimiter (- -). The comment delimiters of the number sign (#) and the braces ({ }) are not portable to ANSI-compliant systems. This message is seen because you specified that you wanted warnings issued for constructs that are not ANSI compliant, by means of the -ansi command-line parameter, the DBANSIWARN environment variable, or the DBANSIWARN setting in the informix.ini file. Only NewEra returns this error.
-4479 Warning: non-ANSI comment indicator. Use "--" for ANSI compatibility.
If you want your SQL statements to comply with ANSI standards, you must use the two-dash comment delimiter (- -). The comment delimiters of the number sign (#) and the braces ({ }) are not portable to ANSI-compliant systems. This message is seen because you specified that you wanted warnings issued for constructs that are not ANSI compliant, by means of the -ansi command-line parameter, or the DBANSIWARN environment variable. Only 4GL returns this error.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-4479 is a compiler warning: per the official guidance, ANSI-compliant SQL requires the
two-dash (--) comment delimiter; # and { } aren't portable to ANSI-compliant systems.
This warning only appears because ANSI-compliance warnings were requested via the -ansi
command-line parameter, the DBANSIWARN environment variable, or the DBANSIWARN setting in
informix.ini.
- A
#or{ }comment delimiter used while ANSI-compliance warnings are enabled, per the official guidance — the direct cause; not itself a hard error.
Solutions / Resolution
- Use
--as the comment delimiter for ANSI compatibility, per the official guidance.
Examples
A non-ANSI comment delimiter
# this is not ANSI-portable
Corrected
-- this is ANSI-portable
Diagnostic Checks
- Check every comment in the source for
#/{ }delimiters, and replace them with--if ANSI compatibility is required.
Related Errors / Related Topics
No closely related error codes are cross-referenced for -4479 in this set yet.
A non-ANSI comment delimiter (# or { }) is used while ANSI warnings are enabled — use --
instead.