Paul Eggert
10d5caece7
(c_sizeof, build_c_cast): Set TREE_OVERFLOW in addition to TREE_CONSTANT_OVERFLOW.
...
(c_sizeof, build_c_cast): Set TREE_OVERFLOW in addition
to TREE_CONSTANT_OVERFLOW.
(store_init_value): STRIP_TYPE_NOPS is required before
constant_expression_warning.
From-SVN: r4825
1993-07-02 01:26:01 +00:00
Richard Stallman
d6272e453d
(check_format): Don't crash if cur_type is an error_mark.
...
Handle identifier_node as the TYPE_NAME.
From-SVN: r4682
1993-06-16 20:27:18 +00:00
Richard Stallman
2df3497474
(convert_for_assignment): Allow conversion to union type
...
for pointer if the pointer could convert to the union member.
From-SVN: r4634
1993-06-05 09:08:32 +00:00
Richard Stallman
3ee1e240fe
(process_init_constructor): Never set current_index
...
itself--always store into current_index_node.
From-SVN: r4591
1993-05-29 03:48:35 +00:00
Richard Stallman
5c73b269e7
(convert_for_assignment): When allowing mixing of
...
signed and unsigned pointers, compare unsigned types not type sizes.
From-SVN: r4580
1993-05-27 04:30:54 +00:00
Richard Stallman
ec193993f9
(default_conversion): Don't replace iterator with its initial value.
...
From-SVN: r4452
1993-05-14 17:14:17 +00:00
Jim Wilson
ea8dd78442
(pointer_diff): Error if op1 is pointer to incomplete type.
...
From-SVN: r4367
1993-05-06 11:02:26 -07:00
Richard Stallman
619fdc9c7a
(convert_for_assignment): Don't use convert_and_check
...
when handling arithmetic types here.
From-SVN: r4358
1993-05-06 16:02:40 +00:00
Richard Stallman
fe9ef5d7b7
(digest_init): Check size properly for wide-string.
...
From-SVN: r4309
1993-05-03 23:02:49 +00:00
Richard Stallman
8efabd131f
(default_conversion): Undo last change.
...
From-SVN: r4283
1993-04-30 12:42:41 +00:00
Richard Stallman
e855c5ce20
(default_conversion): Pass through non-lvalue arrays without any conversion and/or error messages.
...
(default_conversion): Pass through non-lvalue arrays
without any conversion and/or error messages. Such operands are
perfectly OK in many contexts.
(build_conditional_expr): Do default_conversion
before testing for ERROR_MARK.
From-SVN: r4281
1993-04-30 00:54:54 +00:00
Richard Kenner
550707f7e4
(readonly_warning): Correctly check for assignments to iterators.
...
From-SVN: r4193
1993-04-23 06:52:08 -04:00
Tom Wood
392202b07d
*** empty log message ***
...
From-SVN: r4192
1993-04-22 11:48:29 +00:00
Richard Stallman
08632da2b6
Comment change.
...
From-SVN: r4152
1993-04-14 17:29:55 +00:00
Richard Kenner
73a424d3a2
(error_init, pedwarn_init): Cast alloca result to char *.
...
From-SVN: r4133
1993-04-13 16:58:17 -04:00
Richard Stallman
0b1dffa7f1
(digest_init): Don't call default_conversion before convert_for_assignment.
...
(parser_build_binary_op): Make NOP_EXPR, not NON_LVALUE_EXPR.
From-SVN: r4129
1993-04-13 20:29:47 +00:00
Jim Wilson
29df70e6ff
(internal_build_compound_expr): When pedantic...
...
(internal_build_compound_expr): When pedantic, don't
simplify a COMPOUND_EXPR, so that it won't be mistaken for an
lvalue or an integer constant expression.
From-SVN: r4102
1993-04-12 12:44:47 -07:00
Jim Wilson
fe67cf58ff
(free_tree_list): New variable.
...
(digest_init): Set free_tree_list.
(process_init_constructor): Use add_double to do arithmetic with
double integers instead of using fold/build to to arithmetic in
type of array index. Use free_tree_list when available instead of
generating a new tree_list.
From-SVN: r4074
1993-04-09 17:02:10 -07:00
Tom Wood
8b40563cd8
(comptypes, convert_for_assignment): Check for Objective-C protocols (non-reflexive use of maybe_objc_comptypes).
...
(comptypes, convert_for_assignment): Check for
Objective-C protocols (non-reflexive use of maybe_objc_comptypes).
(comp_target_types): Rewrite so that maybe_objc_comptypes checks
protocols when processing an Objective-C module. For C modules,
the code path is unchanged.
(convert_for_assignment): Improve the error message for
incompatible message arguments.
From-SVN: r4067
1993-04-09 23:11:51 +00:00
Richard Stallman
103b7b1789
(process_init_constructor, digest_init):
...
Check and set new static var partial_bracket_mentioned.
From-SVN: r3899
1993-03-28 05:48:46 +00:00
Richard Stallman
466e9220fd
(initializer_constant_valid_p): Handle COMPLEX_CST.
...
From-SVN: r3820
1993-03-22 05:32:42 +00:00
Richard Stallman
337633f9c6
(digest_init): Typo in last change.
...
From-SVN: r3785
1993-03-19 08:44:43 +00:00
Richard Stallman
0c9cfa6f4f
(digest_init): Handle COMPLEX_TYPE like other scalars.
...
From-SVN: r3779
1993-03-18 21:31:09 +00:00
Richard Stallman
b6a10c9fe1
(common_type): Handle complex types.
...
(lvalue_p): Handle REALPART_EXPR, IMAGPART_EXPR.
(build_binary_op, build_unary_op): Handle complex types.
From-SVN: r3646
1993-03-04 20:36:23 +00:00
Richard Stallman
6bc4e3d04f
(build_unary_op): Warn if increment `struct unknown *'.
...
From-SVN: r3585
1993-03-02 03:07:56 +00:00
Richard Stallman
3791970daf
(readonly_warning): Warn about assignment to iterator.
...
From-SVN: r3578
1993-03-02 02:03:36 +00:00
Richard Stallman
db9e5545df
(fake_f_rep): Clear all of u, initially.
...
Make the ints in u unsigned.
(f_define): Use ordinary constants for long double
if it's same width as double.
Make __convert_long_double_i unsigned.
(convert_for_assignment): Typo in last change.
From-SVN: r3567
1993-02-28 04:18:38 +00:00
Richard Stallman
9b7267b844
(convert_for_assignment): New arg FUNDECL. Calls changed.
...
(convert_arguments): New arg FUNDECL.
(build_function_call): Pass function to convert_arguments, if a decl.
(convert_for_assignment): Automatically convert
to a union from its members' types.
(process_init_constructor): Error msg change.
(initializer_constant_valid_p): Allow cast of ptr to wider integer.
From-SVN: r3566
1993-02-27 22:12:42 +00:00
Richard Stallman
870cc33b82
(build_indirect_ref): Avoid *& short-cut if -fvolatile.
...
From-SVN: r3475
1993-02-16 06:29:26 +00:00
Richard Stallman
815a862a12
(process_init_constructor): Test warn_missing_braces.
...
From-SVN: r3470
1993-02-13 09:17:25 +00:00
Richard Stallman
cf6d9b9c00
(build_indirect_ref): If arg is void *, just warn.
...
From-SVN: r3469
1993-02-13 05:41:28 +00:00
Richard Stallman
53b01f59f9
(build_c_cast): Bypass default_conversion when casting to void.
...
From-SVN: r3423
1993-02-05 23:00:46 +00:00
Richard Stallman
5abb45f22e
(build_conditional_expr): Always convert and check
...
both result operands even if condition is constant.
From-SVN: r3415
1993-02-02 23:37:23 +00:00
Richard Stallman
e58cd767bb
(parser_build_binary_op): Warn about overflows and conversions of out-of-range...
...
(parser_build_binary_op): Warn about overflows and
conversions of out-of-range constants in parser-built binary expressions.
(build_conditional_expr): Check conversions in if-then-else expressions.
(build_c_cast): Ignore any integer overflow caused by a cast.
(convert_for_assignment): Warn if source had overflow in folding.
(process_init_constructor): Report overflows in array initializer indexes.
From-SVN: r3404
1993-02-02 04:40:04 +00:00
Doug Evans
43a5a54258
* (build_compound_expr): insert missing return
...
From-SVN: r3394
1993-01-30 23:46:58 +00:00
Michael Meissner
82bde8543b
Do not give a warning for a plain 0 used in a pointer context.
...
From-SVN: r3322
1993-01-25 03:40:07 +00:00
Richard Stallman
439f602793
(build_compound_expr): Use non_lvalue if value is 0.
...
From-SVN: r3277
1993-01-19 15:09:34 +00:00
Richard Stallman
fa42713123
(c_sizeof): Call force_fit_type only for INTEGER_CST.
...
From-SVN: r3103
1993-01-05 22:52:25 +00:00
Jim Wilson
315da53528
(build_binary_op): Add 'right' and 'left' to shift
...
count warnings to distinguish them from each other.
From-SVN: r3048
1993-01-01 16:44:24 -08:00
Richard Kenner
1eca8b1e33
(build_binary_op): Handle TRUTH_XOR_EXPR.
...
From-SVN: r2998
1992-12-30 06:14:08 -05:00
Richard Stallman
f7c8fb3f49
(c_sizeof, c_sizeof_nowarn, c_size_in_bytes): Call force_fit_type with
...
end result.
From-SVN: r2996
1992-12-30 11:09:58 +00:00
Richard Kenner
accdfaab89
(build_indirect_ref): See volatility from flag_volatile.
...
From-SVN: r2974
1992-12-28 06:10:05 -05:00
Richard Kenner
8d162cabbb
(check_format): Using both a precision and the `0' flag is only a problem on `d'...
...
(check_format): Using both a precision and the `0' flag is only a
problem on `d', `i', `o', `u', `x', and `X' conversions.
From-SVN: r2915
1992-12-26 18:11:58 -05:00
Richard Stallman
ee71df465a
(build_unary_op): Call pedantic_lvalue_warning
...
for *all* cases of incrementing a cast.
From-SVN: r2811
1992-11-26 22:40:09 +00:00
Richard Stallman
d14774f07b
(process_init_constructor): Strip NOP_EXPR from indices.
...
Clear end_index if there's an error in a range.
From-SVN: r2730
1992-11-10 14:20:47 +00:00
Richard Stallman
c9b7f31c92
(build_c_cast): Don't warn about size change between
...
pointer and integer if the value is constant.
From-SVN: r2645
1992-10-29 06:06:53 +00:00
Richard Stallman
d3c738e1ce
(print_table, scan_table): Add support for XPG4's %S and %C formats for printing/reading wide characters.
...
(print_table, scan_table): Add support for XPG4's %S and %C formats
for printing/reading wide characters. %lc and %ls too.
From-SVN: r2522
1992-10-20 07:37:27 +00:00
Richard Stallman
c2f4acb703
(process_init_constructor): When initializing a union,
...
handle the case of an empty init list.
From-SVN: r2507
1992-10-18 08:12:53 +00:00
Richard Stallman
8706edbc5c
(build_unary_op): Address of nested fcn isn't constant.
...
From-SVN: r2268
1992-09-28 16:07:29 +00:00
Richard Stallman
1bbe928048
(initializer_constant_valid_p): Really use endtype.
...
From-SVN: r2249
1992-09-25 22:31:38 +00:00