Bug 108666

Summary: Source formatter messes up literal strings
Product: [Applications] kdevelop Reporter: Gunther Piez <gpiez>
Component: AstyleAssignee: kdevelop-bugs-null
Status: RESOLVED NOT A BUG    
Severity: normal    
Priority: NOR    
Version First Reported In: 3.2.1   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Gunther Piez 2005-07-06 22:04:24 UTC
Version:           3.2.1 (using KDE KDE 3.4.1)
Installed from:    Gentoo Packages
Compiler:          3.4.3 
OS:                Linux

Literal strings which continue over more than one line get "formatted".

Example:

void blah() {
    printf("\
left aligned line1\n\
left aligned line2\n"
          );
}

becomes

void blah() {
    printf("\
            left aligned line1\n\
            left aligned line2\n"
          );
}

Admittedly, this looks more appealing, but the content of the string has changed, and so this compiles to a different program.

IMHO, a Source Formatter must never change the program, only the source.
Comment 1 Matt Rogers 2005-10-20 02:10:09 UTC
*** Bug 114687 has been marked as a duplicate of this bug. ***
Comment 2 Jens Dagerbo 2006-12-16 19:42:05 UTC
Still happens in 3.4-RC2
Comment 3 Megan Webb 2007-07-02 13:36:56 UTC
This is an astyle bug.  Surprisingly didn't have this logged with upstream. Now logged as 1746419

http://sourceforge.net/tracker/index.php?func=detail&atid=102319&aid=1746419&group_id=2319
Comment 4 Andreas Pakulat 2007-12-01 00:46:42 UTC
closing as invalid as its an astyle bug.