Opened 16 years ago
Last modified 16 years ago
#1 new enhancement
ANSI compilation mode patch for CS-Map Library — at Version 3
Reported by: | mloskot | Owned by: | somebody |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | Library | Version: | svn-trunk |
Keywords: | ansi pedantic | Cc: |
Description (last modified by )
I prepared patch that enables strict ANSI compilation mode with GCC for the CS-Map. The patch includes following changes:
- fixes for source code of library, dictionaries compiler and test program
- improvements for makefiles: Library.mak, Compiler.mak and Test.mak
- new master Makefile in trunk/CsMapDev that controls building of all CS-Map components (see usage information included in Makefile comments)
Here is set of compilation flags I used:
-Wall -Wextra -Werror -pedantic -ansi
Building CS-Map using refactored Makefile files:
- Build CS-Map library, dictionaries compiler and test program
$ cd trunk/CsMapDev $ make
- Build dictionaries
$ cd trunk/CsMapDev $ make dict
- Run test program
$ cd trunk/CsMapDev $ make test
- Clean all
$ cd trunk/CsMapDev $ make clean
One major update is not included in this patch, CS-Map uses names that belong to class of names reserved by C/C++ implementation. Reserved identifiers begin with 1 or 2 underscores and continuewith a capital letter (for instance,
__This
name as variable is invalid), so they match to the following regular expression:
_[_A-Z][0-9_a-zA-Z]*
In terms of the C/C++ ANSI, use of such identifiers leads to undefined behavior.
Change History (4)
comment:1 by , 16 years ago
Component: | component1 → Library |
---|---|
Version: | → svn-trunk |
comment:2 by , 16 years ago
Description: | modified (diff) |
---|
comment:3 by , 16 years ago
Description: | modified (diff) |
---|
by , 16 years ago
Attachment: | csmap-all-ansi-and-makefile-mloskot.patch added |
---|
ANSI compilation mode patch for CS-Map Library and improvements for Makefiles