astyle formatter breaks the specific code in a very bad way
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
astyle |
Unknown
|
Unknown
|
|||
astyle (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Description: Ubuntu 12.04 LTS
Release: 12.04
astyle:
Installed: 2.01-1
Pass the code:
void foo() {
if (a < b) dst[c] = (d >> e ) & 0xF;
}
through astyle -j . The result is:
void foo() {
if (a < b) dst[c] = (d >> e ) {
& 0xF;
}
}
The expected result shall be:
void foo() {
if(a<b) {
dst[c] = (d >> e ) & 0xF;
}
}
ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: astyle 2.01-1
ProcVersionSign
Uname: Linux 3.2.0-29-generic x86_64
ApportVersion: 2.0.1-0ubuntu13
Architecture: amd64
Date: Wed Sep 12 12:48:52 2012
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Release amd64 (20120425)
ProcEnviron:
TERM=xterm
PATH=(custom, user)
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: astyle
UpgradeStatus: No upgrade log present (probably fresh install)
The upstream bug https:/ /sourceforge. net/tracker/ ?func=detail& aid=3566987& group_id= 2319&atid= 102319 has been created.