Bug 108666 - Source formatter messes up literal strings
Summary: Source formatter messes up literal strings
Status: RESOLVED NOT A BUG
Alias: None
Product: kdevelop
Classification: Applications
Component: Astyle (show other bugs)
Version: 3.2.1
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
: 114687 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-07-06 22:04 UTC by Gunther Piez
Modified: 2007-12-01 00:46 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.