c/4317: main() {return 0;} does not compile correctly

s.ryll@web.de s.ryll@web.de
Thu Sep 13 08:46:00 GMT 2001


>Number:         4317
>Category:       c
>Synopsis:       main() {return 0;} does not compile correctly
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Sep 13 08:46:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Steffen Ryll
>Release:        GCC 3.0.1
>Organization:
>Environment:
GCC version:
Reading specs from /usr/local/gcc-3.0.1/lib/gcc-lib/i586-pc-linux-gnu/3.0.1/specs
Configured with: ../gcc-3.0.1/configure --with-gnu-ld --with-gnu-as --prefix=/usr/local/gcc-3.0.1
Thread model: single
gcc version 3.0.1


System environment:
i586-pc-linux-gnu


>Description:
Background:
I wondered, why several configure-scripts regarded gcc-3.0.1 as a cross compiler. The attached _simple_ program demonstrates that. It compiles without errors, but at runtime the program exits with a segmentation fault.
Somewhat strange...

Compiler output:

none

Preprocessor file:
see attachment

Options given at GCC compile-time:
Configured with: ../gcc-3.0.1/configure --with-gnu-ld --with-gnu-as --prefix=/usr/local/gcc-3.0.1
Built with: make bootstrap

>How-To-Repeat:
/usr/local/gcc-3.0.1/bin/gcc -o conftest conftest.c

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="conftest.i"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="conftest.i"

IyAxICJjb25mdGVzdC5jIgoKIyA4ODkgImNvbmZpZ3VyZSIKCiMgMSAiY29uZmRlZnMuaCIgMQoK
IyA4OTAgImNvbmZpZ3VyZSIgMgoKCm1haW4oKXsKcmV0dXJuIDA7Cn0K



More information about the Gcc-bugs mailing list