Hi Przemek, >> Please note I haven't tested this on C5.2e, so it may >> be Clipper compatible behavior, but anyway I just noticed >> it today in repository, and felt better to report it: >> --- >> #ifdef MACRO >> ? 1 >> #else >> ? 0 >> --- >> Will not report any warning in Harbour. Probably it'd be >> nicer if unclosed #if levels would be reported by compiler/PP. > > It's Clipper compatible behavior and I intentionally replicated it. > In general it does not reports any warnings on unclosed conditional > structures. > There are also some other funny Clipper behavior I also replicated, > i.e. try this code: > > #ifdef MACRO > ? "1" > #else > ? "2" > #else > ? "3" > #else > ? "4" > #endif
Strange one indeed. Cannot imagine what would this do. > If you want I can add warning messages for some of them if they can > be easy separated from the whole conditional compilation logic. I think it would be nice since it could help finding some unnoticed uncleanness in code, if it's not a huge task to do. As Chen suggested, you can protect these parts with HB_CLP_STRICT to document the incompatibility. Or only turn these warnings on in -w3 mode to not disturb wrong Clipper code ported to Harbour. Brgds, Viktor _______________________________________________ Harbour mailing list (attachment size limit: 40KB) [email protected] http://lists.harbour-project.org/mailman/listinfo/harbour
