Bug 733051

Summary: Decimal float constant suffixes are incorrectly separated
Product: [Fedora] Fedora Reporter: Aldy Hernandez <aldyh>
Component: indentAssignee: Petr Pisar <ppisar>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 14CC: ppisar
Target Milestone: ---Keywords: Patch
Target Release: ---   
Hardware: x86_64   
OS: Linux   
URL: https://lists.gnu.org/archive/html/bug-indent/2011-08/msg00000.html
Whiteboard:
Fixed In Version: indent-2.2.11-4.fc16 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 733265 (view as bug list) Environment:
Last Closed: 2011-09-07 00:14:51 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Proposed fix none

Description Aldy Hernandez 2011-08-24 15:15:11 UTC
Description of problem:
If you have a constant suffix, indent will put a space between the number and the suffix, causing a compilation syntax error.

Example:
double f = 3.0DF;



Version-Release number of selected component (if applicable):
indent-2.2.11-1.fc14.x86_64

How reproducible:

Indent the following, and notice the extra space inserted:

double f = 3.0DF;


Steps to Reproduce:
1.
2.
3.
  
Actual results:

double f = 3.0 DF;

Expected results:

double f = 3.0DF;

Additional info:

Comment 1 Petr Pisar 2011-08-25 08:21:52 UTC
The "DF" suffix is non-standard extension supported by GCC or XLC to utilize decimal float representations on some PowerPC architectures.

Comment 2 Petr Pisar 2011-08-25 08:25:16 UTC
Known decimal float suffixes are "DF", "DD", "DL" and their lower-cased variants.

Comment 3 Petr Pisar 2011-08-25 09:37:17 UTC
All Fedoras affected.

Comment 4 Petr Pisar 2011-08-25 09:38:13 UTC
Created attachment 519798 [details]
Proposed fix

Implementation of decimal float suffixes as sent to upstream.

Comment 5 Fedora Update System 2011-08-25 10:27:16 UTC
indent-2.2.11-4.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/indent-2.2.11-4.fc16

Comment 6 Fedora Update System 2011-08-25 10:27:56 UTC
indent-2.2.11-4.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/indent-2.2.11-4.fc15

Comment 7 Fedora Update System 2011-08-25 10:28:23 UTC
indent-2.2.11-3.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/indent-2.2.11-3.fc14

Comment 8 Aldy Hernandez 2011-08-25 15:55:15 UTC
Thanks for the quick fix.  A small nitpick:

austin:~$ rpm -q indent
indent-2.2.11-3.fc14.x86_64
austin:~$ cat a.c
3DFOR
austin:~$ indent a.c
austin:~$ cat a.c
3DF OR

Surely you don't want to break identifiers this way.  Granted, this is not real code, but just in case...

Again, thank you for the quick fix.  This helps a lot.

Comment 9 Petr Pisar 2011-08-26 07:22:09 UTC
(In reply to comment #8)
> Thanks for the quick fix.  A small nitpick:
> 
> austin:~$ rpm -q indent
> indent-2.2.11-3.fc14.x86_64
> austin:~$ cat a.c
> 3DFOR
> austin:~$ indent a.c
> austin:~$ cat a.c
> 3DF OR
> 
> Surely you don't want to break identifiers this way.  Granted, this is not real
> code, but just in case...
>
Not only real code, identifiers cannot begin with digit in C and indent supports C only.

Comment 10 Fedora Update System 2011-08-26 14:19:27 UTC
Package indent-2.2.11-4.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing indent-2.2.11-4.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/indent-2.2.11-4.fc16
then log in and leave karma (feedback).

Comment 11 Fedora Update System 2011-09-07 00:14:45 UTC
indent-2.2.11-3.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 12 Fedora Update System 2011-09-07 00:15:12 UTC
indent-2.2.11-4.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 13 Fedora Update System 2011-09-07 03:23:05 UTC
indent-2.2.11-4.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.