Commit Graph

71 Commits

Author SHA1 Message Date
Geoff Keating
9f720c3eba c-common.c (c_common_nodes_and_builtins): The first parameter to __builtin_va_start and __builtin_va_copy is now either a...
* c-common.c (c_common_nodes_and_builtins): The first parameter to
__builtin_va_start and __builtin_va_copy is now either a 'va_list'
or a reference to a va_list.
* builtins.c (stabilize_va_list): Simplify now we don't have to
work around C array address decay.
* c-typeck.c (convert_for_assignment): Handle assignment to
a reference parameter by taking the address of the RHS.
* ginclude/stdarg.h (va_start): Don't take address of first parameter.
(va_copy): Likewise.
(__va_copy): Likewise.
* ginclude/varargs.h (va_start): Likewise.
(__va_copy): Likewise.

From-SVN: r32821
2000-03-30 00:03:14 +00:00
Jason Merrill
512b62fb1b configure.in (i?86-*-beos{pe,elf,}*): Recognize.
* configure.in (i?86-*-beos{pe,elf,}*): Recognize.
        * i386/t-beos, i386/x-beos, i386/xm-beos.h: New files.
        * i386/beos-elf.h, i386/beos-pe.h: New files.

        * Makefile.in (CROSS_SYSTEM_HEADER_DIR): New.
        * cross-make (SYSTEM_HEADER_DIR): Define using
        CROSS_SYSTEM_HEADER_DIR.

        * gcc.c (LIBRARY_PATH_ENV): Provide default.
        (process_command): Use it.
        (main): Likewise.  Kill trailing = from env vars.
        (build_search_list): Put it back.
        * collect2.c (main): Use LIBRARY_PATH_ENV.

        * configure.in (GCC_NEED_DECLARATIONS): Add environ.
        * toplev.c: Use NEED_DECLARATION_ENVIRON.

        * tm.texi (Frame Layout): Document SMALL_STACK.
        * c-common.c (c_common_nodes_and_builtins): Check it.

        * system.h: Undef alloca after including glibc's <stdlib.h>,
        if USE_C_ALLOCA is defined.

        * gcc.c (set_input): New fn.
        (main): After all input files are compiled, reset the input file
        info to the first.

        * aclocal.m4 (rindex, index): If already defined, don't attempt
        to redefine.

        * ginclude/varargs.h: (__va_list__): Define ifndef.
        * ginclude/stdarg.h: Likewise.

        * ginclude/stddef.h (__WCHAR_TYPE__) [BEOS]: Use int
        instead of unsigned char.

        * hash.h (true, false, boolean): Undef before enum.

From-SVN: r31366
2000-01-12 19:37:06 -05:00
Richard Henderson
e05eb76168 cccp.c (main): Define __STDC_VERSION__ as necessary.
* cccp.c (main): Define __STDC_VERSION__ as necessary.
        * cppinit.c (cpp_handle_option): Likewise.

        * ginclude/stdarg.h (va_copy): Use __STDC_VERSION__ to
        determine when to define.

From-SVN: r31022
1999-12-18 20:43:20 -08:00
Richard Henderson
223dca6a20 cppp.c (main): Set trigraphs and __STRICT_ANSI__ as appropriate for -lang-c89 and -std=*.
* cppp.c (main): Set trigraphs and __STRICT_ANSI__ as
        appropriate for -lang-c89 and -std=*.
        * cppinit.c (cpp_handle_option): Likewise.
        (new_pending_define): New, split out from cpp_handle_option.
        * gcc.c (default_compilers): Don't define __STRICT_ANSI__
        or enable trigraphs for -ansi/-std=*.

        * ginclude/stdarg.h (__va_copy): New.
        (va_copy): Don't define for C89.

From-SVN: r30921
1999-12-14 08:05:23 -08:00
Zack Weinberg
fe1dbf6c7c iso646.h, [...]: Add copyright notice and special exception to GPL.
1999-09-23 10:56 -0700  Zack Weinberg  <zack@bitmover.com>

	* iso646.h, stdarg.h, stdbool.h, stddef.h, varargs.h: Add
	copyright notice and special exception to GPL.

