Click on image to see enlargment
Augustus found a program that when compiled and run was supposed to produce the number of days in his favorite month. But it did not. The code was originally written for a compiler that had an unusual pragma structure. What was the value that Augustus was getting and why did he get it?
bug602.c lint Output
--- Module: bug602.c (C) _ if( n < 1 || n > 12 ) /* range check */ bug602.c(7) : Warning 602: Comment within comment _ return bug602.c(9) : Warning 527: Unreachable code at token 'return' bug602.c(9) : Info 1791: No token on this line follows the 'return' keyword
Reference Manual Explanation
602 Comment within comment -- The sequence /* was found within a comment. Was this deliberate? Or was a comment end inadvertently omitted? If you want PC-lint/FlexeLint to recognize nested comments you should set the Nested Comment flag using the +fnc option. Then this warning will not be issued. If it is your practice to use the sequence: /* /* */ then use -e602.
Previous Bug - Bug #603 - July 2012