Bug 114687 - Source formatter messes up literal arrays and compounds
Summary: Source formatter messes up literal arrays and compounds
Status: RESOLVED DUPLICATE of bug 108666
Alias: None
Product: kdevelop
Classification: Applications
Component: Astyle (other bugs)
Version First Reported In: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-19 15:15 UTC by Gunther Piez
Modified: 2005-10-20 15:18 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gunther Piez 2005-10-19 15:15:51 UTC
Version:            (using KDE KDE 3.4.92)
Installed from:    Gentoo Packages

Example:

struct foo {
	int x;
	char y;
};

int main() {
	int a = (int[]) { 1,2,3 } [2];
	foo b = (foo) { 4711, 'b' };
}


becomes


struct foo {
	int x;
	char y;
};

int main() {
	int a = (int[]) {
		        1,2,3
	        }
	        [2];
	foo b = (foo) {
		        4711, 'b'
	        };
}

This is very ugly, especially when used in function calls, where literals are most useful.
Comment 1 Matt Rogers 2005-10-20 02:10:07 UTC

*** This bug has been marked as a duplicate of 108666 ***
Comment 2 Gunther Piez 2005-10-20 15:18:58 UTC
Sure this is a duplicate?
Here some new lines are introduced, but the program stays the same. In 108666 the contents of a string and the program is changed.

But http://bugs.kde.org/show_bug.cgi?id=71574 is probably the same bug.

Or is every "astyle messes up something" considered to be the same bug? :-)