Menu

#963 Bug in Comment Lines with hyphens

Next_Nightly
fixed
nobody
None
Bug_Report
2021-12-02
2020-05-05
Huy Pham
No

There's a bug in the nightly 04-26-2020...

If in a file, a line starts with

//-----

when you start to compile it will becomes:

//----  --------------------------------------------------------------------------------------------------------

Note: if there's only 1 hyphen after the double slashes... it'll be fine... only happens with at least 2 hyphens. Also, if there's a space before the hyphens, then it is still fine.

Worse, in a header file, if the first line has

//------

then CB will insert another header guard at the top... for example:

before:

//--------
#ifndef MAIN_H_INCLUDED
#define MAIN_H_INCLUDED

// some codes

#endif // MAIN_H_INCLUDED

then, if you compile, it will become:

#ifndef HEADER_E7080777ACEECF03
#define HEADER_E7080777ACEECF03
//----  --------------------------------------------------------------------------------------------------------

#ifndef MAIN_H_INCLUDED
#define MAIN_H_INCLUDED

// some codes

#endif // MAIN_H_INCLUDED

#endif // header guard

And if you put in another slashes and hyphens on the very top... another header guard inserted again... and so on..

Discussion

  • Huy Pham

    Huy Pham - 2020-05-06

    Ok.. I found out from the C::B forum that the problem is from the plugin tidycmt and header guard plugins... If they are disabled, the problem goes away...

     
  • Miguel Gimenez

    Miguel Gimenez - 2021-12-02
    • status: open --> fixed
     
  • Miguel Gimenez

    Miguel Gimenez - 2021-12-02

    Header guard has been modified so it is disabled by default

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.