From-SVN: r29624
1999-09-23 18:02:55 +00:00
Richard Henderson
8411a90399 stdarg.h, varargs.h: Implement in terms of builtin functions and types.
* ginclude/stdarg.h, ginclude/varargs.h: Implement in
        terms of builtin functions and types.

From-SVN: r29416
1999-09-14 16:30:44 -07:00
David Edelsohn
fdc829c7fa David Edelsohn <edelsohn@gnu.org>
David Edelsohn  <edelsohn@gnu.org>
        * ginclude/stdarg.h (__va_rounded_size): Use long type for
        rounding on AIX.
        * ginclude/varargs.h: Likewise.

From-SVN: r26837
1999-05-07 18:52:36 -07:00
Michael Hayes
9949a9f27a varargs.h: Add support for C4x target.
* ginclude/varargs.h: Add support for C4x target.
        * ginclude/stdargs.h: Likewise.

From-SVN: r22483
1998-09-19 15:27:09 -06:00
Jeffrey A Law
e9818f3c28 stdarg.h: Undo BeOS changes, they break hpux.
* ginclude/stdarg.h: Undo BeOS changes, they break hpux.
        * ginclude/varargs.h: Likewise.

From-SVN: r17116
1997-12-16 13:00:15 -07:00
Fred Fish
c55dcc7ddd cvs commit ChangeLog config.sub configure configure.in toplev.c
From-SVN: r17060
1997-12-11 23:36:11 -07:00
Jeff Law
e9a25f70a0 Update mainline egcs to gcc2 snapshot 971021.
From-SVN: r16278
1997-11-02 14:19:36 -07:00
Jeff Law
66ed068304 Add port done awhile ago for the ARC cpu.
* arc/arc.h: New file.
        * arc/arc.c: New file.
        * arc/arc.md: New file.
        * arc/initfini.c: New file.
        * arc/lib1funcs.asm: New file.
        * arc/t-arc: New file.
        * arc/xm-arc.h: New file.
        * ginclude/va-arc.h: New file.
        * ginclude/stdarg.h: Include va-arc.h ifdef __arc__.
        * ginclude/varargs.h: Likewise.
        * Makefile.in (USER_H): Add va-arc.h.
        * configure.in (arc-*-elf*): Recognize.
        * longlong.h: Add ARC support.
Mostly so I can test changes in snapshot scripts.

        * expr.c (clear_storage): Use CONST0_RTX instead of const0_rtx.
        when clearing non-BLKmode data.
Fixes sparc problem.

From-SVN: r15198
1997-09-09 16:21:04 -06:00
Jeffrey A Law
f84271d99d v850: New directory for v850 port.
* v850: New directory for v850 port.
        * v850/lib1funcs.asm: New file.
        * t-v850, v850.c, v850.h, v850.md, xm-v850.h: New files.
        * ginclude/va-v850.h: New file.
        * varargs.h, stdarg.h: Include va-mn10200.h.
        * configure.in (mn10200-*-*): New target.
        * Makefile.in (USER_H): Add va-mn10200.h.

