Public bug reported:

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
ProcVersionSignature: Ubuntu 3.2.0-29.46-generic 3.2.24
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)

** Affects: astyle (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug precise running-unity

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1049606

Title:
  astyle formatter breaks the specific code in a very bad way

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/astyle/+bug/1049606/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to