Richard Stallman
89d7540d7b
(pushdecl): Nested fn decl gets DECL_CONTEXT iff not extern.
...
(grokdeclarator): Make `long long' work even with
-pedantic, despite the warning.
(declare_parm_level): Unconditionally store 1.
(pushdecl): Criterion for no warning is, next level up
is a parm level.
From-SVN: r3555
1993-02-27 19:08:53 +00:00
Richard Stallman
36e6fa6962
(c_decode_option): Handle -Wmissing-braces.
...
From-SVN: r3471
1993-02-13 09:19:04 +00:00
Richard Stallman
1f7586c124
(duplicate_decls): Silently accept harmless mismatch
...
in type of 1st arg of builtin function.
From-SVN: r3455
1993-02-10 08:30:25 +00:00
Richard Stallman
e681c5a107
Add some braces for clarity.
...
From-SVN: r3414
1993-02-02 23:35:04 +00:00
Richard Stallman
030f365a0d
(pushdecl): DECL_EXTERNAL implies TREE_PUBLIC, so test just the latter.
...
From-SVN: r3412
1993-02-02 22:54:34 +00:00
Richard Stallman
90374cc2ff
(finish_decl, grokdeclarator, finish_struct): Report overflows in storage sizes.
...
(finish_decl, grokdeclarator, finish_struct): Report
overflows in storage sizes.
(build_enumerator): Report overflows in enumerators.
From-SVN: r3402
1993-02-02 04:38:30 +00:00
Niklas Hallqvist
5d63b07f42
* c-decl.c (c_build_type_variant): Moved to c-common.c.
...
From-SVN: r3389
1993-01-30 06:06:30 +00:00
Richard Kenner
c81fe25de9
(init_decl_processing): Make the arrays 200 long instead of 10 to
...
leave more room for most names.
From-SVN: r3369
1993-01-27 19:21:30 -05:00
Richard Stallman
fba9adc6d5
(init_decl_processing): Use 10 as size of ..._array_type_node.
...
From-SVN: r3345
1993-01-26 06:51:31 +00:00
Jim Wilson
e5b42a8ce4
(language_string): Delete from here.
...
From-SVN: r3328
1993-01-25 11:48:25 -08:00
Jeff Law
f3c2c11198
c-decl.c (finish_struct): Disable "structure/union defined inside parms" if compiling with -traditional.
...
* c-decl.c (finish_struct): Disable "structure/union defined inside
parms" if compiling with -traditional.
From-SVN: r3327
1993-01-25 11:53:25 -07:00
Richard Stallman
7d9795e552
(lookup_label): Return 0 if not within a function.
...
From-SVN: r3324
1993-01-25 06:36:24 +00:00
Brendan Kehoe
a2468e45b4
c-decl.c (c_decode_option): Set WARN_UNINITIALIZED to 2 with -Wall...
...
* c-decl.c (c_decode_option): Set WARN_UNINITIALIZED to 2 with
-Wall, being careful to preserve it if it's already set.
* cp-decl2.c (lang_decode_option): Likewise.
* toplev.c (main): Warn about using -Wuninitialized without -O.
From-SVN: r3250
1993-01-14 19:35:00 -05:00
Richard Stallman
1f53ee05f8
(init_decl_processing): Declare ffs as builtin.
...
From-SVN: r3201
1993-01-12 08:17:48 +00:00
Paul Eggert
13d39dbc99
# Fix misspellings in comments.
...
From-SVN: r3179
1993-01-10 19:16:01 +00:00
Richard Stallman
58811315a1
(init_decl_processing): Use unsigned_intQI_type_node,
...
not unsigned_char_..., as index type for ..._array_type_node.
(pushdecl): Avoid multiple extern decl mismatch warnings
when previous decl is built-in.
From-SVN: r3167
1993-01-09 09:09:53 +00:00
Jim Wilson
eaa81144e0
(start_decl): Correct order of parameter declarations.
...
From-SVN: r3148
1993-01-07 14:31:22 -08:00
Jim Wilson
feaf9c711c
(pushdecl): Check TREE_PUBLIC in addition to
...
DECL_EXTERNAL decls when looking for duplicate external declarations.
From-SVN: r3013
1992-12-31 12:44:20 -08:00
Richard Stallman
b3fc0c9876
(store_parm_decls): Use TYPE_MAIN_VARIANT to compare types.
...
From-SVN: r2903
1992-12-22 22:56:39 +00:00
Richard Kenner
fa7d8b922c
(start_function): Use TYPE_MAIN_VARIANT when comparing return type
...
with previous prototype declaration.
(init_decl_processing): Don't use hardwired sizes for the modes when
making int{Q,H,S,D}I_type_mode and the unsigned versions of them; the
actual size depends on BITS_PER_UNIT.
From-SVN: r2836
1992-12-04 19:18:55 -05:00
Richard Stallman
32436219b6
(duplicate_decls): For builtins, create new function
...
type instead of trying to modify old one.
(c_decode_option): Decode -Wreturn-type.
From-SVN: r2794
1992-11-25 17:33:21 +00:00
Richard Stallman
4135e766db
(pushdecl): Don't inherit DECL_INLINE when redeclaring the current function.
...
From-SVN: r2773
1992-11-22 21:55:39 +00:00
Richard Stallman
57916f6118
(c_decode_option): Decode -Wreturn-type.
...
From-SVN: r2772
1992-11-22 21:22:32 +00:00
Richard Stallman
14f3e88633
(finish_decl): Don't clear DECL_INITIAL in inline fn decls.
...
From-SVN: r2716
1992-11-08 02:48:04 +00:00
Richard Stallman
b0e919dea6
(pushdecl): Allow redeclaring builtin as any sort of static.
...
From-SVN: r2639
1992-10-28 21:39:12 +00:00
Richard Stallman
7a0347fff3
(shadow_tag_warned): Use pedwarn for useless keyword.
...
(pushdecl): Internally generated vars can be
detected with DECL_SOURCE_LINE of zero, not DECL_IGNORED_P.
(start_enum): Push obstacks, switch to permanent if global.
(finish_enum): Pop obstacks.
(store_parm_decls): When clearing ->names, clear out the values
from the identifiers, restore shadowed values, and clear ->shadowed.
(grokdeclarator): Don't warn of const or volatile function
in a system header file.
(start_struct): Push the obstacks.
Switch to permanent if at top level.
(finish_struct): Pop them.
(store_parm_decls): If we have (erroneously) a prototype
and old-style parm decls, throw away the old-style parm decls.
(finish_decl): Do the pop_obstacks sooner, when it's
time to start allocating in the ambient context's obstack.
Don't call permanent_allocation unless got back to permanent obstack.
(explicit_flag_signed_bitfields): New variable.
(c_decode_option): Set that for -f[un]signed-bitfields.
(grokdeclarator): If that's set, and -fsigned-bitfields,
disregard -traditional when handling bitfield signedness.
From-SVN: r2332
1992-10-06 00:23:17 +00:00
Jim Wilson
c47851ddce
(grokparms): Copy parm list if it isn't permanent,
...
instead of copying it if temporary allocation has been turned off.
From-SVN: r2131
1992-09-15 18:07:05 -07:00
Jim Wilson
fd0b8fce4d
(print_lang_identifier): Print value of limbo field.
...
(pushdecl): Check an extern decl against both previous global and
previous limbo declarations. For global declarations, clear limbo
value field. For block level extern declarations, set limbo field
if zero.
(grokdeclarator): If this is a block level extern, then allocate
it on the permanent obstack, not the temporary obstack.
From-SVN: r2128
1992-09-15 17:54:45 -07:00
Richard Stallman
d847e6a7b5
(duplicate_decls): For file-scope redefinitions,
...
error message distinguishes previous definitions from mere decls.
From-SVN: r2108
1992-09-11 23:22:07 +00:00
Richard Stallman
2d7243898e
(finish_struct): Don't assume that a target integer
...
fits in a HOST_WIDE_INT when checking bit-field widths.
From-SVN: r2105
1992-09-11 08:52:38 +00:00
Richard Stallman
850cba2976
(duplicate_decls): Set DECL_INLINE in newdecl so it is copied into olddecl.
...
Don't set DECL_EXTERNAL in olddecl.
Preserve DECL_UID of olddecl.
From-SVN: r2074
1992-09-07 06:57:50 +00:00
Richard Stallman
023de2924d
(grokparms): Copy arg type list to savable obstack if nec.
...
From-SVN: r2071
1992-09-07 06:08:44 +00:00
Richard Stallman
968e5643fc
(current_block): Function deleted.
...
(set_block): New function.
(poplevel): If using a previously created block,
don't insert it into the parent level.
From-SVN: r2015
1992-09-01 20:30:57 +00:00
Richard Stallman
4ecc65ac4e
(c_decode_option): -fnotraditional really undoes -ftraditional.
...
(c_decode_option): -fnotraditional really undoes
-ftraditional. Handle -fno-traditional also.
From-SVN: r2009
1992-08-31 21:29:49 +00:00
Richard Stallman
6a286015a1
(poplevel): Call `remember_end_note' for each newly created BLOCK node.
...
From-SVN: r1989
1992-08-29 03:19:01 +00:00
James Van Artsdalen
96a1b3afd4
(init_decl_processing): Add sin and cos as built-in functions.
...
From-SVN: r1976
1992-08-28 01:20:34 +00:00
Richard Stallman
5fe5c2100b
(init_decl_processing): Fix type of __builtin_constant_p.
...
From-SVN: r1970
1992-08-27 03:26:06 +00:00
Richard Stallman
3bf40d1882
(poplevel): Store into BLOCK iff it is non-null.
...
(current_block): New function.
(struct binding_level): New field this_block.
(poplevel): Use this_block if nonzero, rather than making new BLOCK.
(insert_block, delete_block): New functions.
From-SVN: r1958
1992-08-26 06:03:24 +00:00
Richard Stallman
0e01e0a2bc
(grokdeclarator): Remove duplicate diagnostic for
...
initialized parameters; start_decl already does this.
From-SVN: r1850
1992-08-14 23:18:12 +00:00
Torbjorn Granlund
858a47b165
Fix spelling errors in comments.
...
From-SVN: r1825
1992-08-14 11:33:04 +00:00
Richard Stallman
70038ec981
Fix typo in previous change.
...
From-SVN: r1823
1992-08-14 08:34:32 +00:00
Richard Stallman
a7f64d523d
(finish_decl): Avoid cascading messages for tentative
...
definitions with incomplete types.
From-SVN: r1821
1992-08-14 08:09:22 +00:00
Richard Stallman
42dfa47fbd
(finish_decl): Don't do expand_decl_init for FUNCTION_DECL.
...
(finish_struct): If bit field is of an unsigned
type that promotes to int, promote it unsigned if traditional
or if it is the same size as int.
(start_function): Ditto for function return value.
(finish_function): Test only can_reach_end for the warning
about reaching the end of a non-void function.
(poplevel): If apparently nested inline function has
DECL_ABSTRACT_ORIGIN, don't output it; propagate TREE_ADDRESSABLE.
(pushdecl): When copying inline details into an extern decl,
copy DECL_RESULT, TREE_ASM_WRITTEN. Set DECL_ABSTRACT_ORIGIN.
From-SVN: r1781
1992-08-07 04:06:43 +00:00
Richard Kenner
530fb43c7b
(init_decl_processing): __builtin_return_address,
...
__builtin_frame_address, and __builtin_saveregs all return void *.
From-SVN: r1733
1992-07-31 08:15:55 -04:00
Richard Stallman
27f427f888
(duplicate_decls): Handle warn_redundant_decls here.
...
But don't warn if function definition follows a declaration.
(pushdecl): Don't handle it here.
(grokparms): Don't warn about non-prototype decl in system header.
From-SVN: r1726
1992-07-31 06:14:04 +00:00
Richard Stallman
fc542d3c82
(duplicate_decls): Copy old RTL *before* make_var_volatile.
...
(pushdecl): Never reuse global fcn decl in place of
local extern; just copy some info from it.
From-SVN: r1699
1992-07-28 02:20:22 +00:00
Richard Stallman
9282f2f99b
(shadow_tag_warned): New function.
...
From-SVN: r1684
1992-07-25 08:06:54 +00:00
Richard Stallman
5fe86b8b83
(duplicate_decls): Use TYPE_MAIN_VARIANT even for compares with void_type_node.
...
(grokdeclarator, get_parm_info, store_parm_decls): Likewise.
From-SVN: r1683
1992-07-24 23:52:30 +00:00
Richard Stallman
24bc4c7f4e
(duplicate_decls, grokdeclarator, finish_struct):
...
Use C_PROMOTING_INTEGER_TYPE_P to decide whether a type promotes.
(start_function): Likewise.
From-SVN: r1666
1992-07-23 06:05:54 +00:00
Richard Stallman
8d7bbe5f87
(finish_struct): Handle nested struct redefinitions.
...
From-SVN: r1593
1992-07-15 18:39:52 +00:00
Richard Stallman
90d56da8ee
(duplicate_decls, pushdecl, grokdeclarator):
...
(store_parm_decls, combine_parm_decls, finish_function):
Use TYPE_MAIN_VARIANT when comparing against specific non-void types.
From-SVN: r1590
1992-07-15 18:34:18 +00:00
Richard Stallman
0d5280589c
(finish_function): Fix braino validating ret type of main.
...
From-SVN: r1583
1992-07-14 00:57:11 +00:00
Richard Stallman
1394aabdaa
Renamed TREE_INLINE...
...
Renamed TREE_INLINE, TREE_NONLOCAL, TREE_REGDECL, TREE_EXTERNAL
to DECL_INLINE, DECL_NONLOCAL, DECL_REGISTER, DECL_EXTERNAL.
From-SVN: r1569
1992-07-12 02:56:45 +00:00
Richard Stallman
874a7be13c
(build_enumerator): Use STRIP_TYPE_NOPS.
...
From-SVN: r1550
1992-07-10 01:50:35 +00:00
Richard Stallman
cd7a1451a9
(build_enumerator): Fix error in last change.
...
From-SVN: r1538
1992-07-09 06:11:19 +00:00
Richard Stallman
07c5ab5508
(finish_struct, build_enumerator): Use STRIP_NOPS.
...
From-SVN: r1535
1992-07-08 23:31:23 +00:00
Richard Kenner
fa142928c5
(grokdeclarator): Strip all NOP_EXPRs from SIZE.
...
From-SVN: r1523
1992-07-08 11:42:33 -04:00
Richard Stallman
592252adb8
(duplicate_decls): Let char *foo () match void *foo ()
...
only if one of them came from a system header file.
From-SVN: r1495
1992-07-07 02:11:08 +00:00
Richard Stallman
e2f6a3cfee
(duplicate_decls): Merge DECL_IN_SYSTEM_HEADER between duplicate decls.
...
From-SVN: r1492
1992-07-07 01:47:54 +00:00
Richard Stallman
8e077183b4
(finish_function): If return type of main' is not
int',
...
warn instead of doing DEFAULT_MAIN_RETURN.
From-SVN: r1486
1992-07-07 01:09:25 +00:00
Richard Kenner
8d9bfdc59d
Changes to support execution on 64-bit machines.
...
From-SVN: r1484
1992-07-06 18:35:53 -04:00
Richard Stallman
47429a02bb
(grokdeclarator): Make `long long long' an error, not a warning.
...
(grokdeclarator): Make `long long long' an error, not a
warning. Make duplicate qualifiers do pedwarn, not warning.
From-SVN: r1453
1992-07-05 22:22:43 +00:00
Richard Stallman
1600ec6700
(pushdecl): Always create a new (variant) ..._TYPE node
...
for each new TYPE_DECL node created.
From-SVN: r1451
1992-07-05 21:55:50 +00:00
Richard Stallman
960a2eb1d1
(duplicate_decls): Don't warn about disagreement in `inline' except when...
...
(duplicate_decls): Don't warn about disagreement in `inline'
except when non-inline fn is made inline after a call or definition.
(finish_function): Set BLOCK_SUPERCONTEXT of outer block.
From-SVN: r1449
1992-07-05 21:12:43 +00:00
Richard Stallman
c9c30903ff
(named_labels): Change linkage to static.
...
From-SVN: r1405
1992-07-03 20:23:56 +00:00
Richard Stallman
ac4f24e7d9
Added declarations for mode-related internal type nodes.
...
(init_decl_processing): Initialize the new type nodes.
From-SVN: r1398
1992-07-03 06:41:45 +00:00
Richard Stallman
ee534ebfe9
(grokdeclarator): Don't mark file-scope register variables as TREE_PUBLIC.
...
From-SVN: r1379
1992-07-01 21:40:06 +00:00
Richard Stallman
4c41bbfa76
(ALLOCA_FLAGS, ALLOCA_FINISH, AS): Deleted.
...
(INSTALL): Deleted.
(duplicate_decls): If newdecl for builtin function
has same return mode as the builtin, keep the builtin
but use newdecl's return type.
From-SVN: r1366
1992-07-01 02:20:59 +00:00
Richard Stallman
8fcd361eac
(lookup_label): Call label_rtx.
...
From-SVN: r1362
1992-07-01 00:58:07 +00:00
Richard Stallman
664b4b1e04
(duplicate_decls): If have char *foo () and void *foo (...),
...
make just a pedwarn. Add locals oldtype, newtype.
Not that previous log entry was a mistake.
From-SVN: r1333
1992-06-29 04:54:53 +00:00
Richard Stallman
a4219ac740
(initializer_constant_valid_p): Allow CONVERT_EXPR if its operand is ok.
...
(build_c_cast): For cast to union, make a CONSTRUCTOR.
From-SVN: r1331
1992-06-29 04:26:19 +00:00
Richard Stallman
6b19af32d6
(builtin_function): Set C_DECL_ANTICIPATED for user-visible names.
...
From-SVN: r1285
1992-06-25 10:53:19 +00:00
Jim Wilson
a4faa7cc6e
(store_parm_decls): Change type of void parameter to error_mark_node.
...
From-SVN: r1246
1992-06-23 16:15:52 -07:00
Richard Stallman
4d06f14570
(duplicate_decls): If an old decl becomes volatile, fix the DECL_RTL.
...
From-SVN: r1230
1992-06-22 01:35:52 +00:00
Richard Stallman
52b6a22f22
(duplicate_decls):
...
If redeclaring builtin function, use new declaration's types.
From-SVN: r1228
1992-06-21 21:18:59 +00:00
Richard Stallman
e841f997bc
(duplicate_decls): Never warn if redeclaring a predeclared function.
...
(duplicate_decls): Never warn if redeclaring
a predeclared function. Use the new declaration's types
but keep any predeclared volatile flag.
From-SVN: r1227
1992-06-21 21:15:34 +00:00
Richard Stallman
e38e5ba82f
entered into RCS
...
From-SVN: r1159
1992-06-04 21:30:48 +00:00
Richard Stallman
f0a45d37ea
*** empty log message ***
...
From-SVN: r1124
1992-05-29 20:12:30 +00:00
Richard Stallman
1ce634c39f
*** empty log message ***
...
From-SVN: r1078
1992-05-25 03:57:15 +00:00
Richard Kenner
101777b6cb
*** empty log message ***
...
From-SVN: r1059
1992-05-22 18:08:21 -04:00
Richard Kenner
4803a34aa2
*** empty log message ***
...
From-SVN: r1057
1992-05-22 17:22:42 -04:00
Richard Stallman
b032c74c6f
*** empty log message ***
...
From-SVN: r1053
1992-05-22 20:41:45 +00:00
Richard Stallman
7da551a2e8
*** empty log message ***
...
From-SVN: r1052
1992-05-22 20:33:20 +00:00
Richard Stallman
2bae939e78
*** empty log message ***
...
From-SVN: r1050
1992-05-22 19:11:09 +00:00
Richard Stallman
93e3ba4f76
*** empty log message ***
...
From-SVN: r1006
1992-05-18 05:09:24 +00:00
Richard Stallman
64309441e0
*** empty log message ***
...
From-SVN: r1001
1992-05-17 19:29:11 +00:00
Richard Stallman
8eebb25825
*** empty log message ***
...
From-SVN: r983
1992-05-15 02:18:01 +00:00
Richard Stallman
a8031c4edc
*** empty log message ***
...
From-SVN: r944
1992-05-09 06:40:01 +00:00
Richard Stallman
9a509bfef1
*** empty log message ***
...
From-SVN: r880
1992-05-04 03:37:06 +00:00
Tom Wood
9c4614c3f8
*** empty log message ***
...
From-SVN: r862
1992-05-01 01:51:23 +00:00
Richard Stallman
9e3c9e1bf6
*** empty log message ***
...
From-SVN: r854
1992-04-28 23:51:24 +00:00
Richard Stallman
27301b30a8
*** empty log message ***
...
From-SVN: r777
1992-04-18 17:24:48 +00:00
Richard Kenner
fc3ffe8309
*** empty log message ***
...
From-SVN: r754
1992-04-16 22:05:56 -04:00
Tom Wood
77f934bbbf
*** empty log message ***
...
From-SVN: r732
1992-04-13 10:58:19 +00:00
Michael Meissner
ec2343c432
*** empty log message ***
...
From-SVN: r679
1992-04-04 08:50:38 +00:00
Richard Stallman
929f36717e
*** empty log message ***
...
From-SVN: r572
1992-03-23 02:07:53 +00:00
Richard Stallman
c138f3280d
*** empty log message ***
...
From-SVN: r423
1992-03-08 22:08:20 +00:00
Richard Stallman
51e2940139
Initial revision
...
From-SVN: r319
1992-02-13 22:21:26 +00:00