From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20026 invoked by alias); 4 Jul 2011 10:59:08 -0000 Received: (qmail 20013 invoked by uid 22791); 4 Jul 2011 10:59:07 -0000 X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,TW_GJ X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 04 Jul 2011 10:58:52 +0000 From: "joseph at codesourcery dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/46261] avr-gcc: Segfaults when compiled with the -mint8 option X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: joseph at codesourcery dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Mon, 04 Jul 2011 10:59:00 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2011-07/txt/msg00190.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46261 --- Comment #21 from joseph at codesourcery dot com 2011-07-04 10:58:14 UTC --- On Sat, 2 Jul 2011, gjl at gcc dot gnu.org wrote: > > Indeed, I simply made all bare-metal targets use newlib-stdint.h as a > > default, but since AVR has its own libc it seems more appropriate to put > > the defines in avr-stdint.h or avr.h and not use newlib-stdint.h. (And > > the point of having separate headers such as newlib-stdint.h is that there > > may not otherwise be a header shared between all relevant targets. If all > > AVR targets use avr-libc, putting the defines in avr.h makes sense, but if > > avr-rtems is using newlib like other RTEMS targets then you probably want > > a separate header only for AVR targets using avr-libc.) > > The extra header is not needed because of avr-libc; there is nothing special > about avr-libc and it conforms to the standard (except when you explicitely Headers such as newlib-stdint.h tell GCC about the details of choices made by the libc implementation where more than one choice would conform to the standard. Thus, if avr-libc has made any choices relating to stdint.h different from the choices made by newlib, a separate header may be needed for that reason alone. (All the gcc.dg/c99-stdint-*.c tests should pass; if any fail, that suggests either a header bug or a requirement for GCC to change how these types are configured in GCC for AVR.)