unbreaking alloca

From: Dag-Erling Smorgrav (des_at_ofug.org)
Date: 06/14/03

  • Next message: Alexander Leidinger: "Re: unbreaking alloca"
    To: arch@freebsd.org
    Date: Sat, 14 Jun 2003 17:27:04 +0200
    
    

    David's latest commit to cdefs.h breaks the build by causing lint to
    fail for every source file that directly or indirectly includes
    <sys/cdefs.h>; it will similarly cause non-GNU compilers to fail on
    the same files. This is entirely unnecessary as the patch was only
    meant to add alloca(3) support on compilers that support it.

    I'd like to commit the attached patch (after suitable testing of
    course). It removes all mention of alloca(3) from cdefs.h, and
    instead modifies the declaration in stdlib.h so that GNU compilers see
    alloca(sz) defined to __builtin_alloca(sz) while other compilers (and
    linters) see a regular prototype.

    I would also like to add (at some future date) a link-time warning for
    alloca(3) similar to what we already have for gets(), mktemp() etc.

    DES

    -- 
    Dag-Erling Smorgrav - des@ofug.org
    
    
    

    _______________________________________________
    freebsd-arch@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-arch
    To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"



  • Next message: Alexander Leidinger: "Re: unbreaking alloca"

    Relevant Pages

    • Re: .mod generation question
      ... when the source file was compiled, the .mod file would be out-of-date ... On the first make after that, the recompilation cascade would occur. ... Sun's makefile expert recently suggested a workable way to avoid ... It can be implemented for many existing compilers, ...
      (comp.lang.fortran)
    • Re: EDS and LSE
      ... VMS' compilers don't care what name you give a ... source file, the input file is always a source file. ... The CXX command ... to us as .CPP, and there are .HXX and/or .HPP header files. ...
      (comp.os.vms)
    • Re: De-referencing pointer to function-pointer
      ... compilers, but it will fail elsewhere, and might fail even with a different ... i have no idea why someone would bother with this bit of undefined behavior ... a function's name without the postfix operator yields a pointer to the ...
      (comp.lang.c)
    • Re: About Visual C++ 2005 Express Edition
      ... Here's a small source file, which should show up the overhead of various ... compilers quite well: ... download link was bad, and the backup site screamed "bad gateway" at me, so ...
      (comp.lang.c)
    • Re: Verilog include paths, relative searches
      ... C compilers and Verilog compilers handle this in different ways. ... current source file, so Stephen's example will work fine in C, but not ... very first Verilog compiler being replicated by all subsequent ...
      (comp.lang.verilog)