]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/c/ChangeLog
decl.c, [...]: Remove redundant enum from machine_mode.
[thirdparty/gcc.git] / gcc / c / ChangeLog
1 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
2
3 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
4 machine_mode.
5
6 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
7
8 * c-decl.c: Adjust include files.
9 * c-parser.c: Ditto.
10
11 2014-10-27 Phil Muldoon <pmuldoon@redhat.com>
12 Tom Tromey <tromey@redhat.com>
13
14 * c-tree.h (enum c_oracle_request): New.
15 (c_binding_oracle_function): New typedef.
16 (c_binding_oracle, c_pushtag, c_bind): Declare.
17 * c-decl.c (c_binding_oracle): New global.
18 (I_SYMBOL_CHECKED): New macro.
19 (i_symbol_binding): New function.
20 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
21 (I_TAG_CHECKED): New macro.
22 (i_tag_binding): New function.
23 (I_TAG_BINDING, I_TAG_DECL): Redefine.
24 (I_LABEL_CHECKED): New macro.
25 (i_label_binding): New function.
26 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
27 (c_print_identifier): Save and restore c_binding_oracle.
28 (c_pushtag, c_bind): New functions.
29
30 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
31
32 * c-typeck.c: Adjust include files.
33
34 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
35
36 PR c++/53061
37 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
38 initialization here...
39 (c_initialize_diagnostics): ... but here. Set defaults after
40 building pretty-printer.
41
42 2014-10-23 Marek Polacek <polacek@redhat.com>
43
44 PR c/63626
45 * c-decl.c (pop_scope): Don't print warning in external_scope.
46
47 2014-10-19 Marek Polacek <polacek@redhat.com>
48
49 PR c/63567
50 * c-typeck.c (output_init_element): Allow initializing objects with
51 static storage duration with compound literals even in C99 and add
52 pedwarn for it.
53
54 2014-10-17 Marek Polacek <polacek@redhat.com>
55
56 PR c/63567
57 * c-typeck.c (digest_init): Allow initializing objects with static
58 storage duration with compound literals even in C99 and add pedwarn
59 for it.
60
61 2014-10-17 Marek Polacek <polacek@redhat.com>
62
63 PR c/63543
64 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
65 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
66 error multiple times. Print the type.
67
68 2014-10-17 Marek Polacek <polacek@redhat.com>
69
70 PR c/63549
71 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
72 type.
73
74 2014-10-17 Marek Polacek <polacek@redhat.com>
75
76 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
77 (start_function): Use OPT_Wimplicit_int instead of 0.
78 (store_parm_decls_oldstyle): Likewise.
79
80 2014-10-17 Alan Modra <amodra@gmail.com>
81
82 PR middle-end/61848
83 * c-decl.c (merge_decls): Don't merge section name or tls model
84 to newdecl symtab node, instead merge to olddecl. Override
85 existing olddecl section name. Set tls_model for all thread-local
86 vars, not just OMP thread-private ones. Remove incorrect comment.
87
88 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
89
90 * c-decl.c: Adjust include files.
91
92 2014-10-14 DJ Delorie <dj@redhat.com>
93
94 * c-parser.c (c_parse_init): Add RID entries for each __intN.
95 (c_token_starts_typename): Check all __intN, not just __int128.
96 (c_token_starts_declspecs): Likewise.
97 (c_parser_declspecs): Likewise.
98 (c_parser_attribute_any_word): Likewise.
99 (c_parser_objc_selector): Likewise.
100 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
101 (struct c_declspecs): Add int_n_idx field to record *which* __intN
102 is specified.
103 * c-decl.c (declspecs_add_type): Check for all __intN, not just
104 __int128.
105 (finish_declspecs): Likewise.
106
107 2014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
108
109 * c-parser.c (c_parser_all_labels): New function to replace
110 the duplicate code.
111 (c_parser_statement): Call the new function.
112
113 2014-10-09 Marek Polacek <polacek@redhat.com>
114
115 PR c/63480
116 * c-typeck.c (pop_init_level): Don't warn about initializing
117 with { }.
118
119 2014-10-07 Marek Polacek <polacek@redhat.com>
120
121 PR c/59717
122 * c-decl.c (header_for_builtin_fn): New function.
123 (implicitly_declare): Suggest which header to include.
124
125 2014-10-07 Marek Polacek <polacek@redhat.com>
126
127 * c-convert.c (convert): Use error_operand_p.
128 * c-typeck.c (require_complete_type): Likewise.
129 (really_atomic_lvalue): Likewise.
130 (digest_init): Likewise.
131 (handle_omp_array_sections_1): Likewise.
132
133 2014-10-03 Marek Polacek <polacek@redhat.com>
134
135 PR c/63453
136 * c-decl.c (pop_scope): Don't warn about "inline function declared
137 but never defined" for functions marked with gnu_inline attribute.
138
139 2014-09-25 Jakub Jelinek <jakub@redhat.com>
140
141 PR c++/63249
142 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
143 on low_bound and length.
144
145 2014-09-24 Marek Polacek <polacek@redhat.com>
146
147 PR c/61405
148 PR c/53874
149 * c-parser.c: Don't define CPP_KEYWORD.
150 (c_parser_switch_statement): Pass original type to c_finish_case.
151 * c-tree.h (c_finish_case): Update declaration.
152 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
153 conditionally to c_do_switch_warnings.
154
155 2014-09-03 Marek Polacek <polacek@redhat.com>
156
157 PR c/62024
158 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
159 conversions.
160
161 2014-09-02 Jakub Jelinek <jakub@redhat.com>
162 Balaji V. Iyer <balaji.v.iyer@intel.com>
163 Igor Zamyatin <igor.zamyatin@intel.com>
164
165 * c-parser.c (c_parser_cilk_for): New function.
166 (c_parser_cilk_grainsize): Likewise.
167 (c_get_temp_regvar): Likewise.
168 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
169 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
170 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
171 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
172 case.
173
174 2014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
175
176 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
177 with using HOST_WIDE_INT without truncation to 'int'
178
179 2014-08-22 Marek Polacek <polacek@redhat.com>
180
181 PR c++/62199
182 * c-typeck.c (parser_build_binary_op): Adjust call to
183 warn_logical_not_parentheses.
184
185 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
186
187 PR other/62008
188 * c-parser.c (c_parser_array_notation): Check for correct
189 type of an array added.
190
191 2014-08-19 Marek Polacek <polacek@redhat.com>
192
193 PR c++/62153
194 * c-typeck.c (build_binary_op): If either operand of a comparison
195 is a boolean expression, call maybe_warn_bool_compare.
196
197 2014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
198
199 PR c/45584
200 * c-typeck.c (build_c_cast): Do a conversion even when the
201 TYPE_MAIN_VARIANTs are the same.
202
203 2014-08-19 Marek Polacek <polacek@redhat.com>
204
205 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
206 pedwarn_c99 instead of pedwarn.
207 (grokfield): Likewise.
208 (warn_defaults_to): New function.
209 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
210 Unconditionally call pedwarn_c99 instead of pedwarn.
211 (start_function): Call warn_defaults_to instead of pedwarn_c99.
212 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
213 check flag_isoc11 before.
214 * c-errors.c (pedwarn_c99): Change the return type to bool.
215 Handle -Wc99-c11-compat.
216 * c-parser.c (disable_extension_diagnostics): Handle
217 warn_c99_c11_compat.
218 (restore_extension_diagnostics): Likewise.
219 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
220 instead of pedwarn, don't check flag_isoc11 before.
221 (c_parser_declspecs): Likewise.
222 (c_parser_alignas_specifier): Likewise.
223 (c_parser_alignof_expression): Likewise.
224 (c_parser_generic_selection): Likewise.
225 * c-tree.h (pedwarn_c99): Update declaration.
226 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
227 of pedwarn_c99.
228
229 2014-08-19 Marek Polacek <polacek@redhat.com>
230
231 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
232 to pedwarn_c90.
233 * c-errors.c: Include "opts.h".
234 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
235 * c-parser.c (disable_extension_diagnostics): Handle negative value
236 of warn_c90_c99_compat, too.
237 (restore_extension_diagnostics): Likewise.
238 (c_parser_compound_statement_nostart): Pass
239 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
240
241 2014-08-12 Marek Polacek <polacek@redhat.com>
242
243 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
244 Add pedwarn.
245 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
246 Likewise.
247 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
248
249 2014-08-10 Marek Polacek <polacek@redhat.com>
250
251 PR c/51849
252 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
253 Call pedwarn_c90 instead of pedwarn.
254 (check_bitfield_type_and_width): Likewise.
255 (declspecs_add_qual): Likewise.
256 (declspecs_add_type): Likewise.
257 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
258 Adjust to only call pedwarn_c90.
259 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
260 pedwarn_c90 instead of pedwarn.
261 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
262 * c-parser.c (disable_extension_diagnostics): Handle
263 warn_c90_c99_compat.
264 (restore_extension_diagnostics): Likewise.
265 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
266 pedwarn_c90 instead of pedwarn.
267 (c_parser_initelt): Likewise.
268 (c_parser_postfix_expression): Likewise.
269 (c_parser_postfix_expression_after_paren_type): Likewise.
270 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
271 * c-tree.h: Fix formatting.
272 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
273 pedwarn_c90 instead of pedwarn.
274
275 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
276
277 * c-typeck.c: Remove include of pointer-set.h.
278
279 2014-08-07 Marek Polacek <polacek@redhat.com>
280
281 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
282
283 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
284
285 * c-typeck.c: Use hash_map instead of pointer_map.
286
287 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
288
289 * c-decl.c: Use hash_set instead of pointer_set.
290
291 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
292
293 PR middle-end/61455
294 * c-array-notation.c (expand_array_notations): Handling
295 of DECL_EXPR added.
296
297 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
298
299 PR c++/60517
300 * c-typeck.c (c_finish_return): Return 0 instead of the address of
301 a local variable.
302
303 2014-07-30 Tom Tromey <tromey@redhat.com>
304
305 * c-typeck.c (struct constructor_stack) <designator_depth>: New
306 field.
307 (really_start_incremental_init, push_init_level): Initialize
308 designator_depth.
309 (pop_init_level): Set global designator_depth.
310 (process_init_element): Check for designated_init attribute.
311
312 2014-07-20 Marek Polacek <polacek@redhat.com>
313
314 PR c/61852
315 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
316 (implicitly_declare): Pass location to implicit_decl_warning.
317
318 2014-07-14 Jakub Jelinek <jakub@redhat.com>
319
320 PR middle-end/61294
321 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
322 If non-NULL, call c_parser_check_literal_zero.
323 (c_parser_check_literal_zero): New function.
324 (c_parser_postfix_expression_after_primary): Adjust
325 c_parser_expr_list caller, handle -Wmemset-transposed-args.
326
327 2014-07-06 Marek Polacek <polacek@redhat.com>
328
329 PR c/6940
330 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
331 * c-tree.h (C_ARRAY_PARAMETER): Define.
332 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
333 function parameter.
334
335 2014-07-02 Jan Hubicka <hubicka@ucw.cz>
336 Chen Gang <gang.chen.5i5j@gmail.com>
337
338 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
339 releasing symbol.
340
341 2014-07-01 Marek Polacek <polacek@redhat.com>
342
343 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
344 instead of 0 to WARN_FOR_ASSIGNMENT.
345
346 2014-07-01 Marek Polacek <polacek@redhat.com>
347
348 PR c/58286
349 * c-typeck.c (convert_for_assignment): Pass
350 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
351
352 2014-06-30 Marek Polacek <polacek@redhat.com>
353
354 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
355 has no_sanitize_undefined attribute.
356
357 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
358
359 PR middle-end/57541
360 * c-array-notation.c (fix_builtin_array_notation_fn):
361 Check for 0 arguments in builtin call. Check that bultin argument is
362 correct.
363 * c-parser.c (c_parser_array_notation): Check for incorrect initial
364 index.
365
366 2014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
367
368 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
369 qualifiers in __auto_type for atomic types.
370 (c_parser_typeof_specifier): Discard all type qualifiers in
371 __typeof__ for atomic types.
372
373 2014-06-25 Marek Polacek <polacek@redhat.com>
374
375 PR c/61162
376 * c-parser.c (c_parser_statement_after_labels): Pass the location of
377 the return expression to c_finish_return.
378
379 2014-06-25 Jakub Jelinek <jakub@redhat.com>
380
381 * c-typeck.c (c_finish_omp_clauses): Make sure
382 OMP_CLAUSE_LINEAR_STEP has correct type.
383
384 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
385
386 * c-decl.c: Adjust.
387
388 2014-06-24 Jakub Jelinek <jakub@redhat.com>
389
390 * c-parser.c (c_parser_omp_for_loop): For
391 #pragma omp parallel for simd move lastprivate clause from parallel
392 to for rather than simd.
393
394 2014-06-23 Marek Polacek <polacek@redhat.com>
395
396 * c-typeck.c (parser_build_binary_op): Don't call
397 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
398
399 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
400
401 * c-parser.c (c_parser_omp_threadprivate): Likewise.
402 * c-decl.c (merge_decls): Likewise.
403
404 2014-06-09 Marek Polacek <polacek@redhat.com>
405
406 PR c/36446
407 * c-typeck.c (error_init): Call inform instead of error_at.
408 (pedwarn_init): Call inform instead of pedwarn.
409 (warning_init): Call inform instead of warning_at.
410
411 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
412
413 * c-decl.c (merge_decls): Use set_decl_section_name.
414 (duplicate_decls): Remove node if it exists.
415
416 2014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
417
418 PR c/53119
419 * c-typeck.c (push_init_level, process_init_element,
420 pop_init_level): Correct check for zero initialization, move
421 missing brace warning to respect zero initialization.
422
423 2014-06-05 Marek Polacek <polacek@redhat.com>
424
425 PR c/56724
426 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
427
428 2014-06-05 Marek Polacek <polacek@redhat.com>
429
430 PR c/49706
431 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
432 on the left hand side operand of a comparison.
433
434 2014-06-05 Marek Polacek <polacek@redhat.com>
435
436 PR c/48062
437 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
438 Print note only if the warning was printed.
439
440 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
441
442 PR c/58942
443 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
444 with a pointer.
445
446 2014-06-03 Marek Polacek <polacek@redhat.com>
447
448 PR c/60439
449 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
450 c_start_case.
451 * c-tree.h (c_start_case): Update.
452 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
453 switch condition has boolean value.
454
455 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
456
457 * c-decl.c: Include builtins.h.
458 * c-parser.c: Likewise.
459
460 2014-05-27 Marek Polacek <polacek@redhat.com>
461
462 PR c/56724
463 * c-typeck.c (convert_arguments): Get location of a parameter. Change
464 error and warning calls to error_at and warning_at. Pass location of
465 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
466 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
467 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
468
469 2014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
470
471 PR c/61191
472 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
473 function parameters.
474
475 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
476
477 * c-decl.c (merge_decls): Preserve symtab node pointers.
478 (duplicate_decls): Free new decl.
479
480 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
481
482 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
483 initialization.
484
485 * c-parser.c (c_parser_omp_target): Return bool values.
486
487 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
488
489 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
490 num_teams_loc variable to num_thread_limit_loc.
491
492 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
493
494 * c-array-notation.c (expand_array_notations): Use void_node
495 instead of void_zero_node.
496
497 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
498
499 * c-decl.c (finish_struct): Adjust.
500 (finish_enum): Likewise.
501 (bind): Adjust.
502 (record_inline_static): Likewise.
503 (push_scope): Likewise.
504 (make_label): Likewise.
505 (lookup_label_for_goto): Likewise.
506 (finish_struct): Likewise.
507 (finish_enum): Likewise.
508 (store_parm_decls): Likewise.
509 (c_push_function_context): Likewise.
510 * c-lang.h: Remove usage of variable_size gty attribute.
511 * c-parser.c (c_parse_init): Adjust.
512 (c_parse_file): Likewise.
513
514 2014-05-13 Marek Polacek <polacek@redhat.com>
515
516 PR c/61162
517 * c-typeck.c (convert_for_assignment): Pass location to
518 WARN_FOR_ASSIGNMENT instead of input_location.
519
520 2014-05-10 Marek Polacek <polacek@redhat.com>
521
522 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
523 maybe_warn_string_init.
524 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
525 maybe_warn_string_init.
526 * c-tree.h (maybe_warn_string_init): Update declaration.
527 * c-typeck.c (maybe_warn_string_init): Add location parameter.
528 Call pedwarn_init with loc instead of with input_location.
529 (digest_init): Pass init_loc to maybe_warn_string_init.
530 (pop_init_level): Call pedwarn_init with loc instead of with
531 input_location.
532 (set_init_index): Likewise.
533 (process_init_element): Likewise.
534
535 2014-05-09 Marek Polacek <polacek@redhat.com>
536
537 PR c/61096
538 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
539 (c_parser_initelt): Pass location to set_init_label. Pass array index
540 location to set_init_index.
541 * c-tree.h (push_init_level): Update declaration.
542 (pop_init_level): Likewise.
543 (set_init_index): Likewise.
544 (set_init_label): Likewise.
545 * c-typeck.c (error_init): Add location parameter. Call error_at
546 instead of error.
547 (digest_init): Pass init_loc to error_init.
548 (really_start_incremental_init):
549 (push_init_level): Add location parameter. Pass loc to pop_init_level
550 and error_init.
551 (pop_init_level): Likewise.
552 (set_designator): Add location parameter. Pass loc to pop_init_level,
553 push_init_level, and error_init.
554 (set_init_index): Add location parameter. Pass loc to error_init and
555 set_designator.
556 (set_init_label): Likewise.
557 (output_init_element): Pass loc to error_init.
558 (process_init_element): Pass loc to error_init, pop_init_level,
559 pedwarn_init, and push_init_level.
560
561 2014-05-09 Marek Polacek <polacek@redhat.com>
562
563 PR c/50459
564 * c-parser.c (c_parser_attributes): Parse the arguments as an
565 expression-list if the attribute takes identifier.
566
567 2014-05-08 Marek Polacek <polacek@redhat.com>
568
569 PR c/61053
570 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
571 TYPE_ALIGN_UNIT.
572
573 2014-05-08 Marek Polacek <polacek@redhat.com>
574
575 PR c/61077
576 * c-decl.c (start_function): Warn for _Atomic-qualified return type
577 of main.
578
579 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
580 Mike Stump <mikestump@comcast.net>
581 Richard Sandiford <rdsandiford@googlemail.com>
582
583 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
584 (finish_enum): Use wide-int interfaces.
585 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
586 * c-typeck.c (build_c_cast): Likewise.
587 (set_nonincremental_init_from_string): Likewise.
588 (c_tree_equal): Likewise.
589
590 2014-05-02 Marek Polacek <polacek@redhat.com>
591
592 PR c/25801
593 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
594 Return size_one_node when the type is not complete.
595 (pointer_diff): Remove comment.
596 (build_unary_op): Improve error messages.
597
598 2014-05-02 Marek Polacek <polacek@redhat.com>
599
600 * c-typeck.c (c_finish_return): Separate warning_at calls.
601
602 2014-05-02 Marek Polacek <polacek@redhat.com>
603
604 * c-tree.h (error_init): Remove declaration.
605 (pedwarn_init): Likewise.
606 * c-typeck.c (error_init): Make static and move above.
607 (pedwarn_init): Likewise.
608 (warning_init): Move above.
609 (maybe_warn_string_init): Likewise.
610
611 2014-05-01 Jeff Law <law@redhat.com>
612
613 Revert:
614
615 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
616 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
617 avoid goto.
618
619 2014-05-02 Marek Polacek <polacek@redhat.com>
620
621 PR c/60784
622 * c-typeck.c (push_init_level): Set constructor_designated to
623 p->designated for structures.
624
625 2014-05-01 Marek Polacek <polacek@redhat.com>
626
627 PR c/60915
628 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
629 function-definition has an attribute after the declarator.
630
631 2014-05-01 Marek Polacek <polacek@redhat.com>
632
633 PR c/60257
634 * c-typeck.c (warning_init): Add location_t parameter. Call
635 warning_at instead of warning.
636 (push_init_level): Pass input_location to warning_init.
637 (add_pending_init): Add location_t parameter. Pass loc to
638 warning_init.
639 (set_nonincremental_init): Pass input_location to add_pending_init.
640 (set_nonincremental_init_from_string): Likewise.
641 (output_init_element): Pass loc to warning_init and to
642 add_pending_init.
643
644 2014-05-01 Marek Polacek <polacek@redhat.com>
645
646 PR c/43395
647 * c-typeck.c (c_finish_return): Distinguish between label and variable
648 when warning about returning local address.
649
650 2014-05-01 Marek Polacek <polacek@redhat.com>
651
652 PR c/29467
653 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
654 in C89 mode.
655
656 2014-05-01 Marek Polacek <polacek@redhat.com>
657
658 PR c/43245
659 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
660 instead of 0 to WARN_FOR_QUALIFIERS.
661
662 2014-05-01 Marek Polacek <polacek@redhat.com>
663
664 PR c/56989
665 * c-typeck.c (default_conversion): Use better location for
666 error call.
667
668 2014-04-30 Marek Polacek <polacek@redhat.com>
669
670 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
671 also when SANITIZE_FLOAT_DIVIDE is on.
672
673 2014-04-30 Marek Polacek <polacek@redhat.com>
674
675 PR c/60139
676 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
677 and pedwarn_init. Use loc insted of input_location.
678
679 2014-04-30 Marek Polacek <polacek@redhat.com>
680
681 PR c/60351
682 * c-typeck.c (build_binary_op): Use location when warning about
683 shift count.
684
685 2014-04-25 Marek Polacek <polacek@redhat.com>
686
687 PR c/18079
688 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
689 always_inline/noinline and hot/cold attributes.
690
691 2014-04-25 Marek Polacek <polacek@redhat.com>
692
693 PR c/60114
694 * c-parser.c (c_parser_initelt): Pass input_location to
695 process_init_element.
696 (c_parser_initval): Pass loc to process_init_element.
697 * c-tree.h (process_init_element): Adjust declaration.
698 * c-typeck.c (push_init_level): Pass input_location to
699 process_init_element.
700 (pop_init_level): Likewise.
701 (set_designator): Likewise.
702 (output_init_element): Add location_t parameter. Pass loc to
703 digest_init.
704 (output_pending_init_elements): Pass input_location to
705 output_init_element.
706 (process_init_element): Add location_t parameter. Pass loc to
707 output_init_element.
708
709 2014-04-24 Jakub Jelinek <jakub@redhat.com>
710
711 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
712 atomic-clause, allow comma in between atomic-clause and
713 seq_cst.
714
715 2014-04-22 Jakub Jelinek <jakub@redhat.com>
716
717 PR c/59073
718 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
719 fails, don't set OM_PARALLEL_COMBINED and return NULL.
720
721 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
722
723 PR middle-end/60469
724 * c-array-notation.c (fix_builtin_array_notation_fn): Use
725 create_tmp_var instead build_decl for creating temps.
726 (build_array_notation_expr): Likewise.
727 (fix_conditional_array_notations_1): Likewise.
728 (fix_array_notation_expr): Likewise.
729 (fix_array_notation_call_expr): Likewise.
730
731 2014-03-28 Jakub Jelinek <jakub@redhat.com>
732
733 PR c++/60689
734 * c-tree.h (c_build_function_call_vec): New prototype.
735 * c-typeck.c (build_function_call_vec): Don't call
736 resolve_overloaded_builtin here.
737 (c_build_function_call_vec): New wrapper function around
738 build_function_call_vec. Call resolve_overloaded_builtin here.
739 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
740 Call c_build_function_call_vec instead of build_function_call_vec.
741 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
742 * c-decl.c (finish_decl): Likewise.
743
744 2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
745
746 PR c/55383
747 * c-typeck.c: Use correct format string in cast-qual warning
748
749 2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
750
751 * c-decl.c (c_decl_attributes): Use
752 lang_hooks.types.omp_mappable_type.
753 * c-typeck.c (c_finish_omp_clauses): Likewise.
754
755 2014-03-06 Marek Polacek <polacek@redhat.com>
756
757 PR c/60197
758 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
759 of checking tree code.
760
761 2014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
762
763 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
764 (c_parser_parameter_declaration): Likewise.
765
766 2014-02-19 Marek Polacek <polacek@redhat.com>
767
768 PR c/60195
769 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
770 Call mark_exp_read on exp.value.
771 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
772 TREE_ADDRESSABLE on old instead of val.
773 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
774
775 2014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
776
777 * c-parser.c (c_parser_get_builtin_args): Replace calls to
778 C_EXPR_APPEND by vec_safe_push.
779 * c-tree.h (C_EXPR_APPEND): Remove.
780
781 2014-01-31 Marek Polacek <polacek@redhat.com>
782
783 PR c/59963
784 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
785 build_function_call_vec.
786 (build_function_call): Likewise.
787 (build_atomic_assign): Likewise.
788 (build_function_call_vec): Add arg_loc parameter. Use it.
789 (convert_arguments): Likewise.
790 (convert_for_assignment): Rename rhs_loc to expr_loc.
791 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
792 (c_parser_objc_keywordexpr): Likewise.
793 (c_parser_postfix_expression_after_primary): Call
794 build_function_call_vec with expr_loc rather than op_loc.
795 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
796 build_function_call_vec.
797 (c_parser_expr_list): Add locations parameter. Fill it with locations
798 of function arguments.
799 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
800
801 2014-01-30 Marek Polacek <polacek@redhat.com>
802
803 PR c/59940
804 * c-typeck.c (build_function_call_vec): Use loc parameter.
805 (convert_arguments): Add location parameter. Use it.
806 (ep_convert_and_check): Likewise.
807 (build_atomic_assign): Adjust convert_for_assignment call.
808 (build_modify_expr): Likewise.
809 (digest_init): Likewise.
810 (c_finish_return): Likewise.
811 (build_conditional_expr): Adjust ep_convert_and_check calls.
812 (convert_for_assignment): Add rhs_loc parameter. Use it.
813 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
814 calls.
815
816 2014-01-30 Richard Biener <rguenther@suse.de>
817
818 PR c/59905
819 * c-typeck.c (build_function_call_vec): Do not replace calls
820 to a function via an incompatible type with a runtime abort.
821
822 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
823
824 * c-parser.c (c_parser_declaration_or_fndef): Replaced
825 flag_enable_cilkplus with flag_cilkplus.
826 (c_parser_direct_declarator_inner): Likewise.
827 (c_parser_attribute_any_word): Likewise.
828 (c_parser_attributes): Likewise.
829 (c_parser_compound_statement): Likewise.
830 (c_parser_statement_after_labels): Likewise.
831 (c_parser_if_statement): Likewise.
832 (c_parser_switch_statement): Likewise.
833 (c_parser_do_statement): Likewise.
834 (c_parser_for_statement): Likewise.
835 (c_parser_unary_expression): Likewise.
836 (c_parser_postfix_expression): Likewise.
837 (c_parser_postfix_expression_after_primary): Likewise.
838 (c_parser_postfix_expression_after_primary): Likewise.
839 (c_parser_omp_clause_name): Likewise.
840 (c_finish_omp_declare_simd): Likewise.
841 (c_parser_cilk_verify_simd): Likewise.
842 * c-typeck.c (build_array_ref): Likewise.
843 (build_function_call_vec): Likewise.
844 (convert_arguments): Likewise.
845 (build_compound_expr): Likewise.
846 (c_finish_return): Likewise.
847 (c_finish_if_stmt): Likewise.
848 (c_finish_loop): Likewise.
849 (build_binary_op): Likewise.
850
851 2014-01-23 Marek Polacek <polacek@redhat.com>
852
853 PR c/59846
854 * c-typeck.c (parser_build_binary_op): Use location instead of
855 input_location.
856 (build_binary_op): Pass location to shorten_compare.
857
858 2014-01-23 Marek Polacek <polacek@redhat.com>
859
860 PR c/58346
861 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
862 an empty aggregate.
863
864 2014-01-23 Marek Polacek <polacek@redhat.com>
865
866 PR c/59871
867 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
868 of a comma expression.
869 (emit_side_effect_warnings): Likewise.
870
871 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
872
873 PR c/59825
874 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
875 function to use walk_tree and moved a lot of its functionality to
876 expand_array_notations.
877 (expand_array_notations): New function.
878
879 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
880
881 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
882 attribute an attribute without value.
883
884 2014-01-23 Jakub Jelinek <jakub@redhat.com>
885
886 PR middle-end/58809
887 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
888 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
889
890 2014-01-22 Marek Polacek <polacek@redhat.com>
891
892 PR c/59891
893 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
894 of remove_c_maybe_const_expr on op1 and op2.
895
896 2014-01-15 Jakub Jelinek <jakub@redhat.com>
897
898 PR c/58943
899 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
900 effects, preevaluate rhs using SAVE_EXPR first.
901
902 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
903
904 PR c++/59631
905 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
906 statements with if-elseif statements.
907
908 2014-01-06 Marek Polacek <polacek@redhat.com>
909
910 PR c/57773
911 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
912 defined bit-field types only in ISO C.
913
914 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
915
916 Update copyright years
917
918 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
919
920 * c-array-notation.c: Use the standard form for the copyright notice.
921
922 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
923
924 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
925 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
926 field in parser is not empty. If not-empty, call the function
927 c_parser_finish_omp_declare_simd.
928 (c_parser_cilk_clause_vectorlength): Modified function to be shared
929 between SIMD-enabled functions and #pragma simd. Added new parameter.
930 (c_parser_cilk_all_clauses): Modified the usage of the function
931 c_parser_cilk_clause_vectorlength as mentioned above.
932 (c_parser_cilk_simd_fn_vector_attrs): New function.
933 (c_finish_cilk_simd_fn_tokens): Likewise.
934 (is_cilkplus_vector_p): Likewise.
935 (c_parser_omp_clause_name): Added checking for "vectorlength,"
936 "nomask," and "mask" strings in clause name.
937 (c_parser_omp_all_clauses): Added 3 new case statements:
938 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
939 PRAGMA_CILK_CLAUSE_NOMASK.
940 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
941 check for vector attribute and if so call the function
942 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
943 called the function c_finish_cilk_simd_fn_tokens.
944 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
945 parser field is non-empty. If so, parse them as you would parse
946 the omp declare simd pragma.
947 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
948 Added a check when step is a parameter and flag it as error.
949 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
950 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
951 pragma_omp_clause.
952
953 2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
954
955 * c-parser.c (c_parser_omp_parallel): Fix description.
956
957 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
958
959 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
960 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
961 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
962 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
963
964 2013-12-04 Joseph Myers <joseph@codesourcery.com>
965
966 PR c/52023
967 * c-parser.c (c_parser_alignas_specifier): Use
968 c_sizeof_or_alignof_type instead of c_alignof.
969 (c_parser_alignof_expression): Likewise, with min_alignof
970 parameter depending on alignof spelling used.
971
972 2013-12-04 Marek Polacek <polacek@redhat.com>
973
974 PR c/54113
975 * c-decl.c (start_function): Don't warn for missing prototype for
976 inline functions.
977
978 2013-12-03 Marek Polacek <polacek@redhat.com>
979
980 PR c/59351
981 * c-decl.c (build_compound_literal): Allow compound literals with
982 empty initial value.
983
984 2013-12-02 Joseph Myers <joseph@codesourcery.com>
985
986 PR c/58235
987 * c-typeck.c (build_modify_expr): Diagnose assignment to
988 expression with array type.
989
990 2013-11-29 Joseph Myers <joseph@codesourcery.com>
991
992 PR c/42262
993 * c-typeck.c (process_init_element): Do not treat a string as
994 initializing a whole array when used with a designator for an
995 individual element.
996
997 2013-11-29 Joseph Myers <joseph@codesourcery.com>
998
999 PR c/57574
1000 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
1001 an inline function following a static declaration.
1002
1003 2013-11-28 Jakub Jelinek <jakub@redhat.com>
1004
1005 PR c/59310
1006 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
1007 to p_name before calling c_parser_omp_teams instead of after.
1008 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
1009 argument. Remove unused p_name variable.
1010
1011 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
1012 Jakub Jelinek <jakub@redhat.com>
1013
1014 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
1015 external_scope is NULL.
1016
1017 2013-11-27 Tom de Vries <tom@codesourcery.com>
1018 Marc Glisse <marc.glisse@inria.fr>
1019
1020 PR c++/59032
1021 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
1022
1023 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
1024
1025 * c-typeck.c: Add required include files from gimple.h.
1026
1027 2013-11-22 David Malcolm <dmalcolm@redhat.com>
1028
1029 * c-decl.c (define_label, shadow_tag_warned)
1030 (check_bitfield_type_and_width, grokdeclarator, grokparms,
1031 store_parm_decls_newstyle, store_parm_decls_oldstyle)
1032 (declspecs_add_type): Remove use of in_system_header macro.
1033 * c-parser.c (c_parser_unary_expression): Likewise.
1034 * c-typeck.c (store_init_value, process_init_element)
1035 (c_start_case): Likewise.
1036
1037 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
1038 macro.
1039
1040 * c-parser.c (c_parser_set_source_position_from_token): Remove
1041 reference to in_system_header from comment.
1042
1043 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1044
1045 * c-decl.c (grokdeclarator): Update comment to refer to
1046 tree_to_[su]hwi rather than tree_low_cst.
1047
1048 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1049
1050 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
1051 tree_to_uhwi throughout.
1052
1053 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1054
1055 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
1056 throughout.
1057
1058 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1059
1060 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
1061 throughout.
1062
1063 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
1064
1065 * c-parser.c (c_parser_cilk_simd): New.
1066 (c_parser_cilk_verify_simd): New.
1067 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
1068 (c_parser_omp_for_loop): Add case for NE_EXPR.
1069 Set c_break_label for CILK_SIMD.
1070 (c_parser_cilk_clause_vectorlength): New.
1071 (c_parser_cilk_clause_linear): New.
1072 (c_parser_cilk_clause_name): New.
1073 (c_parser_cilk_all_clauses): New.
1074 * c-typeck.c (build_unary_op): Pass location argument to
1075 readonly_error.
1076 (build_modify_expr): Same.
1077 (build_asm_expr): Same.
1078 (c_finish_bc_stmt): Error on break/continue in loops.
1079
1080 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
1081
1082 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
1083
1084 2013-11-14 Diego Novillo <dnovillo@google.com>
1085
1086 * c-decl.c: Include print-tree.h.
1087 Include stor-layout.h.
1088 Include varasm.h.
1089 Include attribs.h.
1090 Include stringpool.h.
1091 * c-lang.c: Include fold-const.h.
1092 * c-parser.c: Include stringpool.h.
1093 Include attribs.h.
1094 Include stor-layout.h.
1095 Include varasm.h.
1096 Include trans-mem.h.
1097 * c-typeck.c: Include stor-layout.h.
1098 Include trans-mem.h.
1099 Include varasm.h.
1100 Include stmt.h.
1101
1102 2013-11-13 Joseph Myers <joseph@codesourcery.com>
1103
1104 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
1105 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
1106 __auto_type.
1107 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
1108 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
1109 RID_AUTO_TYPE.
1110 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
1111 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
1112 (c_parser_declarator, c_parser_direct_declarator_inner)
1113 (c_parser_parameter_declaration, c_parser_type_name): All callers
1114 changed.
1115 (c_parser_declaration_or_fndef): Handle declarations with type
1116 determined from the initializer.
1117
1118 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
1119
1120 * c-typeck.c: Include gimplify.h.
1121
1122 2013-11-12 Joseph Myers <joseph@codesourcery.com>
1123
1124 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
1125 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
1126 comment.
1127 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
1128 or _Thread_local as appropriate in diagnostics.
1129 (build_null_declspecs): Initialize ret->thread_gnu_p.
1130 (declspecs_add_scspec): Handle either __thread or _Thread_local
1131 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
1132 pedantic. Do not disallow _Thread_local extern and _Thread_local
1133 static.
1134
1135 2013-11-07 Joseph Myers <joseph@codesourcery.com>
1136 Andrew MacLeod <amacleod@redhat.com>
1137
1138 * c-aux-info.c (gen_type): Handle atomic qualifier.
1139 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
1140 qualifiers when compating types.
1141 (shadow_tag_warned): Handle atomic_p in declspecs.
1142 (quals_from_declspecs): Likewise.
1143 (start_decl): Use c_type_promotes_to when promoting argument
1144 types.
1145 (grokdeclarator): Handle _Atomic.
1146 (get_parm_info): Diagnose any qualifier on "void" as only
1147 parameter.
1148 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
1149 comparing types. Use c_type_promotes_to when promoting argument
1150 types.
1151 (finish_function): Use c_type_promotes_to when promoting argument
1152 types.
1153 (build_null_declspecs): Handle atomic_p in declspecs.
1154 (declspecs_add_qual): Handle RID_ATOMIC.
1155 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
1156 (c_token_starts_declspecs): Handle RID_ATOMIC.
1157 (c_parser_declspecs): Handle atomic type specifiers and
1158 qualifiers.
1159 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
1160 from types of expressions with atomic type.
1161 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
1162 (c_parser_attribute_any_word): Handle RID_ATOMIC.
1163 (c_parser_initializer, c_parser_initelt, c_parser_initval)
1164 (c_parser_statement_after_labels, c_parser_switch_statement)
1165 (c_parser_for_statement, c_parser_expr_no_commas)
1166 (c_parser_conditional_expression, c_parser_binary_expression)
1167 (c_parser_cast_expression, c_parser_unary_expression)
1168 (c_parser_postfix_expression)
1169 (c_parser_postfix_expression_after_primary, c_parser_expression):
1170 Use convert_lvalue_to_rvalue.
1171 (c_parser_expression_conv, c_parser_expr_list): Document
1172 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
1173 (c_parser_objc_synchronized_statement): Use
1174 convert_lvalue_to_rvalue.
1175 (c_parser_objc_selector): Handle RID_ATOMIC.
1176 (c_parser_objc_receiver, c_parser_array_notation): Use
1177 convert_lvalue_to_rvalue.
1178 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
1179 _Atomic (type-name).
1180 (struct c_declspecs): Add atomic_p field.
1181 (convert_lvalue_to_rvalue): Declare.
1182 * c-typeck.c (c_type_promotes_to): Promote atomic types to
1183 corresponding atomic types.
1184 (qualify_type): Don't add _Atomic qualifiers from second argument.
1185 (comp_target_types): Do not allow _Atomic mismatches.
1186 (type_lists_compatible_p): Do not remove atomic qualifiers when
1187 comparing types.
1188 (really_atomic_lvalue, convert_lvalue_to_rvalue)
1189 (build_atomic_assign): New functions.
1190 (build_unary_op): Use build_atomic_assign for atomic increment and
1191 decrement.
1192 (build_conditional_expr): Do not treat _Atomic void as a qualified
1193 version of void.
1194 (build_modify_expr): Use build_atomic_assign for atomic LHS.
1195 (find_anonymous_field_with_type, convert_to_anonymous_field)
1196 (convert_for_assignment): Do not remove atomic qualifiers when
1197 comparing types.
1198 (digest_init): Do not accept initialization of arrays of atomic
1199 elements by string constants.
1200 (build_asm_expr): Use convert_lvalue_to_rvalue.
1201 (build_binary_op): Do not treat _Atomic void as a qualified
1202 version of void.
1203
1204 2013-11-06 DJ Delorie <dj@redhat.com>
1205
1206 * c-decl.c (locate_old_decl): If a previous conflicting decl is
1207 both explicit and builtin, print the location of the explicit one.
1208
1209 2013-11-05 Tobias Burnus <burnus@net-b.de>
1210
1211 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
1212 c_parser_omp_distribute, c_parser_omp_teams,
1213 c_parser_omp_target, c_parser_omp_declare): Handle
1214 -fopenmp-simd.
1215
1216 2013-11-03 Marek Polacek <polacek@redhat.com>
1217
1218 * c-decl.c (grokdeclarator): Add VLA instrumentation.
1219
1220 2013-11-01 Jakub Jelinek <jakub@redhat.com>
1221
1222 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
1223 check_dup_generic at the end, unless remove is true.
1224 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
1225 remove = true;.
1226 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
1227
1228 2013-10-31 Jakub Jelinek <jakub@redhat.com>
1229
1230 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
1231 with decl that is not pointer nor array.
1232
1233 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
1234
1235 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
1236 a spawning function is found.
1237 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
1238 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
1239 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
1240 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
1241 case.
1242 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
1243 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
1244 expr.
1245 (c_finish_return): Added a check to reject _Cilk_spawn in return
1246 expression.
1247 (build_cilk_spawn): New function.
1248 (build_cilk_sync): Likewise.
1249 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
1250
1251 2013-10-27 Tobias Burnus <burnus@net-b.de>
1252
1253 PR other/33426
1254 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
1255 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
1256 (c_parser_statement_after_labels): Update calls.
1257
1258 2013-10-24 Tobias Burnus <burnus@net-b.de>
1259
1260 PR other/33426
1261 * c-parser.c (c_parser_pragma, c_parser_for_statement):
1262 Handle PRAGMA_IVDEP.
1263 (c_parser_statement_after_labels): Update call.
1264
1265 2013-10-24 Marek Polacek <polacek@redhat.com>
1266
1267 * c-parser.c (c_parser_struct_declaration): Add a comment.
1268 (c_parser_declarator): Don't allow _Alignas here.
1269
1270 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
1271
1272 * c-parser.c: Include omp-low.h.
1273 * c-typeck.c: Likewise.
1274
1275 2013-10-17 Marek Polacek <polacek@redhat.com>
1276
1277 PR c/58267
1278 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
1279 Document syntax of the array-declarator.
1280 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
1281 are not permitted.
1282 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
1283 (c_parser_struct_declaration): Likewise.
1284 (c_parser_declarator): Likewise.
1285 (c_parser_direct_declarator_inner): Likewise.
1286 (c_parser_parameter_declaration): Likewise.
1287 (c_parser_type_name): Likewise.
1288
1289 2013-10-11 Jakub Jelinek <jakub@redhat.com>
1290
1291 * c-lang.h (current_omp_declare_target_attribute): New extern
1292 decl.
1293 * c-parser.c: Include c-lang.h.
1294 (struct c_parser): Change tokens to c_token *.
1295 Add tokens_buf field. Change tokens_avail type to unsigned int.
1296 (c_parser_consume_token): If parser->tokens isn't
1297 &parser->tokens_buf[0], increment parser->tokens.
1298 (c_parser_consume_pragma): Likewise.
1299 (enum pragma_context): Add pragma_struct and pragma_param.
1300 (c_parser_external_declaration): Adjust
1301 c_parser_declaration_or_fndef caller.
1302 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
1303 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
1304 Adjust recursive call.
1305 (c_parser_struct_or_union_specifier): Use pragma_struct instead
1306 of pragma_external.
1307 (c_parser_parameter_declaration): Use pragma_param instead of
1308 pragma_external.
1309 (c_parser_compound_statement_nostart, c_parser_label,
1310 c_parser_for_statement): Adjust
1311 c_parser_declaration_or_fndef callers.
1312 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
1313 it through to c_parser_conditional_expression.
1314 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
1315 pass it through to c_parser_binary_expression. Adjust recursive
1316 call.
1317 (c_parser_binary_expression): Remove prec argument, add
1318 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
1319 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
1320 binop matches it, use build2 instead of parser_build_binary_op.
1321 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
1322 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
1323 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
1324 Handle pragma_struct and pragma_param the same as pragma_external.
1325 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
1326 (c_parser_omp_variable_list): Parse array sections for
1327 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
1328 (c_parser_omp_clause_collapse): Fully fold collapse expression.
1329 (c_parser_omp_clause_reduction): Handle user defined reductions.
1330 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
1331 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
1332 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
1333 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
1334 c_parser_omp_clause_depend, c_parser_omp_clause_map,
1335 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
1336 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
1337 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
1338 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
1339 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
1340 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
1341 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
1342 (c_parser_omp_for_loop): Add CODE argument, pass it through
1343 to c_finish_omp_for. Change last argument to cclauses,
1344 and adjust uses to grab parallel clauses from the array of all
1345 the split clauses. Adjust c_parser_binary_expression,
1346 c_parser_declaration_or_fndef and c_finish_omp_for callers.
1347 (omp_split_clauses): New function.
1348 (c_parser_omp_simd): New function.
1349 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
1350 Allow the function to be called also when parsing combined constructs,
1351 and call c_parser_omp_simd when parsing for simd.
1352 (c_parser_omp_sections_scope): If section-sequence doesn't start with
1353 #pragma omp section, require exactly one structured-block instead of
1354 sequence of statements.
1355 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
1356 Allow the function to be called also when parsing combined constructs.
1357 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
1358 Allow the function to be called also when parsing combined
1359 constructs.
1360 (c_parser_omp_taskgroup, c_parser_omp_cancel,
1361 c_parser_omp_cancellation_point, c_parser_omp_distribute,
1362 c_parser_omp_teams, c_parser_omp_target_data,
1363 c_parser_omp_target_update, c_parser_omp_target,
1364 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
1365 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
1366 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
1367 (c_parser_omp_construct): Add p_name and mask vars. Handle
1368 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
1369 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
1370 and c_parser_omp_sections callers.
1371 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
1372 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
1373 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
1374 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
1375 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
1376 OMP_CLAUSE_DEPEND.
1377 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
1378 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
1379 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
1380 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
1381 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
1382 * c-typeck.c: Include tree-inline.h.
1383 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
1384 handle_omp_array_sections_1, handle_omp_array_sections,
1385 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
1386 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
1387 user defined reductions.
1388 (c_tree_equal): New function.
1389 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
1390 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
1391 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
1392 c_check_omp_declare_reduction_r): New prototypes.
1393 * c-decl.c (current_omp_declare_target_attribute): New variable.
1394 (c_decl_attributes): New function.
1395 (start_decl, start_function): Use it instead of decl_attributes.
1396 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
1397 c_omp_reduction_decl, c_omp_reduction_lookup,
1398 c_check_omp_declare_reduction_r): New functions.
1399
1400 2013-09-25 Tom Tromey <tromey@redhat.com>
1401
1402 * Make-lang.in (c/gccspec.o): Remove.
1403 (CFLAGS-c/gccspec.o): New variable.
1404 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
1405 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
1406 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
1407
1408 2013-09-25 Tom Tromey <tromey@redhat.com>
1409
1410 * Make-lang.in (c/gccspec.o): Don't use subshell.
1411
1412 2013-09-18 Marek Polacek <polacek@redhat.com>
1413
1414 PR sanitize/58443
1415 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
1416 Remove unnecessary check.
1417
1418 2013-09-18 Marek Polacek <polacek@redhat.com>
1419
1420 PR sanitizer/58411
1421 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
1422 no_sanitize_undefined attribute.
1423
1424 2013-09-13 Kai Tietz <ktietz@redhat.com>
1425
1426 PR target/57848
1427 * c-decl.c (c_builtin_function_ext_scope): Remove
1428 wrong assumption that it is never called on prexisting
1429 symbol.
1430
1431 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
1432
1433 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
1434
1435 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
1436
1437 * c-objc-common.c (c_tree_printer): Tidy.
1438
1439 2013-08-30 Marek Polacek <polacek@redhat.com>
1440
1441 * c-typeck.c (build_binary_op): Add division by zero and shift
1442 instrumentation.
1443
1444 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
1445 Joseph Myers <joseph@codesourcery.com>
1446
1447 PR c/35649
1448 * c-typeck.c (c_common_type): Prefer double_type_node over
1449 other REAL_TYPE types with the same precision.
1450 (convert_arguments): Likewise.
1451
1452 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
1453
1454 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
1455 (c_initialize_diagnostics): Call a destructor for the early printer.
1456
1457 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
1458
1459 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
1460 printer initialization.
1461
1462 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
1463
1464 PR c/57490
1465 * c-array-notation.c (fix_conditional_array_notations_1): Added a
1466 check for truth values.
1467 (expand_array_notation_exprs): Added truth values case. Removed an
1468 unwanted else. Added for-loop to walk through subtrees in default
1469 case.
1470
1471 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
1472
1473 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
1474
1475 2013-07-23 Joseph Myers <joseph@codesourcery.com>
1476
1477 * c-parser.c (struct c_generic_association): Fix typo.
1478
1479 2013-07-23 Tom Tromey <tromey@redhat.com>
1480 Joseph Myers <joseph@codesourcery.com>
1481
1482 * c-parser.c (struct c_generic_association): New.
1483 (c_generic_association_d): New typedef.
1484 (c_parser_generic_selection): New function.
1485 (c_parser_postfix_expression): Handle RID_GENERIC.
1486
1487 2013-07-13 Jason Merrill <jason@redhat.com>
1488
1489 PR c++/57793
1490 * c-decl.c (finish_struct): Check for too-large class.
1491
1492 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
1493
1494 PR c/57821
1495 * c-typeck.c (set_init_index): When folding, check for index overflow.
1496
1497 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
1498
1499 * c-parser.c (c_parser_array_notation): Removed rejection of array
1500 notations in an array of function pointers.
1501
1502 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
1503
1504 * c-array-notation.c (make_triplet_val_inv): New function.
1505 (create_cmp_incr): Likewise.
1506 (create_array_refs): Likewise.
1507 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
1508 Also modularized common parts between functions and called the function.
1509 (build_array_notation_expr): Likewise.
1510 (fix_conditional_array_notations_1): Likewise.
1511 (fix_array_notation_expr): Likewise.
1512 (fix_array_notation_call_expr): Likewise.
1513
1514 2013-06-18 Marek Polacek <polacek@redhat.com>
1515
1516 PR c/57630
1517 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
1518
1519 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
1520
1521 * c-array-notation.c (build_array_notation_expr): Reject array notation
1522 mismatch between LHS and RHS even inside a call_expr. Also, removed
1523 a couple while statements that were dead code.
1524
1525 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
1526
1527 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
1528 excessive precision expressions in function parameters. Also removed
1529 couple unwanted while statements.
1530
1531 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
1532
1533 * c-array-notation.c (expand_array_notation_exprs): Added
1534 ARRAY_NOTATION_REF case.
1535
1536 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
1537
1538 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
1539 function to c-family/array-notation-common.c.
1540 (is_cilkplus_reduce_builtin): Likewise.
1541 (find_rank): Likewise.
1542 (extract_array_notation_exprs): Likewise.
1543 (replace_array_notations): Likewise.
1544 (find_inv_trees): Likewise.
1545 (replace_inv_trees): Likewise.
1546 (contains_array_notation_expr): Likewise.
1547 (find_correct_array_notation_type): Likewise.
1548 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
1549 (struct inv_list): Moved this to c-family/array-notation-common.c.
1550 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
1551
1552 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
1553
1554 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
1555 reduction functions outside the for-loop. Added a check if the fundecl
1556 is non-NULL. Finally, removed an unwanted if-statement, and made the
1557 body unconditional.
1558
1559 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
1560
1561 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
1562 condition of the if-statement matches the rank of else-block and then-
1563 block when array notations are used.
1564 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
1565 expression after the entire function body is parsed.
1566 (c_parser_expr_no_commas): Delayed creating array notation expressions
1567 to the end of function parsing.
1568 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
1569 whole if-statement instead of just the condition.
1570 (expand_array_notation_exprs): Added MODIFY_EXPR case.
1571
1572 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
1573
1574 PR c/57474
1575 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
1576 array to NULL_TREE if they are unused. Also added a check for the
1577 field to be NULL before its fields are used in future.
1578
1579 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1580
1581 PR bootstrap/57450
1582 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
1583 (build_array_notation_expr): Likewise.
1584
1585 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
1586
1587 * c-typeck.c (build_array_ref): Added a check to see if array's
1588 index is greater than one. If true, then emit an error.
1589 (build_function_call_vec): Exclude error reporting and checking
1590 for builtin array-notation functions.
1591 (convert_arguments): Likewise.
1592 (c_finish_return): Added a check for array notations as a return
1593 expression. If true, then emit an error.
1594 (c_finish_loop): Added a check for array notations in a loop
1595 condition. If true then emit an error.
1596 (lvalue_p): Added a ARRAY_NOTATION_REF case.
1597 (build_binary_op): Added a check for array notation expr inside
1598 op1 and op0. If present, we call another function to find correct
1599 type.
1600 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
1601 * c-parser.c (c_parser_compound_statement): Check if array
1602 notation code is used in tree, if so, then transform them into
1603 appropriate C code.
1604 (c_parser_expr_no_commas): Check if array notation is used in LHS
1605 or RHS, if so, then build array notation expression instead of
1606 regular modify.
1607 (c_parser_postfix_expression_after_primary): Added a check for
1608 colon(s) after square braces, if so then handle it like an array
1609 notation. Also, break up array notations in unary op if found.
1610 (c_parser_direct_declarator_inner): Added a check for array
1611 notation.
1612 (c_parser_compound_statement): Added a check for array notation in
1613 a stmt. If one is present, then expand array notation expr.
1614 (c_parser_if_statement): Likewise.
1615 (c_parser_switch_statement): Added a check for array notations in
1616 a switch statement's condition. If true, then output an error.
1617 (c_parser_while_statement): Similarly, but for a while.
1618 (c_parser_do_statement): Similarly, but for a do-while.
1619 (c_parser_for_statement): Similarly, but for a for-loop.
1620 (c_parser_unary_expression): Check if array notation is used in a
1621 pre-increment or pre-decrement expression. If true, then expand
1622 them.
1623 (c_parser_array_notation): New function.
1624 * c-array-notation.c: New file.
1625 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
1626
1627 2013-05-23 Mike Stump <mikestump@comcast.net>
1628
1629 * c-typeck.c (convert_for_assignment): Handle references to memory
1630 spaces better.
1631
1632 2013-05-16 Jason Merrill <jason@redhat.com>
1633
1634 * Make-lang.in (cc1$(exeext)): Use link mutex.
1635
1636 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
1637
1638 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
1639 to simply use OPT_Wpointer_arith.
1640 (build_unary_op): Likewise.
1641
1642 2013-04-03 Jakub Jelinek <jakub@redhat.com>
1643
1644 PR c/19449
1645 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
1646 argument. If set, or it temporarily for parsing of the first
1647 argument into force_folding_builtin_constant_p.
1648 (c_parser_postfix_expression): Adjust callers.
1649
1650 2013-03-21 Richard Biener <rguenther@suse.de>
1651
1652 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
1653 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
1654
1655 2013-02-12 Marek Polacek <polacek@redhat.com>
1656
1657 PR c/44938
1658 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
1659 origtypes to NULL.
1660
1661 2013-01-24 Jakub Jelinek <jakub@redhat.com>
1662
1663 PR c/56078
1664 * c-typeck.c (set_nonincremental_init_from_string): If
1665 constructor_max_index is NULL, treat it as if tree_int_cst_lt
1666 returned false.
1667 (process_init_element): Likewise.
1668
1669 2012-12-20 Jakub Jelinek <jakub@redhat.com>
1670
1671 PR c++/55619
1672 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
1673 argument, don't call default_function_array_conversion
1674 nor c_fully_fold here.
1675 (c_parser_asm_statement): Adjust callers.
1676 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
1677 and outputs here, and call default_function_array_conversion
1678 on inputs that don't need to be addressable.
1679
1680 2012-12-18 Jakub Jelinek <jakub@redhat.com>
1681
1682 PR c/39464
1683 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
1684 warning require that both c_common_unsigned_type as well as
1685 c_common_signed_type is the same for both mvl and mvr types.
1686
1687 2012-11-16 Diego Novillo <dnovillo@google.com>
1688
1689 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
1690
1691 * c-common.c: Use new vec API in vec.h.
1692 * c-common.h: Likewise.
1693 * c-gimplify.c: Likewise.
1694 * c-pragma.c: Likewise.
1695 * c-pretty-print.c: Likewise.
1696 * c-pretty-print.h: Likewise.
1697 * c-semantics.c: Likewise.
1698 * c-decl.c: Likewise.
1699 * c-parser.c: Likewise.
1700 * c-tree.h: Likewise.
1701 * c-typeck.c: Likewise.
1702
1703 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
1704
1705 PR c++/54930
1706 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
1707
1708 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
1709
1710 PR c/53066
1711 * c-decl.c (warn_if_shadowing): Do not warn if a variable
1712 shadows a function, unless the variable is a function or a
1713 pointer-to-function.
1714
1715 2012-10-12 Jakub Jelinek <jakub@redhat.com>
1716
1717 PR c/54381
1718 * c-parser.c (struct c_tree_loc_pair): Removed.
1719 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
1720 add location_t * and tree * arguments, fill in array of 3
1721 sizeof_arg trees and corresponding locs.
1722 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
1723 c_parser_expr_list callers.
1724 (c_parser_postfix_expression_after_primary): Likewise. Pass
1725 array of 3 sizeof_arg trees and locs (corresponding to first
1726 3 arguments) to sizeof_pointer_memaccess_warning.
1727
1728 2012-10-09 Lawrence Crowl <crowl@google.com>
1729
1730 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
1731 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
1732 hash table.
1733
1734 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
1735
1736 PR c++/54194
1737 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
1738 call.
1739
1740 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
1741
1742 PR c++/54427
1743 * c-typeck.c: Include c-common.h.
1744 (enum stv_conv): Moved to c-common.h.
1745 (scalar_to_vector): Moved to c-common.c.
1746 (build_binary_op): Adapt to scalar_to_vector's new prototype.
1747 * Make-lang.in: c-typeck.c depends on c-common.h.
1748
1749 2012-10-04 Arnaud Charlet <charlet@adacore.com>
1750
1751 * c-decl.c (c_write_global_declarations): Fix handling of
1752 -fdump-ada-spec*.
1753
1754 2012-09-30 Sharad Singhai <singhai@google.com>
1755
1756 * c-decl.c (c_write_global_declarations): Use a different method
1757 to determine if the dump has ben initialized.
1758
1759 2012-09-14 Joseph Myers <joseph@codesourcery.com>
1760
1761 PR c/54552
1762 * c-typeck.c (c_cast_expr): When casting to a type requiring
1763 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
1764 c_fully_fold first.
1765
1766 2012-09-14 Joseph Myers <joseph@codesourcery.com>
1767
1768 PR c/54103
1769 * c-typeck.c (build_unary_op): Pass original argument of
1770 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
1771 any C_MAYBE_CONST_EXPR, if it has integer operands.
1772 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
1773 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
1774 to c_objc_common_truthvalue_conversion, then remove any
1775 C_MAYBE_CONST_EXPR, if they have integer operands. Use
1776 c_objc_common_truthvalue_conversion not
1777 c_common_truthvalue_conversion.
1778 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
1779 call note_integer_operands for arguments with integer operands
1780 that are not integer constants.
1781
1782 2012-09-13 Jakub Jelinek <jakub@redhat.com>
1783
1784 PR c/54559
1785 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
1786 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
1787
1788 2012-08-31 Jakub Jelinek <jakub@redhat.com>
1789
1790 PR c/54428
1791 * c-convert.c (convert): Don't call fold_convert_loc if
1792 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
1793 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
1794 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
1795
1796 2012-08-24 Jakub Jelinek <jakub@redhat.com>
1797
1798 PR c/54355
1799 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
1800 for nested and empty_ok arguments in the call to
1801 c_parser_declaration_or_fndef.
1802
1803 2012-08-17 Jakub Jelinek <jakub@redhat.com>
1804
1805 * c-tree.h (c_last_sizeof_arg): Declare.
1806 * c-parser.c (struct c_tree_loc_pair): New type.
1807 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
1808 non-NULL.
1809 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
1810 (c_parser_postfix_expression_after_primary): Likewise. Call
1811 sizeof_pointer_memaccess_warning if needed.
1812 (sizeof_ptr_memacc_comptypes): New function.
1813 * c-typeck.c (c_last_sizeof_arg): New global variable.
1814 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
1815
1816 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
1817
1818 * c-lang.h (lang_decl): Add variable_size GTY option.
1819
1820 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
1821
1822 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
1823 * Make-lang.in: Fix dependencies.
1824
1825 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
1826
1827 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
1828 and add language Makefile hooks.
1829 * config-lang.in: New file.
1830 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
1831 add the required "normal" config-lang.in rules.
1832 * c-lang.h: Moved from gcc/ to here.
1833 * c-tree.h: Likewise.
1834 * c-objc-common.c: Likewise.
1835 * c-objc-common.h: Likewise.
1836 * c-typeck.c: Likewise.
1837 * c-convert.c: Likewise.
1838 * c-lang.c: Likewise.
1839 * c-aux-info.c: Likewise.
1840 * c-errors.c: Likewise.
1841 * gccspec.c: Likewise.
1842 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
1843 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
1844 \f
1845 Copyright (C) 2012-2014 Free Software Foundation, Inc.
1846
1847 Copying and distribution of this file, with or without modification,
1848 are permitted in any medium without royalty provided the copyright
1849 notice and this notice are preserved.