List of changes between GCC cpp and sdcpp - roybaer/sdcc-wiki GitHub Wiki

The purpose of this document is to make synchronization of sdcc with GCC cpp easier. The following files has sdcpp specific changes:

  • support/cpp/libcpp/files.c:
    • specific code
  • support/cpp/libcpp/init.c:
    • ifdefed NLS support (don't include localedir.h)
    • deps_add_default_target(): first parameter is pfile instead pfile->deps
  • support/cpp/libcpp/internal.h:
    • SDCC _asm specific: __asm and __endasm handling
    • _cpp_process_line_notes() returns int instead void
  • support/cpp/libcpp/lex.c:
    • include assert.h
    • added global veriable in_asm
    • definition of _cpp_process_line_notes() returns int
    • added SDCC _asm specific function _sdcpp_skip_asm_block()
    • added sdcpp specific function pedantic_lex_number()
    • added sdcpp specific function copy_text_chars()
    • added SDCC _asm specific function _sdcpp_save_asm ()
    • cpp_get_comments() calls copy_text_chars()
    • _cpp_lex_direct() calls sdcpp specific function pedantic_lex_number(), SDCC _asm specific __asm __endasm handling
    • support/cpp/libcpp/macro.c:
    • macro_real_token_count() returns 0 after abort() to make the compiler happy
    • create_iso_definition(): sdcpp specific naked hash handling, added "%s" to cpp_error() to make the compiler happy
  • support/cpp/libcpp/mkdeps.c:
    • include internal.h
    • deps_add_default_target(): first parameter is cpp_reader * insted struct deps *; object file extension handling
  • support/cpp/libcpp/system.h:
    • Mac OS X specifics
    • include sdcpp.h
  • support/cpp/libcpp/include/cpplib.h:
    • SDCC _asm specific endasm handling
    • added IN_ASM and PREV_NL flags for the cpp_token structure
    • struct cpp_options: added allow_naked_hash, preproc_asm, obj_ext and pedantic_parse_number members
  • support/cpp/libcpp/include/mkdeps.h:
    • declaration of struct cpp_reader
    • declaration of deps_add_default_target(): first parameter is pfile instead pfile->deps
  • support/cpp/libcpp/include/symtab.h:
    • Mac OS X specifics: include libiberty/obstack.h instead obstack.h
⚠️ **GitHub.com Fallback** ⚠️