ned14 / pcpp

A C99 preprocessor written in pure Python
Other
215 stars 39 forks source link

Extra spaces inserted after a multiline comment in passthru-comments mode #37

Closed virtuald closed 4 years ago

virtuald commented 4 years ago

Given a header:

#pragma once

    /** this spans
        two lines */
    virtual std::string baseOnly();

gcc -E -CC gives me:

# 4 "include/base.h"
   /** this spans
        two lines */
    virtual std::string baseOnly();

Whereas current master gives me:

$ pcpp include/base.h  --passthru-comments 
#line 4 "include/base.h"
    /** this spans
        two lines */

    virtual std::string baseOnly();

I've got a fix for this that I'll push momentarily.

ned14 commented 4 years ago

Thanks for reporting the problem and PR fixing this!