Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#28284 - [mcpp] mcpp -C doesn't work as expected.

Attached to Project: Arch Linux
Opened by Renato Cunha (trovao) - Monday, 06 February 2012, 11:18 GMT
Last edited by Jan de Groot (JGC) - Friday, 18 May 2012, 11:58 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Jan de Groot (JGC)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:

When processing files with one line comments on structs, "mcpp -C" comments the whole field, making it unusable.

Additional info:
* package version: mcpp-2.7.2-3-x86_64.pkg.tar.xz

Steps to reproduce:

1. Download the attached C file (test.c);
2. Call "mcpp -C /path/to/test.c"
3. See the following output:

$ mcpp -C test.c
#line 1 "/tmp/test.c"
struct test {
// A test field int testfield;
};

Expected results:

A preprocessed file with comments.

How to fix it:

The attached patch (mcpp-comments.patch), found on ZeroC's ice forums, seems to solve the problem, and making a package with the patch applied gives the following output:

$ mcpp -C test.c
#line 1 "/tmp/test.c"
struct test {
// A test field

#line 2 "/tmp/test.c"
int testfield;
};

This task depends upon

Closed by  Jan de Groot (JGC)
Friday, 18 May 2012, 11:58 GMT
Reason for closing:  Implemented
Comment by Renato Cunha (trovao) - Monday, 06 February 2012, 11:20 GMT
The relevant thread on the Ice forums is http://www.zeroc.com/forums/bug-reports/5309-mishap-slice-compilers.html
And the status of this patch on FreeBSD's ports: http://www.freebsd.org/cgi/query-pr.cgi?pr=155934
Comment by Renato Cunha (trovao) - Thursday, 01 March 2012, 13:02 GMT
Is there any reason it hasn't been applied or tested?

I am currently using a patched package here and it seems to work fine. Also, I can provide a patched PKGBUILD if necessary.

Loading...