]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
Fix duplicate symbol errors in Darwin bootstrap.
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
8f94a8c4
JJ
12014-12-17 Jakub Jelinek <jakub@redhat.com>
2
3 PR sanitizer/64289
4 * c-convert.c: Include ubsan.h.
5 (convert): For real -> integral casts and
6 -fsanitize=float-cast-overflow don't call convert_to_integer, but
7 instead instrument the float cast directly.
8
b731b390
JJ
92014-11-29 Jakub Jelinek <jakub@redhat.com>
10
11 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
12 c_finish_stmt_expr): Remove NULL last argument from
13 create_tmp_var_raw and create_tmp_var calls.
14 * c-array-notation.c (fix_builtin_array_notation_fn,
15 build_array_notation_expr, fix_conditional_array_notations_1,
16 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
17
541e35a6
MP
182014-11-28 Marek Polacek <polacek@redhat.com>
19
20 PR c/63862
21 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
22 convert the right operand to integer type.
23
b286be94
MP
242014-11-25 Marek Polacek <polacek@redhat.com>
25
26 PR c/63877
27 * c-decl.c (start_function): Disable -Wmissing-declarations warning
28 for inline functions.
29
aa7da51a
JJ
302014-11-21 Jakub Jelinek <jakub@redhat.com>
31
32 PR target/63764
33 * c-typeck.c (build_array_ref): Adjust
34 convert_vector_to_pointer_for_subscript caller. If it returns true,
35 call non_lvalue_loc on the result.
36
d876207f
RB
372014-11-11 Richard Biener <rguenther@suse.de>
38
39 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
40 to true.
41
e5e44252
AK
422014-11-10 Andi Kleen <ak@linux.intel.com>
43
44 PR c/60804
45 * c-parser.c (c_parser_statement_after_labels): Call
46 check_no_cilk.
47 (c_parser_if_statement): Dito.
48 (c_parser_switch_statement): Dito.
49 (c_parser_while_statement): Dito.
50 (c_parser_do_statement): Dito.
51 (c_parser_for_statement): Dito.
52 * c-typeck.c (c_finish_loop): Dito.
53
13c21655
PC
542014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
55
56 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
57 OPT_Wshift_count_overflow in the warnings.
58
2d51fcef
MP
592014-10-30 Marek Polacek <polacek@redhat.com>
60
61 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
62 print the stripped version as well, if they're not the same.
63
ef4bddc2
RS
642014-10-29 Richard Sandiford <richard.sandiford@arm.com>
65
66 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
67 machine_mode.
68
c582198b
AM
692014-10-28 Andrew MacLeod <amacleod@redhat.com>
70
71 * c-decl.c: Adjust include files.
72 * c-parser.c: Ditto.
73
ddc8de03
PM
742014-10-27 Phil Muldoon <pmuldoon@redhat.com>
75 Tom Tromey <tromey@redhat.com>
76
77 * c-tree.h (enum c_oracle_request): New.
78 (c_binding_oracle_function): New typedef.
79 (c_binding_oracle, c_pushtag, c_bind): Declare.
80 * c-decl.c (c_binding_oracle): New global.
81 (I_SYMBOL_CHECKED): New macro.
82 (i_symbol_binding): New function.
83 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
84 (I_TAG_CHECKED): New macro.
85 (i_tag_binding): New function.
86 (I_TAG_BINDING, I_TAG_DECL): Redefine.
87 (I_LABEL_CHECKED): New macro.
88 (i_label_binding): New function.
89 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
90 (c_print_identifier): Save and restore c_binding_oracle.
91 (c_pushtag, c_bind): New functions.
92
60393bbc
AM
932014-10-27 Andrew MacLeod <amacleod@redhat.com>
94
95 * c-typeck.c: Adjust include files.
96
d723bb7c
MLI
972014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
98
99 PR c++/53061
100 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
101 initialization here...
102 (c_initialize_diagnostics): ... but here. Set defaults after
103 building pretty-printer.
104
1bc5a451
MP
1052014-10-23 Marek Polacek <polacek@redhat.com>
106
107 PR c/63626
108 * c-decl.c (pop_scope): Don't print warning in external_scope.
109
4435bb92
MP
1102014-10-19 Marek Polacek <polacek@redhat.com>
111
112 PR c/63567
113 * c-typeck.c (output_init_element): Allow initializing objects with
114 static storage duration with compound literals even in C99 and add
115 pedwarn for it.
116
7278465e
MP
1172014-10-17 Marek Polacek <polacek@redhat.com>
118
119 PR c/63567
120 * c-typeck.c (digest_init): Allow initializing objects with static
121 storage duration with compound literals even in C99 and add pedwarn
122 for it.
123
d9b7be2e
MP
1242014-10-17 Marek Polacek <polacek@redhat.com>
125
126 PR c/63543
127 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
128 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
129 error multiple times. Print the type.
130
f406ae1f
MP
1312014-10-17 Marek Polacek <polacek@redhat.com>
132
133 PR c/63549
134 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
135 type.
136
92574c7c
MP
1372014-10-17 Marek Polacek <polacek@redhat.com>
138
139 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
140 (start_function): Use OPT_Wimplicit_int instead of 0.
141 (store_parm_decls_oldstyle): Likewise.
142
1bc4a978
MT
1432014-10-17 Alan Modra <amodra@gmail.com>
144
145 PR middle-end/61848
146 * c-decl.c (merge_decls): Don't merge section name or tls model
147 to newdecl symtab node, instead merge to olddecl. Override
148 existing olddecl section name. Set tls_model for all thread-local
149 vars, not just OMP thread-private ones. Remove incorrect comment.
150
83685514
AM
1512014-10-16 Andrew MacLeod <amacleod@redhat.com>
152
153 * c-decl.c: Adjust include files.
154
78a7c317
DD
1552014-10-14 DJ Delorie <dj@redhat.com>
156
157 * c-parser.c (c_parse_init): Add RID entries for each __intN.
158 (c_token_starts_typename): Check all __intN, not just __int128.
159 (c_token_starts_declspecs): Likewise.
160 (c_parser_declspecs): Likewise.
161 (c_parser_attribute_any_word): Likewise.
162 (c_parser_objc_selector): Likewise.
163 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
164 (struct c_declspecs): Add int_n_idx field to record *which* __intN
165 is specified.
166 * c-decl.c (declspecs_add_type): Check for all __intN, not just
167 __int128.
168 (finish_declspecs): Likewise.
169
74d98c1e
AB
1702014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
171
172 * c-parser.c (c_parser_all_labels): New function to replace
173 the duplicate code.
174 (c_parser_statement): Call the new function.
175
84937de2
MP
1762014-10-09 Marek Polacek <polacek@redhat.com>
177
178 PR c/63480
179 * c-typeck.c (pop_init_level): Don't warn about initializing
180 with { }.
181
0382aaa0
MP
1822014-10-07 Marek Polacek <polacek@redhat.com>
183
184 PR c/59717
185 * c-decl.c (header_for_builtin_fn): New function.
186 (implicitly_declare): Suggest which header to include.
187
7a0ca710
MP
1882014-10-07 Marek Polacek <polacek@redhat.com>
189
190 * c-convert.c (convert): Use error_operand_p.
191 * c-typeck.c (require_complete_type): Likewise.
192 (really_atomic_lvalue): Likewise.
193 (digest_init): Likewise.
194 (handle_omp_array_sections_1): Likewise.
195
6bc8a126
MP
1962014-10-03 Marek Polacek <polacek@redhat.com>
197
198 PR c/63453
199 * c-decl.c (pop_scope): Don't warn about "inline function declared
200 but never defined" for functions marked with gnu_inline attribute.
201
d90c0a59
JJ
2022014-09-25 Jakub Jelinek <jakub@redhat.com>
203
204 PR c++/63249
205 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
206 on low_bound and length.
207
083e891e
MP
2082014-09-24 Marek Polacek <polacek@redhat.com>
209
210 PR c/61405
211 PR c/53874
212 * c-parser.c: Don't define CPP_KEYWORD.
213 (c_parser_switch_statement): Pass original type to c_finish_case.
214 * c-tree.h (c_finish_case): Update declaration.
215 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
216 conditionally to c_do_switch_warnings.
217
8d95fe25
MP
2182014-09-03 Marek Polacek <polacek@redhat.com>
219
220 PR c/62024
221 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
222 conversions.
223
9a771876
JJ
2242014-09-02 Jakub Jelinek <jakub@redhat.com>
225 Balaji V. Iyer <balaji.v.iyer@intel.com>
226 Igor Zamyatin <igor.zamyatin@intel.com>
227
228 * c-parser.c (c_parser_cilk_for): New function.
229 (c_parser_cilk_grainsize): Likewise.
230 (c_get_temp_regvar): Likewise.
231 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
232 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
233 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
234 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
235 case.
236
b7679d96
CG
2372014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
238
239 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
240 with using HOST_WIDE_INT without truncation to 'int'
241
59ea0364
MP
2422014-08-22 Marek Polacek <polacek@redhat.com>
243
244 PR c++/62199
245 * c-typeck.c (parser_build_binary_op): Adjust call to
246 warn_logical_not_parentheses.
247
671a475e
IZ
2482014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
249
250 PR other/62008
251 * c-parser.c (c_parser_array_notation): Check for correct
252 type of an array added.
253
04159acf
MP
2542014-08-19 Marek Polacek <polacek@redhat.com>
255
256 PR c++/62153
257 * c-typeck.c (build_binary_op): If either operand of a comparison
258 is a boolean expression, call maybe_warn_bool_compare.
259
c77935ee
PP
2602014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
261
262 PR c/45584
263 * c-typeck.c (build_c_cast): Do a conversion even when the
264 TYPE_MAIN_VARIANTs are the same.
265
35aff4fb
MP
2662014-08-19 Marek Polacek <polacek@redhat.com>
267
268 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
269 pedwarn_c99 instead of pedwarn.
270 (grokfield): Likewise.
271 (warn_defaults_to): New function.
272 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
273 Unconditionally call pedwarn_c99 instead of pedwarn.
274 (start_function): Call warn_defaults_to instead of pedwarn_c99.
275 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
276 check flag_isoc11 before.
277 * c-errors.c (pedwarn_c99): Change the return type to bool.
278 Handle -Wc99-c11-compat.
279 * c-parser.c (disable_extension_diagnostics): Handle
280 warn_c99_c11_compat.
281 (restore_extension_diagnostics): Likewise.
282 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
283 instead of pedwarn, don't check flag_isoc11 before.
284 (c_parser_declspecs): Likewise.
285 (c_parser_alignas_specifier): Likewise.
286 (c_parser_alignof_expression): Likewise.
287 (c_parser_generic_selection): Likewise.
288 * c-tree.h (pedwarn_c99): Update declaration.
289 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
290 of pedwarn_c99.
291
177cce46
MP
2922014-08-19 Marek Polacek <polacek@redhat.com>
293
294 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
295 to pedwarn_c90.
296 * c-errors.c: Include "opts.h".
297 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
298 * c-parser.c (disable_extension_diagnostics): Handle negative value
299 of warn_c90_c99_compat, too.
300 (restore_extension_diagnostics): Likewise.
301 (c_parser_compound_statement_nostart): Pass
302 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
303
6dc99c33
MP
3042014-08-12 Marek Polacek <polacek@redhat.com>
305
306 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
307 Add pedwarn.
308 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
309 Likewise.
310 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
311
f3bede71
MP
3122014-08-10 Marek Polacek <polacek@redhat.com>
313
314 PR c/51849
315 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
316 Call pedwarn_c90 instead of pedwarn.
317 (check_bitfield_type_and_width): Likewise.
318 (declspecs_add_qual): Likewise.
319 (declspecs_add_type): Likewise.
320 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
321 Adjust to only call pedwarn_c90.
322 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
323 pedwarn_c90 instead of pedwarn.
324 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
325 * c-parser.c (disable_extension_diagnostics): Handle
326 warn_c90_c99_compat.
327 (restore_extension_diagnostics): Likewise.
328 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
329 pedwarn_c90 instead of pedwarn.
330 (c_parser_initelt): Likewise.
331 (c_parser_postfix_expression): Likewise.
332 (c_parser_postfix_expression_after_paren_type): Likewise.
333 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
334 * c-tree.h: Fix formatting.
335 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
336 pedwarn_c90 instead of pedwarn.
337
9f25a338
TS
3382014-08-07 Trevor Saunders <tsaunders@mozilla.com>
339
340 * c-typeck.c: Remove include of pointer-set.h.
341
044331a8
MP
3422014-08-07 Marek Polacek <polacek@redhat.com>
343
344 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
345
b787e7a2
TS
3462014-08-02 Trevor Saunders <tsaunders@mozilla.com>
347
348 * c-typeck.c: Use hash_map instead of pointer_map.
349
6e2830c3
TS
3502014-08-02 Trevor Saunders <tsaunders@mozilla.com>
351
352 * c-decl.c: Use hash_set instead of pointer_set.
353
a7ee52fb
IZ
3542014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
355
356 PR middle-end/61455
357 * c-array-notation.c (expand_array_notations): Handling
358 of DECL_EXPR added.
359
b4dfdc11
MG
3602014-07-31 Marc Glisse <marc.glisse@inria.fr>
361
362 PR c++/60517
363 * c-typeck.c (c_finish_return): Return 0 instead of the address of
364 a local variable.
365
976d5a22
TT
3662014-07-30 Tom Tromey <tromey@redhat.com>
367
368 * c-typeck.c (struct constructor_stack) <designator_depth>: New
369 field.
370 (really_start_incremental_init, push_init_level): Initialize
371 designator_depth.
372 (pop_init_level): Set global designator_depth.
373 (process_init_element): Check for designated_init attribute.
374
30281de2
MP
3752014-07-20 Marek Polacek <polacek@redhat.com>
376
377 PR c/61852
378 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
379 (implicitly_declare): Pass location to implicit_decl_warning.
380
b108f48f
JJ
3812014-07-14 Jakub Jelinek <jakub@redhat.com>
382
383 PR middle-end/61294
384 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
385 If non-NULL, call c_parser_check_literal_zero.
386 (c_parser_check_literal_zero): New function.
387 (c_parser_postfix_expression_after_primary): Adjust
388 c_parser_expr_list caller, handle -Wmemset-transposed-args.
389
773ec47f
MP
3902014-07-06 Marek Polacek <polacek@redhat.com>
391
392 PR c/6940
393 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
394 * c-tree.h (C_ARRAY_PARAMETER): Define.
395 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
396 function parameter.
397
22e1cf1c
JH
3982014-07-02 Jan Hubicka <hubicka@ucw.cz>
399 Chen Gang <gang.chen.5i5j@gmail.com>
400
401 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
402 releasing symbol.
403
52ec0ea3
MP
4042014-07-01 Marek Polacek <polacek@redhat.com>
405
406 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
407 instead of 0 to WARN_FOR_ASSIGNMENT.
408
d5c3d343
MP
4092014-07-01 Marek Polacek <polacek@redhat.com>
410
411 PR c/58286
412 * c-typeck.c (convert_for_assignment): Pass
413 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
414
6a7253a4
MP
4152014-06-30 Marek Polacek <polacek@redhat.com>
416
417 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
418 has no_sanitize_undefined attribute.
419
5e88a8f4
IZ
4202014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
421
422 PR middle-end/57541
423 * c-array-notation.c (fix_builtin_array_notation_fn):
424 Check for 0 arguments in builtin call. Check that bultin argument is
425 correct.
426 * c-parser.c (c_parser_array_notation): Check for incorrect initial
427 index.
428
9698b078
SH
4292014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
430
431 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
432 qualifiers in __auto_type for atomic types.
433 (c_parser_typeof_specifier): Discard all type qualifiers in
434 __typeof__ for atomic types.
435
6e07c515
MP
4362014-06-25 Marek Polacek <polacek@redhat.com>
437
438 PR c/61162
439 * c-parser.c (c_parser_statement_after_labels): Pass the location of
440 the return expression to c_finish_return.
441
da6f124d
JJ
4422014-06-25 Jakub Jelinek <jakub@redhat.com>
443
444 * c-typeck.c (c_finish_omp_clauses): Make sure
445 OMP_CLAUSE_LINEAR_STEP has correct type.
446
c203e8a7
TS
4472014-06-24 Trevor Saunders <tsaunders@mozilla.com>
448
449 * c-decl.c: Adjust.
450
56ad0e38
JJ
4512014-06-24 Jakub Jelinek <jakub@redhat.com>
452
453 * c-parser.c (c_parser_omp_for_loop): For
454 #pragma omp parallel for simd move lastprivate clause from parallel
455 to for rather than simd.
456
47c2554f
MP
4572014-06-23 Marek Polacek <polacek@redhat.com>
458
459 * c-typeck.c (parser_build_binary_op): Don't call
460 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
461
56363ffd
JH
4622014-06-15 Jan Hubicka <hubicka@ucw.cz>
463
464 * c-parser.c (c_parser_omp_threadprivate): Likewise.
465 * c-decl.c (merge_decls): Likewise.
466
d7ff7ae5
MP
4672014-06-09 Marek Polacek <polacek@redhat.com>
468
469 PR c/36446
470 * c-typeck.c (error_init): Call inform instead of error_at.
471 (pedwarn_init): Call inform instead of pedwarn.
472 (warning_init): Call inform instead of warning_at.
473
24d047a3
JH
4742014-06-07 Jan Hubicka <hubicka@ucw.cz>
475
476 * c-decl.c (merge_decls): Use set_decl_section_name.
477 (duplicate_decls): Remove node if it exists.
478
9bac5cbb
G
4792014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
480
481 PR c/53119
482 * c-typeck.c (push_init_level, process_init_element,
483 pop_init_level): Correct check for zero initialization, move
484 missing brace warning to respect zero initialization.
485
8ffcdea8
MP
4862014-06-05 Marek Polacek <polacek@redhat.com>
487
488 PR c/56724
489 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
490
742938c9
MP
4912014-06-05 Marek Polacek <polacek@redhat.com>
492
493 PR c/49706
494 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
495 on the left hand side operand of a comparison.
496
6447c55d
MP
4972014-06-05 Marek Polacek <polacek@redhat.com>
498
499 PR c/48062
500 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
501 Print note only if the warning was printed.
502
9dc7743c
IZ
5032014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
504
505 PR c/58942
506 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
507 with a pointer.
508
fedfecef
MP
5092014-06-03 Marek Polacek <polacek@redhat.com>
510
511 PR c/60439
512 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
513 c_start_case.
514 * c-tree.h (c_start_case): Update.
515 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
516 switch condition has boolean value.
517
9b2b7279
AM
5182014-06-02 Andrew MacLeod <amacleod@redhat.com>
519
520 * c-decl.c: Include builtins.h.
521 * c-parser.c: Likewise.
522
5c1bc275
MP
5232014-05-27 Marek Polacek <polacek@redhat.com>
524
525 PR c/56724
526 * c-typeck.c (convert_arguments): Get location of a parameter. Change
527 error and warning calls to error_at and warning_at. Pass location of
528 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
529 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
530 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
531
97563bc8
IZ
5322014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
533
534 PR c/61191
535 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
536 function parameters.
537
aede2c10
JH
5382014-05-23 Jan Hubicka <hubicka@ucw.cz>
539
540 * c-decl.c (merge_decls): Preserve symtab node pointers.
541 (duplicate_decls): Free new decl.
542
edbba2ce
TS
5432014-05-23 Thomas Schwinge <thomas@codesourcery.com>
544
f3316c6d
TS
545 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
546 initialization.
547
edbba2ce
TS
548 * c-parser.c (c_parser_omp_target): Return bool values.
549
68c81f24
TS
5502014-05-22 Thomas Schwinge <thomas@codesourcery.com>
551
552 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
553 num_teams_loc variable to num_thread_limit_loc.
554
632f2871
RS
5552014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
556
557 * c-array-notation.c (expand_array_notations): Use void_node
558 instead of void_zero_node.
559
766090c2
TS
5602014-05-17 Trevor Saunders <tsaunders@mozilla.com>
561
562 * c-decl.c (finish_struct): Adjust.
563 (finish_enum): Likewise.
564 (bind): Adjust.
565 (record_inline_static): Likewise.
566 (push_scope): Likewise.
567 (make_label): Likewise.
568 (lookup_label_for_goto): Likewise.
569 (finish_struct): Likewise.
570 (finish_enum): Likewise.
571 (store_parm_decls): Likewise.
572 (c_push_function_context): Likewise.
573 * c-lang.h: Remove usage of variable_size gty attribute.
574 * c-parser.c (c_parse_init): Adjust.
575 (c_parse_file): Likewise.
576
2b107f6b
MP
5772014-05-13 Marek Polacek <polacek@redhat.com>
578
579 PR c/61162
580 * c-typeck.c (convert_for_assignment): Pass location to
581 WARN_FOR_ASSIGNMENT instead of input_location.
582
d033409e
MP
5832014-05-10 Marek Polacek <polacek@redhat.com>
584
585 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
586 maybe_warn_string_init.
587 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
588 maybe_warn_string_init.
589 * c-tree.h (maybe_warn_string_init): Update declaration.
590 * c-typeck.c (maybe_warn_string_init): Add location parameter.
591 Call pedwarn_init with loc instead of with input_location.
592 (digest_init): Pass init_loc to maybe_warn_string_init.
593 (pop_init_level): Call pedwarn_init with loc instead of with
594 input_location.
595 (set_init_index): Likewise.
596 (process_init_element): Likewise.
597
ea58ef42
MP
5982014-05-09 Marek Polacek <polacek@redhat.com>
599
600 PR c/61096
601 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
602 (c_parser_initelt): Pass location to set_init_label. Pass array index
603 location to set_init_index.
604 * c-tree.h (push_init_level): Update declaration.
605 (pop_init_level): Likewise.
606 (set_init_index): Likewise.
607 (set_init_label): Likewise.
608 * c-typeck.c (error_init): Add location parameter. Call error_at
609 instead of error.
610 (digest_init): Pass init_loc to error_init.
611 (really_start_incremental_init):
612 (push_init_level): Add location parameter. Pass loc to pop_init_level
613 and error_init.
614 (pop_init_level): Likewise.
615 (set_designator): Add location parameter. Pass loc to pop_init_level,
616 push_init_level, and error_init.
617 (set_init_index): Add location parameter. Pass loc to error_init and
618 set_designator.
619 (set_init_label): Likewise.
620 (output_init_element): Pass loc to error_init.
621 (process_init_element): Pass loc to error_init, pop_init_level,
622 pedwarn_init, and push_init_level.
623
661a0813
MP
6242014-05-09 Marek Polacek <polacek@redhat.com>
625
626 PR c/50459
627 * c-parser.c (c_parser_attributes): Parse the arguments as an
628 expression-list if the attribute takes identifier.
629
2793eeab
MP
6302014-05-08 Marek Polacek <polacek@redhat.com>
631
632 PR c/61053
633 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
634 TYPE_ALIGN_UNIT.
635
f827930a
MP
6362014-05-08 Marek Polacek <polacek@redhat.com>
637
638 PR c/61077
639 * c-decl.c (start_function): Warn for _Atomic-qualified return type
640 of main.
641
1d60af08
KZ
6422014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
643 Mike Stump <mikestump@comcast.net>
644 Richard Sandiford <rdsandiford@googlemail.com>
645
646 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
647 (finish_enum): Use wide-int interfaces.
648 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
649 * c-typeck.c (build_c_cast): Likewise.
650 (set_nonincremental_init_from_string): Likewise.
651 (c_tree_equal): Likewise.
652
a0e24419
MP
6532014-05-02 Marek Polacek <polacek@redhat.com>
654
655 PR c/25801
656 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
657 Return size_one_node when the type is not complete.
658 (pointer_diff): Remove comment.
659 (build_unary_op): Improve error messages.
660
19fc9faa
MP
6612014-05-02 Marek Polacek <polacek@redhat.com>
662
663 * c-typeck.c (c_finish_return): Separate warning_at calls.
664
63bc4e87
MP
6652014-05-02 Marek Polacek <polacek@redhat.com>
666
667 * c-tree.h (error_init): Remove declaration.
668 (pedwarn_init): Likewise.
669 * c-typeck.c (error_init): Make static and move above.
670 (pedwarn_init): Likewise.
671 (warning_init): Move above.
672 (maybe_warn_string_init): Likewise.
673
4bd2511b
JL
6742014-05-01 Jeff Law <law@redhat.com>
675
676 Revert:
677
678 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
679 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
680 avoid goto.
681
6a358dcb
MP
6822014-05-02 Marek Polacek <polacek@redhat.com>
683
684 PR c/60784
685 * c-typeck.c (push_init_level): Set constructor_designated to
686 p->designated for structures.
687
ae5ebda4
MP
6882014-05-01 Marek Polacek <polacek@redhat.com>
689
690 PR c/60915
691 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
692 function-definition has an attribute after the declarator.
693
96b40f8d
MP
6942014-05-01 Marek Polacek <polacek@redhat.com>
695
696 PR c/60257
697 * c-typeck.c (warning_init): Add location_t parameter. Call
698 warning_at instead of warning.
699 (push_init_level): Pass input_location to warning_init.
700 (add_pending_init): Add location_t parameter. Pass loc to
701 warning_init.
702 (set_nonincremental_init): Pass input_location to add_pending_init.
703 (set_nonincremental_init_from_string): Likewise.
704 (output_init_element): Pass loc to warning_init and to
705 add_pending_init.
706
32e00768
MP
7072014-05-01 Marek Polacek <polacek@redhat.com>
708
709 PR c/43395
710 * c-typeck.c (c_finish_return): Distinguish between label and variable
711 when warning about returning local address.
712
c9379ce2
MP
7132014-05-01 Marek Polacek <polacek@redhat.com>
714
715 PR c/29467
716 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
717 in C89 mode.
718
d00887e8
MP
7192014-05-01 Marek Polacek <polacek@redhat.com>
720
721 PR c/43245
722 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
723 instead of 0 to WARN_FOR_QUALIFIERS.
724
5436fa2e
MP
7252014-05-01 Marek Polacek <polacek@redhat.com>
726
727 PR c/56989
728 * c-typeck.c (default_conversion): Use better location for
729 error call.
730
f8ed5150
MP
7312014-04-30 Marek Polacek <polacek@redhat.com>
732
733 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
734 also when SANITIZE_FLOAT_DIVIDE is on.
735
8337d1db
MP
7362014-04-30 Marek Polacek <polacek@redhat.com>
737
738 PR c/60139
739 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
740 and pedwarn_init. Use loc insted of input_location.
741
c4bdc42f
MP
7422014-04-30 Marek Polacek <polacek@redhat.com>
743
744 PR c/60351
745 * c-typeck.c (build_binary_op): Use location when warning about
746 shift count.
747
45484dcf
MP
7482014-04-25 Marek Polacek <polacek@redhat.com>
749
750 PR c/18079
751 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
752 always_inline/noinline and hot/cold attributes.
753
34cf811f
MP
7542014-04-25 Marek Polacek <polacek@redhat.com>
755
756 PR c/60114
757 * c-parser.c (c_parser_initelt): Pass input_location to
758 process_init_element.
759 (c_parser_initval): Pass loc to process_init_element.
760 * c-tree.h (process_init_element): Adjust declaration.
761 * c-typeck.c (push_init_level): Pass input_location to
762 process_init_element.
763 (pop_init_level): Likewise.
764 (set_designator): Likewise.
765 (output_init_element): Add location_t parameter. Pass loc to
766 digest_init.
767 (output_pending_init_elements): Pass input_location to
768 output_init_element.
769 (process_init_element): Add location_t parameter. Pass loc to
770 output_init_element.
771
42056eac
JJ
7722014-04-24 Jakub Jelinek <jakub@redhat.com>
773
774 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
775 atomic-clause, allow comma in between atomic-clause and
776 seq_cst.
777
e162a134
JJ
7782014-04-22 Jakub Jelinek <jakub@redhat.com>
779
780 PR c/59073
781 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
782 fails, don't set OM_PARALLEL_COMBINED and return NULL.
783
2f6babac
IZ
7842014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
785
786 PR middle-end/60469
787 * c-array-notation.c (fix_builtin_array_notation_fn): Use
788 create_tmp_var instead build_decl for creating temps.
789 (build_array_notation_expr): Likewise.
790 (fix_conditional_array_notations_1): Likewise.
791 (fix_array_notation_expr): Likewise.
792 (fix_array_notation_call_expr): Likewise.
793
8edbfaa6
JJ
7942014-03-28 Jakub Jelinek <jakub@redhat.com>
795
796 PR c++/60689
797 * c-tree.h (c_build_function_call_vec): New prototype.
798 * c-typeck.c (build_function_call_vec): Don't call
799 resolve_overloaded_builtin here.
800 (c_build_function_call_vec): New wrapper function around
801 build_function_call_vec. Call resolve_overloaded_builtin here.
802 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
803 Call c_build_function_call_vec instead of build_function_call_vec.
804 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
805 * c-decl.c (finish_decl): Likewise.
806
7485aeea
MLI
8072014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
808
809 PR c/55383
810 * c-typeck.c: Use correct format string in cast-qual warning
811
b17a8b07
TS
8122014-03-07 Thomas Schwinge <thomas@codesourcery.com>
813
814 * c-decl.c (c_decl_attributes): Use
815 lang_hooks.types.omp_mappable_type.
816 * c-typeck.c (c_finish_omp_clauses): Likewise.
817
3af9c5e9
MP
8182014-03-06 Marek Polacek <polacek@redhat.com>
819
820 PR c/60197
821 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
822 of checking tree code.
823
1c9f5f33
PK
8242014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
825
826 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
827 (c_parser_parameter_declaration): Likewise.
828
cc28fc7f
MP
8292014-02-19 Marek Polacek <polacek@redhat.com>
830
831 PR c/60195
832 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
833 Call mark_exp_read on exp.value.
834 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
835 TREE_ADDRESSABLE on old instead of val.
836 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
837
b581c05c
PK
8382014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
839
840 * c-parser.c (c_parser_get_builtin_args): Replace calls to
841 C_EXPR_APPEND by vec_safe_push.
842 * c-tree.h (C_EXPR_APPEND): Remove.
843
81e5eca8
MP
8442014-01-31 Marek Polacek <polacek@redhat.com>
845
846 PR c/59963
847 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
848 build_function_call_vec.
849 (build_function_call): Likewise.
850 (build_atomic_assign): Likewise.
851 (build_function_call_vec): Add arg_loc parameter. Use it.
852 (convert_arguments): Likewise.
853 (convert_for_assignment): Rename rhs_loc to expr_loc.
854 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
855 (c_parser_objc_keywordexpr): Likewise.
856 (c_parser_postfix_expression_after_primary): Call
857 build_function_call_vec with expr_loc rather than op_loc.
858 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
859 build_function_call_vec.
860 (c_parser_expr_list): Add locations parameter. Fill it with locations
861 of function arguments.
862 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
863
68fca595
MP
8642014-01-30 Marek Polacek <polacek@redhat.com>
865
866 PR c/59940
867 * c-typeck.c (build_function_call_vec): Use loc parameter.
868 (convert_arguments): Add location parameter. Use it.
869 (ep_convert_and_check): Likewise.
870 (build_atomic_assign): Adjust convert_for_assignment call.
871 (build_modify_expr): Likewise.
872 (digest_init): Likewise.
873 (c_finish_return): Likewise.
874 (build_conditional_expr): Adjust ep_convert_and_check calls.
875 (convert_for_assignment): Add rhs_loc parameter. Use it.
876 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
877 calls.
878
fa337f3a
RB
8792014-01-30 Richard Biener <rguenther@suse.de>
880
881 PR c/59905
882 * c-typeck.c (build_function_call_vec): Do not replace calls
883 to a function via an incompatible type with a runtime abort.
884
b72271b9
BI
8852014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
886
887 * c-parser.c (c_parser_declaration_or_fndef): Replaced
888 flag_enable_cilkplus with flag_cilkplus.
889 (c_parser_direct_declarator_inner): Likewise.
890 (c_parser_attribute_any_word): Likewise.
891 (c_parser_attributes): Likewise.
892 (c_parser_compound_statement): Likewise.
893 (c_parser_statement_after_labels): Likewise.
894 (c_parser_if_statement): Likewise.
895 (c_parser_switch_statement): Likewise.
896 (c_parser_do_statement): Likewise.
897 (c_parser_for_statement): Likewise.
898 (c_parser_unary_expression): Likewise.
899 (c_parser_postfix_expression): Likewise.
900 (c_parser_postfix_expression_after_primary): Likewise.
901 (c_parser_postfix_expression_after_primary): Likewise.
902 (c_parser_omp_clause_name): Likewise.
903 (c_finish_omp_declare_simd): Likewise.
904 (c_parser_cilk_verify_simd): Likewise.
905 * c-typeck.c (build_array_ref): Likewise.
906 (build_function_call_vec): Likewise.
907 (convert_arguments): Likewise.
908 (build_compound_expr): Likewise.
909 (c_finish_return): Likewise.
910 (c_finish_if_stmt): Likewise.
911 (c_finish_loop): Likewise.
912 (build_binary_op): Likewise.
913
393e8e8b
MP
9142014-01-23 Marek Polacek <polacek@redhat.com>
915
916 PR c/59846
917 * c-typeck.c (parser_build_binary_op): Use location instead of
918 input_location.
919 (build_binary_op): Pass location to shorten_compare.
920
f04dda30
MP
9212014-01-23 Marek Polacek <polacek@redhat.com>
922
923 PR c/58346
924 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
925 an empty aggregate.
926
789eadcd
MP
9272014-01-23 Marek Polacek <polacek@redhat.com>
928
929 PR c/59871
930 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
931 of a comma expression.
932 (emit_side_effect_warnings): Likewise.
933
40f14e9f
BI
9342014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
935
936 PR c/59825
937 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
938 function to use walk_tree and moved a lot of its functionality to
939 expand_array_notations.
940 (expand_array_notations): New function.
941
74558dd9
BI
9422014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
943
944 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
945 attribute an attribute without value.
946
652fea39
JJ
9472014-01-23 Jakub Jelinek <jakub@redhat.com>
948
949 PR middle-end/58809
950 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
951 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
952
f34f1c87
MP
9532014-01-22 Marek Polacek <polacek@redhat.com>
954
955 PR c/59891
956 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
957 of remove_c_maybe_const_expr on op1 and op2.
958
241f845a
JJ
9592014-01-15 Jakub Jelinek <jakub@redhat.com>
960
961 PR c/58943
962 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
963 effects, preevaluate rhs using SAVE_EXPR first.
964
9a74f20c
BI
9652014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
966
967 PR c++/59631
968 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
969 statements with if-elseif statements.
970
96066ce1
MP
9712014-01-06 Marek Polacek <polacek@redhat.com>
972
973 PR c/57773
974 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
975 defined bit-field types only in ISO C.
976
23a5b65a
RS
9772014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
978
979 Update copyright years
980
f9030485
RS
9812014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
982
983 * c-array-notation.c: Use the standard form for the copyright notice.
984
41958c28
BI
9852013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
986
987 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
988 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
989 field in parser is not empty. If not-empty, call the function
990 c_parser_finish_omp_declare_simd.
991 (c_parser_cilk_clause_vectorlength): Modified function to be shared
992 between SIMD-enabled functions and #pragma simd. Added new parameter.
993 (c_parser_cilk_all_clauses): Modified the usage of the function
994 c_parser_cilk_clause_vectorlength as mentioned above.
995 (c_parser_cilk_simd_fn_vector_attrs): New function.
996 (c_finish_cilk_simd_fn_tokens): Likewise.
997 (is_cilkplus_vector_p): Likewise.
998 (c_parser_omp_clause_name): Added checking for "vectorlength,"
999 "nomask," and "mask" strings in clause name.
1000 (c_parser_omp_all_clauses): Added 3 new case statements:
1001 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
1002 PRAGMA_CILK_CLAUSE_NOMASK.
1003 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
1004 check for vector attribute and if so call the function
1005 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
1006 called the function c_finish_cilk_simd_fn_tokens.
1007 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
1008 parser field is non-empty. If so, parse them as you would parse
1009 the omp declare simd pragma.
1010 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
1011 Added a check when step is a parameter and flag it as error.
1012 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
1013 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
1014 pragma_omp_clause.
1015
cef0fd0e
TS
10162013-12-17 Thomas Schwinge <thomas@codesourcery.com>
1017
1018 * c-parser.c (c_parser_omp_parallel): Fix description.
1019
12893402
BI
10202013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
1021
1022 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
1023 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
1024 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
1025 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
1026
296674db
JM
10272013-12-04 Joseph Myers <joseph@codesourcery.com>
1028
1029 PR c/52023
1030 * c-parser.c (c_parser_alignas_specifier): Use
1031 c_sizeof_or_alignof_type instead of c_alignof.
1032 (c_parser_alignof_expression): Likewise, with min_alignof
1033 parameter depending on alignof spelling used.
1034
edd28054
MP
10352013-12-04 Marek Polacek <polacek@redhat.com>
1036
1037 PR c/54113
1038 * c-decl.c (start_function): Don't warn for missing prototype for
1039 inline functions.
1040
da0fc454
MP
10412013-12-03 Marek Polacek <polacek@redhat.com>
1042
1043 PR c/59351
1044 * c-decl.c (build_compound_literal): Allow compound literals with
1045 empty initial value.
1046
4c2ecab0
JM
10472013-12-02 Joseph Myers <joseph@codesourcery.com>
1048
1049 PR c/58235
1050 * c-typeck.c (build_modify_expr): Diagnose assignment to
1051 expression with array type.
1052
340baef7
JM
10532013-11-29 Joseph Myers <joseph@codesourcery.com>
1054
1055 PR c/42262
1056 * c-typeck.c (process_init_element): Do not treat a string as
1057 initializing a whole array when used with a designator for an
1058 individual element.
1059
6763b9f7
JM
10602013-11-29 Joseph Myers <joseph@codesourcery.com>
1061
1062 PR c/57574
1063 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
1064 an inline function following a static declaration.
1065
e7bd1de1
JJ
10662013-11-28 Jakub Jelinek <jakub@redhat.com>
1067
1068 PR c/59310
1069 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
1070 to p_name before calling c_parser_omp_teams instead of after.
1071 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
1072 argument. Remove unused p_name variable.
1073
0136f8f0
AH
10742013-11-27 Aldy Hernandez <aldyh@redhat.com>
1075 Jakub Jelinek <jakub@redhat.com>
1076
1077 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
1078 external_scope is NULL.
1079
241b71bb
TV
10802013-11-27 Tom de Vries <tom@codesourcery.com>
1081 Marc Glisse <marc.glisse@inria.fr>
1082
1083 PR c++/59032
1084 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
1085
2fb9a547
AM
10862013-11-22 Andrew MacLeod <amacleod@redhat.com>
1087
1088 * c-typeck.c: Add required include files from gimple.h.
1089
8400e75e
DM
10902013-11-22 David Malcolm <dmalcolm@redhat.com>
1091
1092 * c-decl.c (define_label, shadow_tag_warned)
1093 (check_bitfield_type_and_width, grokdeclarator, grokparms,
1094 store_parm_decls_newstyle, store_parm_decls_oldstyle)
1095 (declspecs_add_type): Remove use of in_system_header macro.
1096 * c-parser.c (c_parser_unary_expression): Likewise.
1097 * c-typeck.c (store_init_value, process_init_element)
1098 (c_start_case): Likewise.
1099
1100 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
1101 macro.
1102
1103 * c-parser.c (c_parser_set_source_position_from_token): Remove
1104 reference to in_system_header from comment.
1105
386b1f1f
RS
11062013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1107
1108 * c-decl.c (grokdeclarator): Update comment to refer to
1109 tree_to_[su]hwi rather than tree_low_cst.
1110
ae7e9ddd
RS
11112013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1112
1113 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
1114 tree_to_uhwi throughout.
1115
9439e9a1
RS
11162013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1117
1118 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
1119 throughout.
1120
9541ffee
RS
11212013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1122
1123 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
1124 throughout.
1125
c02065fc
AH
11262013-11-15 Aldy Hernandez <aldyh@redhat.com>
1127
1128 * c-parser.c (c_parser_cilk_simd): New.
1129 (c_parser_cilk_verify_simd): New.
1130 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
1131 (c_parser_omp_for_loop): Add case for NE_EXPR.
1132 Set c_break_label for CILK_SIMD.
1133 (c_parser_cilk_clause_vectorlength): New.
1134 (c_parser_cilk_clause_linear): New.
1135 (c_parser_cilk_clause_name): New.
1136 (c_parser_cilk_all_clauses): New.
1137 * c-typeck.c (build_unary_op): Pass location argument to
1138 readonly_error.
1139 (build_modify_expr): Same.
1140 (build_asm_expr): Same.
1141 (c_finish_bc_stmt): Error on break/continue in loops.
1142
18f429e2
AM
11432013-11-14 Andrew MacLeod <amacleod@redhat.com>
1144
1145 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
1146
d8a2d370
DN
11472013-11-14 Diego Novillo <dnovillo@google.com>
1148
1149 * c-decl.c: Include print-tree.h.
1150 Include stor-layout.h.
1151 Include varasm.h.
1152 Include attribs.h.
1153 Include stringpool.h.
1154 * c-lang.c: Include fold-const.h.
1155 * c-parser.c: Include stringpool.h.
1156 Include attribs.h.
1157 Include stor-layout.h.
1158 Include varasm.h.
1159 Include trans-mem.h.
1160 * c-typeck.c: Include stor-layout.h.
1161 Include trans-mem.h.
1162 Include varasm.h.
1163 Include stmt.h.
1164
38b7bc7f
JM
11652013-11-13 Joseph Myers <joseph@codesourcery.com>
1166
1167 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
1168 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
1169 __auto_type.
1170 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
1171 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
1172 RID_AUTO_TYPE.
1173 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
1174 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
1175 (c_parser_declarator, c_parser_direct_declarator_inner)
1176 (c_parser_parameter_declaration, c_parser_type_name): All callers
1177 changed.
1178 (c_parser_declaration_or_fndef): Handle declarations with type
1179 determined from the initializer.
1180
45b0be94
AM
11812013-11-12 Andrew MacLeod <amacleod@redhat.com>
1182
18f429e2 1183 * c-typeck.c: Include gimplify.h.
45b0be94 1184
582d9b50
JM
11852013-11-12 Joseph Myers <joseph@codesourcery.com>
1186
1187 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
1188 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
1189 comment.
1190 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
1191 or _Thread_local as appropriate in diagnostics.
1192 (build_null_declspecs): Initialize ret->thread_gnu_p.
1193 (declspecs_add_scspec): Handle either __thread or _Thread_local
1194 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
1195 pedantic. Do not disallow _Thread_local extern and _Thread_local
1196 static.
1197
267bac10
JM
11982013-11-07 Joseph Myers <joseph@codesourcery.com>
1199 Andrew MacLeod <amacleod@redhat.com>
1200
1201 * c-aux-info.c (gen_type): Handle atomic qualifier.
1202 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
1203 qualifiers when compating types.
1204 (shadow_tag_warned): Handle atomic_p in declspecs.
1205 (quals_from_declspecs): Likewise.
1206 (start_decl): Use c_type_promotes_to when promoting argument
1207 types.
1208 (grokdeclarator): Handle _Atomic.
1209 (get_parm_info): Diagnose any qualifier on "void" as only
1210 parameter.
1211 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
1212 comparing types. Use c_type_promotes_to when promoting argument
1213 types.
1214 (finish_function): Use c_type_promotes_to when promoting argument
1215 types.
1216 (build_null_declspecs): Handle atomic_p in declspecs.
1217 (declspecs_add_qual): Handle RID_ATOMIC.
1218 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
1219 (c_token_starts_declspecs): Handle RID_ATOMIC.
1220 (c_parser_declspecs): Handle atomic type specifiers and
1221 qualifiers.
1222 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
1223 from types of expressions with atomic type.
1224 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
1225 (c_parser_attribute_any_word): Handle RID_ATOMIC.
1226 (c_parser_initializer, c_parser_initelt, c_parser_initval)
1227 (c_parser_statement_after_labels, c_parser_switch_statement)
1228 (c_parser_for_statement, c_parser_expr_no_commas)
1229 (c_parser_conditional_expression, c_parser_binary_expression)
1230 (c_parser_cast_expression, c_parser_unary_expression)
1231 (c_parser_postfix_expression)
1232 (c_parser_postfix_expression_after_primary, c_parser_expression):
1233 Use convert_lvalue_to_rvalue.
1234 (c_parser_expression_conv, c_parser_expr_list): Document
1235 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
1236 (c_parser_objc_synchronized_statement): Use
1237 convert_lvalue_to_rvalue.
1238 (c_parser_objc_selector): Handle RID_ATOMIC.
1239 (c_parser_objc_receiver, c_parser_array_notation): Use
1240 convert_lvalue_to_rvalue.
1241 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
1242 _Atomic (type-name).
1243 (struct c_declspecs): Add atomic_p field.
1244 (convert_lvalue_to_rvalue): Declare.
1245 * c-typeck.c (c_type_promotes_to): Promote atomic types to
1246 corresponding atomic types.
1247 (qualify_type): Don't add _Atomic qualifiers from second argument.
1248 (comp_target_types): Do not allow _Atomic mismatches.
1249 (type_lists_compatible_p): Do not remove atomic qualifiers when
1250 comparing types.
1251 (really_atomic_lvalue, convert_lvalue_to_rvalue)
1252 (build_atomic_assign): New functions.
1253 (build_unary_op): Use build_atomic_assign for atomic increment and
1254 decrement.
1255 (build_conditional_expr): Do not treat _Atomic void as a qualified
1256 version of void.
1257 (build_modify_expr): Use build_atomic_assign for atomic LHS.
1258 (find_anonymous_field_with_type, convert_to_anonymous_field)
1259 (convert_for_assignment): Do not remove atomic qualifiers when
1260 comparing types.
1261 (digest_init): Do not accept initialization of arrays of atomic
1262 elements by string constants.
1263 (build_asm_expr): Use convert_lvalue_to_rvalue.
1264 (build_binary_op): Do not treat _Atomic void as a qualified
1265 version of void.
1266
0c249d4b
DD
12672013-11-06 DJ Delorie <dj@redhat.com>
1268
1269 * c-decl.c (locate_old_decl): If a previous conflicting decl is
1270 both explicit and builtin, print the location of the explicit one.
1271
6d7f7e0a
TB
12722013-11-05 Tobias Burnus <burnus@net-b.de>
1273
1274 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
1275 c_parser_omp_distribute, c_parser_omp_teams,
1276 c_parser_omp_target, c_parser_omp_declare): Handle
1277 -fopenmp-simd.
1278
b906f4ca
MP
12792013-11-03 Marek Polacek <polacek@redhat.com>
1280
1281 * c-decl.c (grokdeclarator): Add VLA instrumentation.
1282
ee1d5a02
JJ
12832013-11-01 Jakub Jelinek <jakub@redhat.com>
1284
1285 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
1286 check_dup_generic at the end, unless remove is true.
1287 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
1288 remove = true;.
1289 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
1290
5a9785fb
JJ
12912013-10-31 Jakub Jelinek <jakub@redhat.com>
1292
1293 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
1294 with decl that is not pointer nor array.
1295
939b37da
BI
12962013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
1297
1298 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
1299 a spawning function is found.
1300 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
1301 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
1302 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
1303 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
1304 case.
1305 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
1306 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
1307 expr.
1308 (c_finish_return): Added a check to reject _Cilk_spawn in return
1309 expression.
1310 (build_cilk_spawn): New function.
1311 (build_cilk_sync): Likewise.
1312 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
1313
d4af74d4
TB
13142013-10-27 Tobias Burnus <burnus@net-b.de>
1315
1316 PR other/33426
1317 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
1318 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
1319 (c_parser_statement_after_labels): Update calls.
1320
d73749df 13212013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
1322
1323 PR other/33426
1324 * c-parser.c (c_parser_pragma, c_parser_for_statement):
1325 Handle PRAGMA_IVDEP.
1326 (c_parser_statement_after_labels): Update call.
1327
f28aa681
MP
13282013-10-24 Marek Polacek <polacek@redhat.com>
1329
1330 * c-parser.c (c_parser_struct_declaration): Add a comment.
1331 (c_parser_declarator): Don't allow _Alignas here.
1332
0645c1a2
AM
13332013-10-17 Andrew MacLeod <amacleod@redhat.com>
1334
1335 * c-parser.c: Include omp-low.h.
1336 * c-typeck.c: Likewise.
1337
568a31f2
MP
13382013-10-17 Marek Polacek <polacek@redhat.com>
1339
1340 PR c/58267
1341 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
1342 Document syntax of the array-declarator.
1343 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
1344 are not permitted.
1345 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
1346 (c_parser_struct_declaration): Likewise.
1347 (c_parser_declarator): Likewise.
1348 (c_parser_direct_declarator_inner): Likewise.
1349 (c_parser_parameter_declaration): Likewise.
1350 (c_parser_type_name): Likewise.
1351
acf0174b
JJ
13522013-10-11 Jakub Jelinek <jakub@redhat.com>
1353
1354 * c-lang.h (current_omp_declare_target_attribute): New extern
1355 decl.
1356 * c-parser.c: Include c-lang.h.
1357 (struct c_parser): Change tokens to c_token *.
1358 Add tokens_buf field. Change tokens_avail type to unsigned int.
1359 (c_parser_consume_token): If parser->tokens isn't
1360 &parser->tokens_buf[0], increment parser->tokens.
1361 (c_parser_consume_pragma): Likewise.
1362 (enum pragma_context): Add pragma_struct and pragma_param.
1363 (c_parser_external_declaration): Adjust
1364 c_parser_declaration_or_fndef caller.
1365 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
1366 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
1367 Adjust recursive call.
1368 (c_parser_struct_or_union_specifier): Use pragma_struct instead
1369 of pragma_external.
1370 (c_parser_parameter_declaration): Use pragma_param instead of
1371 pragma_external.
1372 (c_parser_compound_statement_nostart, c_parser_label,
1373 c_parser_for_statement): Adjust
1374 c_parser_declaration_or_fndef callers.
1375 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
1376 it through to c_parser_conditional_expression.
1377 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
1378 pass it through to c_parser_binary_expression. Adjust recursive
1379 call.
1380 (c_parser_binary_expression): Remove prec argument, add
1381 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
1382 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
1383 binop matches it, use build2 instead of parser_build_binary_op.
1384 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
1385 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
1386 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
1387 Handle pragma_struct and pragma_param the same as pragma_external.
1388 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
1389 (c_parser_omp_variable_list): Parse array sections for
1390 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
1391 (c_parser_omp_clause_collapse): Fully fold collapse expression.
1392 (c_parser_omp_clause_reduction): Handle user defined reductions.
1393 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
1394 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
1395 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
1396 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
1397 c_parser_omp_clause_depend, c_parser_omp_clause_map,
1398 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
1399 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
1400 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
1401 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
1402 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
1403 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
1404 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
1405 (c_parser_omp_for_loop): Add CODE argument, pass it through
1406 to c_finish_omp_for. Change last argument to cclauses,
1407 and adjust uses to grab parallel clauses from the array of all
1408 the split clauses. Adjust c_parser_binary_expression,
1409 c_parser_declaration_or_fndef and c_finish_omp_for callers.
1410 (omp_split_clauses): New function.
1411 (c_parser_omp_simd): New function.
1412 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
1413 Allow the function to be called also when parsing combined constructs,
1414 and call c_parser_omp_simd when parsing for simd.
1415 (c_parser_omp_sections_scope): If section-sequence doesn't start with
1416 #pragma omp section, require exactly one structured-block instead of
1417 sequence of statements.
1418 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
1419 Allow the function to be called also when parsing combined constructs.
1420 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
1421 Allow the function to be called also when parsing combined
1422 constructs.
1423 (c_parser_omp_taskgroup, c_parser_omp_cancel,
1424 c_parser_omp_cancellation_point, c_parser_omp_distribute,
1425 c_parser_omp_teams, c_parser_omp_target_data,
1426 c_parser_omp_target_update, c_parser_omp_target,
1427 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
1428 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
1429 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
1430 (c_parser_omp_construct): Add p_name and mask vars. Handle
1431 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
1432 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
1433 and c_parser_omp_sections callers.
1434 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
1435 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
1436 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
1437 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
1438 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
1439 OMP_CLAUSE_DEPEND.
1440 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
1441 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
1442 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
1443 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
1444 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
1445 * c-typeck.c: Include tree-inline.h.
1446 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
1447 handle_omp_array_sections_1, handle_omp_array_sections,
1448 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
1449 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
1450 user defined reductions.
1451 (c_tree_equal): New function.
1452 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
1453 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
1454 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
1455 c_check_omp_declare_reduction_r): New prototypes.
1456 * c-decl.c (current_omp_declare_target_attribute): New variable.
1457 (c_decl_attributes): New function.
1458 (start_decl, start_function): Use it instead of decl_attributes.
1459 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
1460 c_omp_reduction_decl, c_omp_reduction_lookup,
1461 c_check_omp_declare_reduction_r): New functions.
1462
0a6c2227
TT
14632013-09-25 Tom Tromey <tromey@redhat.com>
1464
1465 * Make-lang.in (c/gccspec.o): Remove.
1466 (CFLAGS-c/gccspec.o): New variable.
1467 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
1468 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
1469 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
1470
f3bc55f0
TT
14712013-09-25 Tom Tromey <tromey@redhat.com>
1472
1473 * Make-lang.in (c/gccspec.o): Don't use subshell.
1474
a24d975c
MP
14752013-09-18 Marek Polacek <polacek@redhat.com>
1476
1477 PR sanitize/58443
1478 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
1479 Remove unnecessary check.
1480
ce6923c5
MP
14812013-09-18 Marek Polacek <polacek@redhat.com>
1482
1483 PR sanitizer/58411
1484 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
1485 no_sanitize_undefined attribute.
1486
a1e51df9
KT
14872013-09-13 Kai Tietz <ktietz@redhat.com>
1488
1489 PR target/57848
1490 * c-decl.c (c_builtin_function_ext_scope): Remove
1491 wrong assumption that it is never called on prexisting
1492 symbol.
1493
0af94e6f
JR
14942013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
1495
1496 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
1497
20059c8b
GDR
14982013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
1499
1500 * c-objc-common.c (c_tree_printer): Tidy.
1501
de5a5fa1
MP
15022013-08-30 Marek Polacek <polacek@redhat.com>
1503
1504 * c-typeck.c (build_binary_op): Add division by zero and shift
1505 instrumentation.
1506
2531a1d9 15072013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 1508 Joseph Myers <joseph@codesourcery.com>
2531a1d9 1509
6e2bcc98 1510 PR c/35649
2531a1d9
JR
1511 * c-typeck.c (c_common_type): Prefer double_type_node over
1512 other REAL_TYPE types with the same precision.
1513 (convert_arguments): Likewise.
1514
025311c4
GDR
15152013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
1516
1517 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
1518 (c_initialize_diagnostics): Call a destructor for the early printer.
1519
da6ca2b5
GDR
15202013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
1521
1522 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
1523 printer initialization.
1524
318cda85 15252013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 1526
318cda85
BI
1527 PR c/57490
1528 * c-array-notation.c (fix_conditional_array_notations_1): Added a
1529 check for truth values.
1530 (expand_array_notation_exprs): Added truth values case. Removed an
1531 unwanted else. Added for-loop to walk through subtrees in default
1532 case.
1533
b066401f
GDR
15342013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
1535
1536 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
1537
fb48aadc
JM
15382013-07-23 Joseph Myers <joseph@codesourcery.com>
1539
1540 * c-parser.c (struct c_generic_association): Fix typo.
1541
433cc7b0
TT
15422013-07-23 Tom Tromey <tromey@redhat.com>
1543 Joseph Myers <joseph@codesourcery.com>
1544
1545 * c-parser.c (struct c_generic_association): New.
1546 (c_generic_association_d): New typedef.
1547 (c_parser_generic_selection): New function.
1548 (c_parser_postfix_expression): Handle RID_GENERIC.
1549
26d40c3d
JM
15502013-07-13 Jason Merrill <jason@redhat.com>
1551
1552 PR c++/57793
1553 * c-decl.c (finish_struct): Check for too-large class.
1554
ecdbd01a 15552013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
1556
1557 PR c/57821
1558 * c-typeck.c (set_init_index): When folding, check for index overflow.
1559
1141ed3f
BI
15602013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
1561
1562 * c-parser.c (c_parser_array_notation): Removed rejection of array
1563 notations in an array of function pointers.
1564
713b46fa
BI
15652013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
1566
1567 * c-array-notation.c (make_triplet_val_inv): New function.
1568 (create_cmp_incr): Likewise.
1569 (create_array_refs): Likewise.
1570 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
1571 Also modularized common parts between functions and called the function.
1572 (build_array_notation_expr): Likewise.
1573 (fix_conditional_array_notations_1): Likewise.
1574 (fix_array_notation_expr): Likewise.
1575 (fix_array_notation_call_expr): Likewise.
1576
92f20202
MP
15772013-06-18 Marek Polacek <polacek@redhat.com>
1578
1579 PR c/57630
1580 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
1581
73a23b06
BI
15822013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
1583
1584 * c-array-notation.c (build_array_notation_expr): Reject array notation
1585 mismatch between LHS and RHS even inside a call_expr. Also, removed
1586 a couple while statements that were dead code.
1587
00b8517d
BI
15882013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
1589
1590 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
1591 excessive precision expressions in function parameters. Also removed
1592 couple unwanted while statements.
1593
1509bdda
BI
15942013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
1595
1596 * c-array-notation.c (expand_array_notation_exprs): Added
1597 ARRAY_NOTATION_REF case.
1598
d60f1706
BI
15992013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
1600
1601 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
1602 function to c-family/array-notation-common.c.
1603 (is_cilkplus_reduce_builtin): Likewise.
1604 (find_rank): Likewise.
1605 (extract_array_notation_exprs): Likewise.
1606 (replace_array_notations): Likewise.
1607 (find_inv_trees): Likewise.
1608 (replace_inv_trees): Likewise.
1609 (contains_array_notation_expr): Likewise.
1610 (find_correct_array_notation_type): Likewise.
1611 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
1612 (struct inv_list): Moved this to c-family/array-notation-common.c.
1613 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
1614
6d6efbb3
BI
16152013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
1616
1617 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
1618 reduction functions outside the for-loop. Added a check if the fundecl
1619 is non-NULL. Finally, removed an unwanted if-statement, and made the
1620 body unconditional.
1621
25c22937
BI
16222013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
1623
1624 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
1625 condition of the if-statement matches the rank of else-block and then-
1626 block when array notations are used.
1627 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
1628 expression after the entire function body is parsed.
1629 (c_parser_expr_no_commas): Delayed creating array notation expressions
1630 to the end of function parsing.
1631 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
1632 whole if-statement instead of just the condition.
1633 (expand_array_notation_exprs): Added MODIFY_EXPR case.
1634
edd25645
BI
16352013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
1636
1637 PR c/57474
1638 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
1639 array to NULL_TREE if they are unused. Also added a check for the
1640 field to be NULL before its fields are used in future.
1641
065ce7f1
RO
16422013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1643
1644 PR bootstrap/57450
1645 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
1646 (build_array_notation_expr): Likewise.
1647
36536d79
BI
16482013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
1649
1650 * c-typeck.c (build_array_ref): Added a check to see if array's
1651 index is greater than one. If true, then emit an error.
1652 (build_function_call_vec): Exclude error reporting and checking
1653 for builtin array-notation functions.
1654 (convert_arguments): Likewise.
1655 (c_finish_return): Added a check for array notations as a return
1656 expression. If true, then emit an error.
1657 (c_finish_loop): Added a check for array notations in a loop
1658 condition. If true then emit an error.
1659 (lvalue_p): Added a ARRAY_NOTATION_REF case.
1660 (build_binary_op): Added a check for array notation expr inside
1661 op1 and op0. If present, we call another function to find correct
1662 type.
1663 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
1664 * c-parser.c (c_parser_compound_statement): Check if array
1665 notation code is used in tree, if so, then transform them into
1666 appropriate C code.
1667 (c_parser_expr_no_commas): Check if array notation is used in LHS
1668 or RHS, if so, then build array notation expression instead of
1669 regular modify.
1670 (c_parser_postfix_expression_after_primary): Added a check for
1671 colon(s) after square braces, if so then handle it like an array
1672 notation. Also, break up array notations in unary op if found.
1673 (c_parser_direct_declarator_inner): Added a check for array
1674 notation.
1675 (c_parser_compound_statement): Added a check for array notation in
1676 a stmt. If one is present, then expand array notation expr.
1677 (c_parser_if_statement): Likewise.
1678 (c_parser_switch_statement): Added a check for array notations in
1679 a switch statement's condition. If true, then output an error.
1680 (c_parser_while_statement): Similarly, but for a while.
1681 (c_parser_do_statement): Similarly, but for a do-while.
1682 (c_parser_for_statement): Similarly, but for a for-loop.
1683 (c_parser_unary_expression): Check if array notation is used in a
1684 pre-increment or pre-decrement expression. If true, then expand
1685 them.
1686 (c_parser_array_notation): New function.
1687 * c-array-notation.c: New file.
1688 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
1689
cd192ccc
MS
16902013-05-23 Mike Stump <mikestump@comcast.net>
1691
1692 * c-typeck.c (convert_for_assignment): Handle references to memory
1693 spaces better.
1694
427b248d
JM
16952013-05-16 Jason Merrill <jason@redhat.com>
1696
1697 * Make-lang.in (cc1$(exeext)): Use link mutex.
1698
44d90fe1
PC
16992013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
1700
1701 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
1702 to simply use OPT_Wpointer_arith.
1703 (build_unary_op): Likewise.
1704
4e7d7b3d
JJ
17052013-04-03 Jakub Jelinek <jakub@redhat.com>
1706
1707 PR c/19449
1708 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
1709 argument. If set, or it temporarily for parsing of the first
1710 argument into force_folding_builtin_constant_p.
1711 (c_parser_postfix_expression): Adjust callers.
1712
839b422f
RB
17132013-03-21 Richard Biener <rguenther@suse.de>
1714
1715 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
1716 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
1717
2ee028f1
MP
17182013-02-12 Marek Polacek <polacek@redhat.com>
1719
1720 PR c/44938
1721 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
1722 origtypes to NULL.
1723
8824edff
JJ
17242013-01-24 Jakub Jelinek <jakub@redhat.com>
1725
1726 PR c/56078
1727 * c-typeck.c (set_nonincremental_init_from_string): If
1728 constructor_max_index is NULL, treat it as if tree_int_cst_lt
1729 returned false.
1730 (process_init_element): Likewise.
1731
eadd3d0d
JJ
17322012-12-20 Jakub Jelinek <jakub@redhat.com>
1733
1734 PR c++/55619
1735 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
1736 argument, don't call default_function_array_conversion
1737 nor c_fully_fold here.
1738 (c_parser_asm_statement): Adjust callers.
1739 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
1740 and outputs here, and call default_function_array_conversion
1741 on inputs that don't need to be addressable.
1742
f8a93a2e
JJ
17432012-12-18 Jakub Jelinek <jakub@redhat.com>
1744
1745 PR c/39464
1746 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
1747 warning require that both c_common_unsigned_type as well as
1748 c_common_signed_type is the same for both mvl and mvr types.
1749
9771b263
DN
17502012-11-16 Diego Novillo <dnovillo@google.com>
1751
1752 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
1753
1754 * c-common.c: Use new vec API in vec.h.
1755 * c-common.h: Likewise.
1756 * c-gimplify.c: Likewise.
1757 * c-pragma.c: Likewise.
1758 * c-pretty-print.c: Likewise.
1759 * c-pretty-print.h: Likewise.
1760 * c-semantics.c: Likewise.
1761 * c-decl.c: Likewise.
1762 * c-parser.c: Likewise.
1763 * c-tree.h: Likewise.
1764 * c-typeck.c: Likewise.
1765
880661a4
JW
17662012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
1767
1768 PR c++/54930
1769 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
1770
077d1abe
MLI
17712012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
1772
1773 PR c/53066
1774 * c-decl.c (warn_if_shadowing): Do not warn if a variable
1775 shadows a function, unless the variable is a function or a
1776 pointer-to-function.
1777
3a785c97
JJ
17782012-10-12 Jakub Jelinek <jakub@redhat.com>
1779
1780 PR c/54381
1781 * c-parser.c (struct c_tree_loc_pair): Removed.
1782 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
1783 add location_t * and tree * arguments, fill in array of 3
1784 sizeof_arg trees and corresponding locs.
1785 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
1786 c_parser_expr_list callers.
1787 (c_parser_postfix_expression_after_primary): Likewise. Pass
1788 array of 3 sizeof_arg trees and locs (corresponding to first
1789 3 arguments) to sizeof_pointer_memaccess_warning.
1790
703c8606
LC
17912012-10-09 Lawrence Crowl <crowl@google.com>
1792
1793 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
1794 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
1795 hash table.
1796
5d9de0d0
PC
17972012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
1798
1799 PR c++/54194
1800 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
1801 call.
1802
a212e43f
MG
18032012-10-09 Marc Glisse <marc.glisse@inria.fr>
1804
1805 PR c++/54427
1806 * c-typeck.c: Include c-common.h.
1807 (enum stv_conv): Moved to c-common.h.
1808 (scalar_to_vector): Moved to c-common.c.
1809 (build_binary_op): Adapt to scalar_to_vector's new prototype.
1810 * Make-lang.in: c-typeck.c depends on c-common.h.
1811
3b78de56
AC
18122012-10-04 Arnaud Charlet <charlet@adacore.com>
1813
1814 * c-decl.c (c_write_global_declarations): Fix handling of
1815 -fdump-ada-spec*.
1816
78c60e3d
SS
18172012-09-30 Sharad Singhai <singhai@google.com>
1818
1819 * c-decl.c (c_write_global_declarations): Use a different method
1820 to determine if the dump has ben initialized.
1821
9f33203d
JM
18222012-09-14 Joseph Myers <joseph@codesourcery.com>
1823
1824 PR c/54552
1825 * c-typeck.c (c_cast_expr): When casting to a type requiring
1826 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
1827 c_fully_fold first.
1828
a27d595d
JM
18292012-09-14 Joseph Myers <joseph@codesourcery.com>
1830
1831 PR c/54103
1832 * c-typeck.c (build_unary_op): Pass original argument of
1833 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
1834 any C_MAYBE_CONST_EXPR, if it has integer operands.
1835 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
1836 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
1837 to c_objc_common_truthvalue_conversion, then remove any
1838 C_MAYBE_CONST_EXPR, if they have integer operands. Use
1839 c_objc_common_truthvalue_conversion not
1840 c_common_truthvalue_conversion.
1841 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
1842 call note_integer_operands for arguments with integer operands
1843 that are not integer constants.
1844
9feb29df
JJ
18452012-09-13 Jakub Jelinek <jakub@redhat.com>
1846
1847 PR c/54559
1848 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
1849 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
1850
d409320c
JJ
18512012-08-31 Jakub Jelinek <jakub@redhat.com>
1852
1853 PR c/54428
1854 * c-convert.c (convert): Don't call fold_convert_loc if
1855 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
1856 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
1857 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
1858
6265d07c
JJ
18592012-08-24 Jakub Jelinek <jakub@redhat.com>
1860
1861 PR c/54355
1862 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
1863 for nested and empty_ok arguments in the call to
1864 c_parser_declaration_or_fndef.
1865
1a4049e7
JJ
18662012-08-17 Jakub Jelinek <jakub@redhat.com>
1867
1868 * c-tree.h (c_last_sizeof_arg): Declare.
1869 * c-parser.c (struct c_tree_loc_pair): New type.
1870 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
1871 non-NULL.
1872 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
1873 (c_parser_postfix_expression_after_primary): Likewise. Call
1874 sizeof_pointer_memaccess_warning if needed.
1875 (sizeof_ptr_memacc_comptypes): New function.
1876 * c-typeck.c (c_last_sizeof_arg): New global variable.
1877 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
1878
0229aee9
UB
18792012-07-24 Uros Bizjak <ubizjak@gmail.com>
1880
1881 * c-lang.h (lang_decl): Add variable_size GTY option.
1882
7ee2468b
SB
18832012-07-16 Steven Bosscher <steven@gcc.gnu.org>
1884
1885 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
1886 * Make-lang.in: Fix dependencies.
1887
d4a10d0a
SB
18882012-06-29 Steven Bosscher <steven@gcc.gnu.org>
1889
1890 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
1891 and add language Makefile hooks.
1892 * config-lang.in: New file.
1893 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
1894 add the required "normal" config-lang.in rules.
1895 * c-lang.h: Moved from gcc/ to here.
1896 * c-tree.h: Likewise.
1897 * c-objc-common.c: Likewise.
1898 * c-objc-common.h: Likewise.
1899 * c-typeck.c: Likewise.
1900 * c-convert.c: Likewise.
1901 * c-lang.c: Likewise.
1902 * c-aux-info.c: Likewise.
1903 * c-errors.c: Likewise.
1904 * gccspec.c: Likewise.
1905 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
1906 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
1907\f
23a5b65a 1908Copyright (C) 2012-2014 Free Software Foundation, Inc.
d4a10d0a
SB
1909
1910Copying and distribution of this file, with or without modification,
1911are permitted in any medium without royalty provided the copyright
1912notice and this notice are preserved.