| Summary: | lint does not understand C++-style comments | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Base System | Reporter: | tms2 <tms2> | ||||
| Component: | misc | Assignee: | freebsd-bugs (Nobody) <bugs> | ||||
| Status: | Closed FIXED | ||||||
| Severity: | Affects Only Me | ||||||
| Priority: | Normal | ||||||
| Version: | 3.2-RELEASE | ||||||
| Hardware: | Any | ||||||
| OS: | Any | ||||||
| Attachments: |
|
||||||
|
Description
tms2
2000-05-26 04:10:01 UTC
State Changed From-To: open->closed Lint(1) says "lint - a C program verifier", so it is not clear it should unterstand C++ syntax. While // is part of ISO 9899:1999 (C99) our lint does not support any new syntax introduced by C99, like struct literals, flexible arrays and others. So instead of supporting just one feature of C99, the // comments, I think it is better to have lint actually reject // as it is clearly a syntax error for C89 and many compilers do not understand it. Lint is also a portability checker, intended to pick fluff off of C code and // is non-portable fluff. BTW, gcc does NOT understand // in -ansi -pedantic mode. Of course we would be pleased if you provided a patch to make lint (optionally) fully C99 aware and this would have a near 100% chance of making it into the tree. |