Skip to content

Partials generator merges two adjacent single-line #defines onto one line ("stray '#' in program") #1262

Description

@JoeLowtech

Hello,

I have the following issue with the partials feature:

Environment: Ceedling 1.2.0.pre.3, :use_partials: TRUE, TEST_PARTIAL_ALL_MODULE(...), gcc 14.2.0 (MSYS2 UCRT64), Windows 11

Summary: When a module's header has several single-line #define NAME (...) macros in a row, Partials' generated ..._impl.h occasionally drops the newline between two of them, concatenating both onto one line. The second #define then parses as part of the first macro's replacement list → hard compile error.

A workaround was found by inserting an unrelated blank line between the two #defines in the header file.

compile error:

build/test/partials/test_adc_ads124s08/ceedling_partial_adc_ads124s08_impl.h:23:68: error: stray '#' in program
   23 | #define IDX_DATARATE (ADS124S08_REG_ADDR_DATARATE - START_ADDRESS) #define IDX_REF (ADS124S08_REG_ADDR_REF - START_ADDRESS)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions