Csound Csound-dev Csound-tekno Search About

[Csnd] Should include with #ifndef wrapper need newline after #endif at EOF?

Date2020-06-12 20:33
FromKevin Welsh
Subject[Csnd] Should include with #ifndef wrapper need newline after #endif at EOF?
Attachmentsinclude.csd  test.csd  
This just bit me *HARD* on a fairly large project, I couldn't figure
out what was wrong and was pulling my hair out for a bit... but I
finally tracked it back to this:

If an included file uses an #ifdef wrapper to prevent multiple
inclusions, absence of a newline after the #endif at the end of file
causes it to report an unmatched ifdef.

Here is a test.csd and include.csd

As it is it will fail.  Adding a newline to the include file will fix
it.  This doesn't strike me as the intended behavior, but just figured
I'd ask before filing a bug.

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here