From-SVN: r15104
1997-09-05 11:43:51 -06:00
Jeff Law
51593cc576 * varargs.h, stdarg.h: Include va-mn10200.h.
From-SVN: r14290
1997-06-23 11:30:34 -06:00
Richard Kenner
1997cb46f7 Protect va_list definition from SCO headers.
From-SVN: r14286
1997-06-22 06:29:26 -04:00
Doug Evans
90e6057ba5 Add m32r support.
From-SVN: r13844
1997-04-07 22:31:52 +00:00
Jeff Law
22ef4e9b59 stdarg.h: Include va-mn10300.h.
* ginclude/stdarg.h: Include va-mn10300.h.
        * ginclude/varargs.h: Likewise.
        * ginclude/va-mn10300.h: New file.
        * mn10300/mn10300.c (expand_prologue): If current_function_varargs is
        nonzero, then flush d0/d1 back into the stack.
        (mn10300_builtin_saveregs): New function.
        (function_arg, function_arg_partial_nregs): New functions.
        (initial_offset): Tweak now that the RP save area is allocated
        and deallocated around each call again.
        * mn10300/mn10300.h (FIRST_PARM_OFFSET): Now 4.
        (FRAME_POINTER_REQUIRED): Require a frame pointer for all non-leaf
        functions.
        (REG_PARM_STACK_SPACE): Now 8 bytes.
        (FUNCTION_ARG_REGNO_P): Update for new parameter passing conventions.
        (CUMULATIVE_ARGS, INIT_CUMULATIVE_ARGS): Likewise.
        (FUNCTION_ARG_ADVANCE, FUNCTION_ARG): Likewise.
        (FUNCTION_ARG_PARTIAL_NREGS): Likewise.
        (TRAMPOLINE_TEMPLATE): Don't clobber d0 anymore.
        (TRAMPOLINE_SIZE, INITIALIZE_TRAMPOLINE): Corresponding changes.
        (EXPAND_BUILTIN_SAVEREGS): Define.
        * mn10300/mn10300.md (call, call_value patterns): Allocate and
        deallocate a stack slot for the return pointer around each call.

        * mn10300/mn10300.h (RTX_COSTS): Refine.
        (CASE_VALUES_THRESHHOLD, NO_FUNCTION_CSE): Likewise.
        * mn10300/mn10300.c (output_tst): New function.
        * mn10300/mn10300.md (movdi, movdf): Improve code to load constants
        into registers.
        (tst insns): Use output_tst to optimize some cases.  Add versions to
        encourage more zero extensions instead of sign extensions of HImode
        and QImode values.
        (divsi3, udivsi3): Remove patterns.  Replaced by...
        (divmodsi4, udivmodsi4): New expanders/patterns.
        (andsi3): Optimize "and" operations with certain constants.

From-SVN: r13827
1997-04-01 18:33:45 -07:00
Richard Kenner
9d661e569a (__va_copy): New definition.
From-SVN: r13804
1997-03-26 07:34:03 -05:00
Jeff Law
d2c4d860c6 mn10300.c: New file for Matsushita MN10300 port.
* mn10300/mn10300.c: New file for Matsushita MN10300 port.
        * mn10300/{mn10300.h,mn10300.md,t-mn10300,xm-mn10300.h}: Likewise.
        * config.sub: Recognize mn10300 as a basic machine type.
        * configure: Similarly.
        * ginclude/stdarg.h: mn10300 is little endian.
        * ginclude/varargs.h: Likewise.

From-SVN: r13281
1996-12-11 14:28:52 -07:00
Doug Evans
d884dca33e Use #include "", not #include <>.
From-SVN: r12893
1996-10-03 22:31:13 +00:00
Doug Evans
1143a698bd stdarg.h: Change __WIN32__ to _WIN32.
* ginclude/stdarg.h: Change __WIN32__ to _WIN32.
	* ginclude/varargs.h: Likewise.
	* ginclude/va-ppc.h: Likewise.

From-SVN: r12651
1996-08-18 01:31:48 +00:00
Michael Meissner
06737be4a3 Fix varargs/stdarg on PowerPC Windows NT
From-SVN: r12637
1996-08-14 15:49:57 +00:00
Jeff Law
8343b898b9 stdarg.h: Handle the H8/S.
* ginclude/stdarg.h: Handle the H8/S.
        * ginclude/varargs.h: Likewise.

