From: SourceForge.net <no...@so...> - 2009-06-23 16:05:44
|
Support Requests item #2809222, was opened at 2009-06-19 22:18 Message generated for change (Comment added) made by bughunter2 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=202435&aid=2809222&group_id=2435 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: mingw runtime Group: None Status: Open Priority: 5 Private: No Submitted By: bughunter2 (bughunter2) Assigned to: Nobody/Anonymous (nobody) Summary: -ansi flags increases file size Initial Comment: Host System: Windows XP Professional SP3 (build 5.1.2600.xpsp_sp3_gdr.090206-1234) Build Environment: cmd.exe Bug reproducable with: "GNU ld version 2.17.50 20060824" in combination with "gcc (GCC) 3.4.5 (mingw-vista special r3)" "GNU ld (GNU Binutils) 2.19.1" in combination with "gcc (GCC) 4.3.0 20080305 (alpha-testing) mingw-20080502" snippet: <<<<<<<<<<<<<<<<<<<<<< #include <stdio.h> int main(void) { printf("hello, world\n"); return 0; } >>>>>>>>>>>>>>>>>>>>>> If we compile this with `gcc -ansi -s -o test.exe test.c', the output sizes are as follows: 26112 bytes for "gcc 4.3.0 + ld 2.19.1" 27136 bytes for "gcc 3.4.5 + ld 2.17.50" If we compile this with `gcc -s -o test.exe test.c' (no -ansi flag), the output sizes are as follows: 5120 bytes for "gcc 4.3.0 + ld 2.19.1" 5632 bytes for "gcc 3.4.5 + ld 2.17.50" Trying to reproduce the same bug on other platforms (e.g. Linux) doesn't yield the same results, so I expect that this anomaly should be fixed... ---------------------------------------------------------------------- >Comment By: bughunter2 (bughunter2) Date: 2009-06-23 18:05 Message: Not a bug, but an anomaly, I'd say? Is there a good reason as to why the compiled executable increases in size with the -ansi flag? The observed differences can be quite significant. ---------------------------------------------------------------------- Comment By: Earnie Boyd (earnie) Date: 2009-06-23 17:58 Message: Definitely not a bug. ---------------------------------------------------------------------- Comment By: bughunter2 (bughunter2) Date: 2009-06-23 10:44 Message: Well, the differences are even larger for an application I wrote, which, when compiled without -ansi, compiled to a size of roughly ~11KiB, and with -ansi to a size of roughly ~33KiB. ---------------------------------------------------------------------- Comment By: Aaron W. LaFramboise (aaronwl) Date: 2009-06-23 08:26 Message: This is a mingwrt issue. For this simple testcase, it is caused by using a different printf() routine. This is related to Keith's printf improvements. I'm not sure if this is really a bug. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=202435&aid=2809222&group_id=2435 |