Bug 733051 - Decimal float constant suffixes are incorrectly separated
Summary: Decimal float constant suffixes are incorrectly separated
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: indent
Version: 14
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Petr Pisar
QA Contact: Fedora Extras Quality Assurance
URL: https://lists.gnu.org/archive/html/bu...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-08-24 15:15 UTC by Aldy Hernandez
Modified: 2011-09-07 03:23 UTC (History)
1 user (show)

Fixed In Version: indent-2.2.11-4.fc16
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 733265 (view as bug list)
Environment:
Last Closed: 2011-09-07 00:14:51 UTC


Attachments (Terms of Use)
Proposed fix (3.15 KB, patch)
2011-08-25 09:38 UTC, Petr Pisar
no flags Details | Diff

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.


Note You need to log in before you can comment on or make changes to this bug.