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 mloskot)

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
  • 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:

  1. Build CS-Map library, dictionaries compiler and test program
    $ cd trunk/CsMapDev
    $ make 
    
  1. Build dictionaries
    $ cd trunk/CsMapDev
    $ make dict
    
  1. Run test program
    $ cd trunk/CsMapDev
    $ make test
    
  1. 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 mloskot, 16 years ago

Component: component1Library
Version: svn-trunk

comment:2 by mloskot, 16 years ago

Description: modified (diff)

comment:3 by mloskot, 16 years ago

Description: modified (diff)

by mloskot, 16 years ago

ANSI compilation mode patch for CS-Map Library and improvements for Makefiles

Note: See TracTickets for help on using tickets.