From-SVN: r12409
1996-07-08 14:29:33 -06:00
Jim Wilson
385512eb87 Use va-sh.h.
From-SVN: r11485
1996-03-06 16:59:13 -08:00
Richard Kenner
d33fc50c39 Add test for SCO Open Server 5.
From-SVN: r11012
1996-01-15 20:59:42 -05:00
Richard Kenner
ba5c3ac4db (__gnuc_va_list): Make char * for NetBSD.
From-SVN: r10323
1995-09-12 13:04:05 -04:00
Richard Kenner
0c125e9152 Add ppc svr4 calling sequence support.
From-SVN: r10213
1995-08-13 18:19:33 -04:00
Richard Kenner
92c874f7d7 (va_arg): Don't assume __va_rounded_size (char) has the value of 4.
From-SVN: r9550
1995-04-30 08:11:09 -04:00
Richard Kenner
0f2101cc28 Clean up code that defines *DEFINED* symbols.
From-SVN: r9376
1995-04-13 08:50:20 -04:00
Jim Wilson
ed73e9f119 (va_end): Expand to a void expression instead of nothing.
From-SVN: r9074
1995-02-24 18:35:35 -08:00
Richard Kenner
c4f0e4979f Test _VA_LIST_DEFINED macro.
From-SVN: r9014
1995-02-21 18:53:15 -05:00
Jim Wilson
40620dcc93 Delete include of <stdarg.h> when not gcc.
From-SVN: r7691
1994-07-08 19:05:51 -07:00
Richard Kenner
6c68c4abdd Recognize __FreeBSD__.
From-SVN: r7153
1994-04-25 14:22:17 -04:00
Richard Kenner
e9de0fec0f Round to multiple of sizeof(short) on sysV68.
From-SVN: r6972
1994-04-06 06:51:28 -04:00
Jim Wilson
117aea7ad8 (va_start): Pass LASTARG as a parameter to
builtin_next_arg.

From-SVN: r6855
1994-03-23 14:19:23 -08:00
Doug Evans
9d891e9a7e Don't define _STDARG_H/etc. if not gcc, it may collide with system's header.
From-SVN: r6527
1994-02-11 21:03:09 +00:00
Richard Stallman
116c9aab44 Test __bsdi__ like __BSD_NET2__.
From-SVN: r6093
1993-11-15 02:08:56 +00:00
Richard Stallman
237157dc44 [__i860__]: Add to little-endian conditional.
From-SVN: r5906
1993-10-26 23:29:24 +00:00
Doug Evans
0b2c164809 add h8/300h support
From-SVN: r5215
1993-08-26 21:57:10 +00:00
Richard Stallman
51eeee3ed1 [__svr4__ __i860__]: Define _VA_LIST only if not defined already.
From-SVN: r4486
1993-05-17 17:56:32 +00:00
Richard Stallman
9dace10d1b [__svr4__ __i860__] (_VA_LIST): Do define.
From-SVN: r4479
1993-05-16 04:30:47 +00:00
Richard Stallman
b7dd0967b0 [__svr4__]: Test only _VA_LIST_ to avoid dup typedef.
(This used to be if __SVR4_2__.)

From-SVN: r3999
1993-04-04 07:17:15 +00:00
Richard Stallman
d21a91217a Use va-clipper.h.
From-SVN: r3869
1993-03-24 22:41:53 +00:00
Richard Stallman
61a2ac12b3 (_VA_LIST_T_H): Test and define this.
From-SVN: r3547
1993-02-27 00:47:05 +00:00
Richard Stallman
0cd3c247a3 (va_end): #undef before the declaration.
(va_arg): Alternative definition for big-endian machines.

From-SVN: r2820
1992-11-30 23:06:23 +00:00
Richard Stallman
5ce402b71d Don't test, define or undef _VA_LIST_ on NET 2 systems. Don't include ansi.h.
From-SVN: r2736
1992-11-10 15:27:21 +00:00
Richard Stallman
d9832c78fc [4.3 net 2]: If _VA_LIST_, is undefined then va_list is already declared.
Use _ANSI_STDARG_H_, not _ANSI_STDARG_H.

From-SVN: r2670
1992-10-31 21:40:51 +00:00
Richard Stallman
36228d08f2 On Net 2 system, don't test, define or undef _VA_LIST_.
Use _ANSI_H_, __BSD_NET2__ and ____386BSD____ to test for this.

From-SVN: r2658
1992-10-30 09:38:54 +00:00
Richard Stallman
b394f6313d Treat _AIX and _M_UNIX like __svr4__.
From-SVN: r2598
1992-10-25 04:38:49 +00:00
Richard Stallman
6ed0be929c Check and define _ANSI_STDARG_H along with _STDARG_H.
From-SVN: r2547
1992-10-21 22:56:02 +00:00