This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: cccp.c: Macro Argument Limitation


On Wed, Jan 19, 2000 at 05:24:44PM -0500, Dave Brolley wrote:
> Hi,
> 
> The field 'newlines' in the struct argdata in cccp.c is used to
> count the number of newlines spanned my a macro argument.
...
> The equivalent field in cpplib (cpphash.c) is always set to 0 and
> never updated, although it does get tested. Perhaps the field and
> the test should be removed?

Removing it is easy, but I am a tiny bit nervous about doing that.
The comment above where it would be used says

             /* If a macro argument with newlines is used multiple times,
                then only expand the newlines once.  This avoids creating
                output lines which don't correspond to any input line,
                which confuses gdb and gcov.  */

In principle, the #line markers in the output ought to suffice to
straighten them out.  However, there is a mysterious bug where cc1's
error messages are off by a few lines (only in huge files, and it
never seems to survive my attempts to reduce the test case).  I wonder
if this is why.

zw

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]