]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
2015-01-06 Sandra Loosemore <sandra@codesourcery.com>
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
d353bf18 12015-01-05 Jakub Jelinek <jakub@redhat.com>
2
823a9dd4 3 PR sanitizer/64344
4 * c-typeck.c (convert_for_assignment, c_finish_return): For
5 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
6 types also set in_late_binary_op around convert call.
7 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
8 to integral type casts, if not in_late_binary_op, pass c_fully_fold
9 result on expr as last argument to ubsan_instrument_float_cast,
10 if in_late_binary_op, don't use c_save_expr but save_expr.
11
d353bf18 12 Update copyright years.
13
92b63884 142015-01-05 Marek Polacek <polacek@redhat.com>
15
16 PR c/64423
17 * c-typeck.c (build_array_ref): Pass loc down to
18 warn_array_subscript_with_type_char.
19
8a8211df 202014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
21
22 * c-typeck.c: New behavious for pointers to arrays with qualifiers
23 (common-pointer-type): For pointers to arrays take qualifiers from
24 element type.
25 (build_conditional_expr): Add warnings for lost qualifiers.
26 (comp-target-types): Allow pointers to arrays with different qualifiers.
27 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
28 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
29 to PEDWARN_FOR_QUALIFIERS.
30
35ea0139 312014-12-17 Jakub Jelinek <jakub@redhat.com>
32
33 PR sanitizer/64289
34 * c-convert.c: Include ubsan.h.
35 (convert): For real -> integral casts and
36 -fsanitize=float-cast-overflow don't call convert_to_integer, but
37 instead instrument the float cast directly.
38
f9e245b2 392014-11-29 Jakub Jelinek <jakub@redhat.com>
40
41 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
42 c_finish_stmt_expr): Remove NULL last argument from
43 create_tmp_var_raw and create_tmp_var calls.
44 * c-array-notation.c (fix_builtin_array_notation_fn,
45 build_array_notation_expr, fix_conditional_array_notations_1,
46 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
47
fce2dbd1 482014-11-28 Marek Polacek <polacek@redhat.com>
49
50 PR c/63862
51 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
52 convert the right operand to integer type.
53
396c36b7 542014-11-25 Marek Polacek <polacek@redhat.com>
55
56 PR c/63877
57 * c-decl.c (start_function): Disable -Wmissing-declarations warning
58 for inline functions.
59
c61ef207 602014-11-21 Jakub Jelinek <jakub@redhat.com>
61
62 PR target/63764
63 * c-typeck.c (build_array_ref): Adjust
64 convert_vector_to_pointer_for_subscript caller. If it returns true,
65 call non_lvalue_loc on the result.
66
565353e8 672014-11-11 Richard Biener <rguenther@suse.de>
68
69 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
70 to true.
71
fdd735a7 722014-11-10 Andi Kleen <ak@linux.intel.com>
73
74 PR c/60804
75 * c-parser.c (c_parser_statement_after_labels): Call
76 check_no_cilk.
77 (c_parser_if_statement): Dito.
78 (c_parser_switch_statement): Dito.
79 (c_parser_while_statement): Dito.
80 (c_parser_do_statement): Dito.
81 (c_parser_for_statement): Dito.
82 * c-typeck.c (c_finish_loop): Dito.
83
0feb4de1 842014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
85
86 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
87 OPT_Wshift_count_overflow in the warnings.
88
a3fec48a 892014-10-30 Marek Polacek <polacek@redhat.com>
90
91 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
92 print the stripped version as well, if they're not the same.
93
3754d046 942014-10-29 Richard Sandiford <richard.sandiford@arm.com>
95
96 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
97 machine_mode.
98
1140c305 992014-10-28 Andrew MacLeod <amacleod@redhat.com>
100
101 * c-decl.c: Adjust include files.
102 * c-parser.c: Ditto.
103
ab103e33 1042014-10-27 Phil Muldoon <pmuldoon@redhat.com>
105 Tom Tromey <tromey@redhat.com>
106
107 * c-tree.h (enum c_oracle_request): New.
108 (c_binding_oracle_function): New typedef.
109 (c_binding_oracle, c_pushtag, c_bind): Declare.
110 * c-decl.c (c_binding_oracle): New global.
111 (I_SYMBOL_CHECKED): New macro.
112 (i_symbol_binding): New function.
113 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
114 (I_TAG_CHECKED): New macro.
115 (i_tag_binding): New function.
116 (I_TAG_BINDING, I_TAG_DECL): Redefine.
117 (I_LABEL_CHECKED): New macro.
118 (i_label_binding): New function.
119 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
120 (c_print_identifier): Save and restore c_binding_oracle.
121 (c_pushtag, c_bind): New functions.
122
94ea8568 1232014-10-27 Andrew MacLeod <amacleod@redhat.com>
124
125 * c-typeck.c: Adjust include files.
126
32ecf960 1272014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
128
129 PR c++/53061
130 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
131 initialization here...
132 (c_initialize_diagnostics): ... but here. Set defaults after
133 building pretty-printer.
134
2981340f 1352014-10-23 Marek Polacek <polacek@redhat.com>
136
137 PR c/63626
138 * c-decl.c (pop_scope): Don't print warning in external_scope.
139
d303aeaf 1402014-10-19 Marek Polacek <polacek@redhat.com>
141
142 PR c/63567
143 * c-typeck.c (output_init_element): Allow initializing objects with
144 static storage duration with compound literals even in C99 and add
145 pedwarn for it.
146
bccf97da 1472014-10-17 Marek Polacek <polacek@redhat.com>
148
149 PR c/63567
150 * c-typeck.c (digest_init): Allow initializing objects with static
151 storage duration with compound literals even in C99 and add pedwarn
152 for it.
153
d9c77450 1542014-10-17 Marek Polacek <polacek@redhat.com>
155
156 PR c/63543
157 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
158 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
159 error multiple times. Print the type.
160
a2bbd0a7 1612014-10-17 Marek Polacek <polacek@redhat.com>
162
163 PR c/63549
164 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
165 type.
166
e610d2b2 1672014-10-17 Marek Polacek <polacek@redhat.com>
168
169 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
170 (start_function): Use OPT_Wimplicit_int instead of 0.
171 (store_parm_decls_oldstyle): Likewise.
172
6b6e56b6 1732014-10-17 Alan Modra <amodra@gmail.com>
174
175 PR middle-end/61848
176 * c-decl.c (merge_decls): Don't merge section name or tls model
177 to newdecl symtab node, instead merge to olddecl. Override
178 existing olddecl section name. Set tls_model for all thread-local
179 vars, not just OMP thread-private ones. Remove incorrect comment.
180
a3020f2f 1812014-10-16 Andrew MacLeod <amacleod@redhat.com>
182
183 * c-decl.c: Adjust include files.
184
9f75f026 1852014-10-14 DJ Delorie <dj@redhat.com>
186
187 * c-parser.c (c_parse_init): Add RID entries for each __intN.
188 (c_token_starts_typename): Check all __intN, not just __int128.
189 (c_token_starts_declspecs): Likewise.
190 (c_parser_declspecs): Likewise.
191 (c_parser_attribute_any_word): Likewise.
192 (c_parser_objc_selector): Likewise.
193 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
194 (struct c_declspecs): Add int_n_idx field to record *which* __intN
195 is specified.
196 * c-decl.c (declspecs_add_type): Check for all __intN, not just
197 __int128.
198 (finish_declspecs): Likewise.
199
4f284d4a 2002014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
201
202 * c-parser.c (c_parser_all_labels): New function to replace
203 the duplicate code.
204 (c_parser_statement): Call the new function.
205
61a892dc 2062014-10-09 Marek Polacek <polacek@redhat.com>
207
208 PR c/63480
209 * c-typeck.c (pop_init_level): Don't warn about initializing
210 with { }.
211
4e888fd9 2122014-10-07 Marek Polacek <polacek@redhat.com>
213
214 PR c/59717
215 * c-decl.c (header_for_builtin_fn): New function.
216 (implicitly_declare): Suggest which header to include.
217
224bdd51 2182014-10-07 Marek Polacek <polacek@redhat.com>
219
220 * c-convert.c (convert): Use error_operand_p.
221 * c-typeck.c (require_complete_type): Likewise.
222 (really_atomic_lvalue): Likewise.
223 (digest_init): Likewise.
224 (handle_omp_array_sections_1): Likewise.
225
a2bc79db 2262014-10-03 Marek Polacek <polacek@redhat.com>
227
228 PR c/63453
229 * c-decl.c (pop_scope): Don't warn about "inline function declared
230 but never defined" for functions marked with gnu_inline attribute.
231
4fc4088b 2322014-09-25 Jakub Jelinek <jakub@redhat.com>
233
234 PR c++/63249
235 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
236 on low_bound and length.
237
5213d6c9 2382014-09-24 Marek Polacek <polacek@redhat.com>
239
240 PR c/61405
241 PR c/53874
242 * c-parser.c: Don't define CPP_KEYWORD.
243 (c_parser_switch_statement): Pass original type to c_finish_case.
244 * c-tree.h (c_finish_case): Update declaration.
245 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
246 conditionally to c_do_switch_warnings.
247
6ea2b1bc 2482014-09-03 Marek Polacek <polacek@redhat.com>
249
250 PR c/62024
251 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
252 conversions.
253
40750995 2542014-09-02 Jakub Jelinek <jakub@redhat.com>
255 Balaji V. Iyer <balaji.v.iyer@intel.com>
256 Igor Zamyatin <igor.zamyatin@intel.com>
257
258 * c-parser.c (c_parser_cilk_for): New function.
259 (c_parser_cilk_grainsize): Likewise.
260 (c_get_temp_regvar): Likewise.
261 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
262 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
263 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
264 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
265 case.
266
8c583613 2672014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
268
269 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
270 with using HOST_WIDE_INT without truncation to 'int'
271
dc6229e8 2722014-08-22 Marek Polacek <polacek@redhat.com>
273
274 PR c++/62199
275 * c-typeck.c (parser_build_binary_op): Adjust call to
276 warn_logical_not_parentheses.
277
5fdda74b 2782014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
279
280 PR other/62008
281 * c-parser.c (c_parser_array_notation): Check for correct
282 type of an array added.
283
78bf4156 2842014-08-19 Marek Polacek <polacek@redhat.com>
285
286 PR c++/62153
287 * c-typeck.c (build_binary_op): If either operand of a comparison
288 is a boolean expression, call maybe_warn_bool_compare.
289
005b8fe7 2902014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
291
292 PR c/45584
293 * c-typeck.c (build_c_cast): Do a conversion even when the
294 TYPE_MAIN_VARIANTs are the same.
295
508ea33a 2962014-08-19 Marek Polacek <polacek@redhat.com>
297
298 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
299 pedwarn_c99 instead of pedwarn.
300 (grokfield): Likewise.
301 (warn_defaults_to): New function.
302 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
303 Unconditionally call pedwarn_c99 instead of pedwarn.
304 (start_function): Call warn_defaults_to instead of pedwarn_c99.
305 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
306 check flag_isoc11 before.
307 * c-errors.c (pedwarn_c99): Change the return type to bool.
308 Handle -Wc99-c11-compat.
309 * c-parser.c (disable_extension_diagnostics): Handle
310 warn_c99_c11_compat.
311 (restore_extension_diagnostics): Likewise.
312 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
313 instead of pedwarn, don't check flag_isoc11 before.
314 (c_parser_declspecs): Likewise.
315 (c_parser_alignas_specifier): Likewise.
316 (c_parser_alignof_expression): Likewise.
317 (c_parser_generic_selection): Likewise.
318 * c-tree.h (pedwarn_c99): Update declaration.
319 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
320 of pedwarn_c99.
321
806fe15e 3222014-08-19 Marek Polacek <polacek@redhat.com>
323
324 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
325 to pedwarn_c90.
326 * c-errors.c: Include "opts.h".
327 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
328 * c-parser.c (disable_extension_diagnostics): Handle negative value
329 of warn_c90_c99_compat, too.
330 (restore_extension_diagnostics): Likewise.
331 (c_parser_compound_statement_nostart): Pass
332 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
333
89868e45 3342014-08-12 Marek Polacek <polacek@redhat.com>
335
336 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
337 Add pedwarn.
338 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
339 Likewise.
340 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
341
890c2e2f 3422014-08-10 Marek Polacek <polacek@redhat.com>
343
344 PR c/51849
345 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
346 Call pedwarn_c90 instead of pedwarn.
347 (check_bitfield_type_and_width): Likewise.
348 (declspecs_add_qual): Likewise.
349 (declspecs_add_type): Likewise.
350 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
351 Adjust to only call pedwarn_c90.
352 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
353 pedwarn_c90 instead of pedwarn.
354 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
355 * c-parser.c (disable_extension_diagnostics): Handle
356 warn_c90_c99_compat.
357 (restore_extension_diagnostics): Likewise.
358 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
359 pedwarn_c90 instead of pedwarn.
360 (c_parser_initelt): Likewise.
361 (c_parser_postfix_expression): Likewise.
362 (c_parser_postfix_expression_after_paren_type): Likewise.
363 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
364 * c-tree.h: Fix formatting.
365 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
366 pedwarn_c90 instead of pedwarn.
367
7149db5f 3682014-08-07 Trevor Saunders <tsaunders@mozilla.com>
369
370 * c-typeck.c: Remove include of pointer-set.h.
371
1c75251e 3722014-08-07 Marek Polacek <polacek@redhat.com>
373
374 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
375
06ecf488 3762014-08-02 Trevor Saunders <tsaunders@mozilla.com>
377
378 * c-typeck.c: Use hash_map instead of pointer_map.
379
431205b7 3802014-08-02 Trevor Saunders <tsaunders@mozilla.com>
381
382 * c-decl.c: Use hash_set instead of pointer_set.
383
3394c80c 3842014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
385
386 PR middle-end/61455
387 * c-array-notation.c (expand_array_notations): Handling
388 of DECL_EXPR added.
389
f22a2cb7 3902014-07-31 Marc Glisse <marc.glisse@inria.fr>
391
392 PR c++/60517
393 * c-typeck.c (c_finish_return): Return 0 instead of the address of
394 a local variable.
395
74691f46 3962014-07-30 Tom Tromey <tromey@redhat.com>
397
398 * c-typeck.c (struct constructor_stack) <designator_depth>: New
399 field.
400 (really_start_incremental_init, push_init_level): Initialize
401 designator_depth.
402 (pop_init_level): Set global designator_depth.
403 (process_init_element): Check for designated_init attribute.
404
f9767fb6 4052014-07-20 Marek Polacek <polacek@redhat.com>
406
407 PR c/61852
408 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
409 (implicitly_declare): Pass location to implicit_decl_warning.
410
305d96bc 4112014-07-14 Jakub Jelinek <jakub@redhat.com>
412
413 PR middle-end/61294
414 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
415 If non-NULL, call c_parser_check_literal_zero.
416 (c_parser_check_literal_zero): New function.
417 (c_parser_postfix_expression_after_primary): Adjust
418 c_parser_expr_list caller, handle -Wmemset-transposed-args.
419
87d59e72 4202014-07-06 Marek Polacek <polacek@redhat.com>
421
422 PR c/6940
423 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
424 * c-tree.h (C_ARRAY_PARAMETER): Define.
425 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
426 function parameter.
427
752098c8 4282014-07-02 Jan Hubicka <hubicka@ucw.cz>
429 Chen Gang <gang.chen.5i5j@gmail.com>
430
431 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
432 releasing symbol.
433
1207866e 4342014-07-01 Marek Polacek <polacek@redhat.com>
435
436 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
437 instead of 0 to WARN_FOR_ASSIGNMENT.
438
7a6bbb76 4392014-07-01 Marek Polacek <polacek@redhat.com>
440
441 PR c/58286
442 * c-typeck.c (convert_for_assignment): Pass
443 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
444
70575064 4452014-06-30 Marek Polacek <polacek@redhat.com>
446
447 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
448 has no_sanitize_undefined attribute.
449
4879e4cf 4502014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
451
452 PR middle-end/57541
453 * c-array-notation.c (fix_builtin_array_notation_fn):
454 Check for 0 arguments in builtin call. Check that bultin argument is
455 correct.
456 * c-parser.c (c_parser_array_notation): Check for incorrect initial
457 index.
458
45c5b823 4592014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
460
461 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
462 qualifiers in __auto_type for atomic types.
463 (c_parser_typeof_specifier): Discard all type qualifiers in
464 __typeof__ for atomic types.
465
430b73ee 4662014-06-25 Marek Polacek <polacek@redhat.com>
467
468 PR c/61162
469 * c-parser.c (c_parser_statement_after_labels): Pass the location of
470 the return expression to c_finish_return.
471
9580cb79 4722014-06-25 Jakub Jelinek <jakub@redhat.com>
473
474 * c-typeck.c (c_finish_omp_clauses): Make sure
475 OMP_CLAUSE_LINEAR_STEP has correct type.
476
c1f445d2 4772014-06-24 Trevor Saunders <tsaunders@mozilla.com>
478
479 * c-decl.c: Adjust.
480
e471cc6f 4812014-06-24 Jakub Jelinek <jakub@redhat.com>
482
483 * c-parser.c (c_parser_omp_for_loop): For
484 #pragma omp parallel for simd move lastprivate clause from parallel
485 to for rather than simd.
486
499b7390 4872014-06-23 Marek Polacek <polacek@redhat.com>
488
489 * c-typeck.c (parser_build_binary_op): Don't call
490 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
491
5e68df57 4922014-06-15 Jan Hubicka <hubicka@ucw.cz>
493
494 * c-parser.c (c_parser_omp_threadprivate): Likewise.
495 * c-decl.c (merge_decls): Likewise.
496
064b0d02 4972014-06-09 Marek Polacek <polacek@redhat.com>
498
499 PR c/36446
500 * c-typeck.c (error_init): Call inform instead of error_at.
501 (pedwarn_init): Call inform instead of pedwarn.
502 (warning_init): Call inform instead of warning_at.
503
71e19e54 5042014-06-07 Jan Hubicka <hubicka@ucw.cz>
505
506 * c-decl.c (merge_decls): Use set_decl_section_name.
507 (duplicate_decls): Remove node if it exists.
508
95cdf3fd 5092014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
510
511 PR c/53119
512 * c-typeck.c (push_init_level, process_init_element,
513 pop_init_level): Correct check for zero initialization, move
514 missing brace warning to respect zero initialization.
515
a07f86a6 5162014-06-05 Marek Polacek <polacek@redhat.com>
517
518 PR c/56724
519 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
520
32dc1512 5212014-06-05 Marek Polacek <polacek@redhat.com>
522
523 PR c/49706
524 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
525 on the left hand side operand of a comparison.
526
64cf1262 5272014-06-05 Marek Polacek <polacek@redhat.com>
528
529 PR c/48062
530 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
531 Print note only if the warning was printed.
532
071f6d39 5332014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
534
535 PR c/58942
536 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
537 with a pointer.
538
c69ec07d 5392014-06-03 Marek Polacek <polacek@redhat.com>
540
541 PR c/60439
542 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
543 c_start_case.
544 * c-tree.h (c_start_case): Update.
545 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
546 switch condition has boolean value.
547
f7715905 5482014-06-02 Andrew MacLeod <amacleod@redhat.com>
549
550 * c-decl.c: Include builtins.h.
551 * c-parser.c: Likewise.
552
dcfff6f9 5532014-05-27 Marek Polacek <polacek@redhat.com>
554
555 PR c/56724
556 * c-typeck.c (convert_arguments): Get location of a parameter. Change
557 error and warning calls to error_at and warning_at. Pass location of
558 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
559 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
560 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
561
c048c42c 5622014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
563
564 PR c/61191
565 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
566 function parameters.
567
8c016392 5682014-05-23 Jan Hubicka <hubicka@ucw.cz>
569
570 * c-decl.c (merge_decls): Preserve symtab node pointers.
571 (duplicate_decls): Free new decl.
572
184a718f 5732014-05-23 Thomas Schwinge <thomas@codesourcery.com>
574
6ce915ef 575 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
576 initialization.
577
184a718f 578 * c-parser.c (c_parser_omp_target): Return bool values.
579
22ac3f78 5802014-05-22 Thomas Schwinge <thomas@codesourcery.com>
581
582 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
583 num_teams_loc variable to num_thread_limit_loc.
584
3ab4693e 5852014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
586
587 * c-array-notation.c (expand_array_notations): Use void_node
588 instead of void_zero_node.
589
25a27413 5902014-05-17 Trevor Saunders <tsaunders@mozilla.com>
591
592 * c-decl.c (finish_struct): Adjust.
593 (finish_enum): Likewise.
594 (bind): Adjust.
595 (record_inline_static): Likewise.
596 (push_scope): Likewise.
597 (make_label): Likewise.
598 (lookup_label_for_goto): Likewise.
599 (finish_struct): Likewise.
600 (finish_enum): Likewise.
601 (store_parm_decls): Likewise.
602 (c_push_function_context): Likewise.
603 * c-lang.h: Remove usage of variable_size gty attribute.
604 * c-parser.c (c_parse_init): Adjust.
605 (c_parse_file): Likewise.
606
172b8440 6072014-05-13 Marek Polacek <polacek@redhat.com>
608
609 PR c/61162
610 * c-typeck.c (convert_for_assignment): Pass location to
611 WARN_FOR_ASSIGNMENT instead of input_location.
612
c9e51d25 6132014-05-10 Marek Polacek <polacek@redhat.com>
614
615 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
616 maybe_warn_string_init.
617 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
618 maybe_warn_string_init.
619 * c-tree.h (maybe_warn_string_init): Update declaration.
620 * c-typeck.c (maybe_warn_string_init): Add location parameter.
621 Call pedwarn_init with loc instead of with input_location.
622 (digest_init): Pass init_loc to maybe_warn_string_init.
623 (pop_init_level): Call pedwarn_init with loc instead of with
624 input_location.
625 (set_init_index): Likewise.
626 (process_init_element): Likewise.
627
53de1631 6282014-05-09 Marek Polacek <polacek@redhat.com>
629
630 PR c/61096
631 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
632 (c_parser_initelt): Pass location to set_init_label. Pass array index
633 location to set_init_index.
634 * c-tree.h (push_init_level): Update declaration.
635 (pop_init_level): Likewise.
636 (set_init_index): Likewise.
637 (set_init_label): Likewise.
638 * c-typeck.c (error_init): Add location parameter. Call error_at
639 instead of error.
640 (digest_init): Pass init_loc to error_init.
641 (really_start_incremental_init):
642 (push_init_level): Add location parameter. Pass loc to pop_init_level
643 and error_init.
644 (pop_init_level): Likewise.
645 (set_designator): Add location parameter. Pass loc to pop_init_level,
646 push_init_level, and error_init.
647 (set_init_index): Add location parameter. Pass loc to error_init and
648 set_designator.
649 (set_init_label): Likewise.
650 (output_init_element): Pass loc to error_init.
651 (process_init_element): Pass loc to error_init, pop_init_level,
652 pedwarn_init, and push_init_level.
653
3e5a8b00 6542014-05-09 Marek Polacek <polacek@redhat.com>
655
656 PR c/50459
657 * c-parser.c (c_parser_attributes): Parse the arguments as an
658 expression-list if the attribute takes identifier.
659
c2c4ae8d 6602014-05-08 Marek Polacek <polacek@redhat.com>
661
662 PR c/61053
663 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
664 TYPE_ALIGN_UNIT.
665
2026249a 6662014-05-08 Marek Polacek <polacek@redhat.com>
667
668 PR c/61077
669 * c-decl.c (start_function): Warn for _Atomic-qualified return type
670 of main.
671
960d5a55 6722014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
673 Mike Stump <mikestump@comcast.net>
674 Richard Sandiford <rdsandiford@googlemail.com>
675
676 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
677 (finish_enum): Use wide-int interfaces.
678 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
679 * c-typeck.c (build_c_cast): Likewise.
680 (set_nonincremental_init_from_string): Likewise.
681 (c_tree_equal): Likewise.
682
e0e14cbd 6832014-05-02 Marek Polacek <polacek@redhat.com>
684
685 PR c/25801
686 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
687 Return size_one_node when the type is not complete.
688 (pointer_diff): Remove comment.
689 (build_unary_op): Improve error messages.
690
27ff10cb 6912014-05-02 Marek Polacek <polacek@redhat.com>
692
693 * c-typeck.c (c_finish_return): Separate warning_at calls.
694
68410ce9 6952014-05-02 Marek Polacek <polacek@redhat.com>
696
697 * c-tree.h (error_init): Remove declaration.
698 (pedwarn_init): Likewise.
699 * c-typeck.c (error_init): Make static and move above.
700 (pedwarn_init): Likewise.
701 (warning_init): Move above.
702 (maybe_warn_string_init): Likewise.
703
e8e27117 7042014-05-01 Jeff Law <law@redhat.com>
705
706 Revert:
707
708 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
709 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
710 avoid goto.
711
971df357 7122014-05-02 Marek Polacek <polacek@redhat.com>
713
714 PR c/60784
715 * c-typeck.c (push_init_level): Set constructor_designated to
716 p->designated for structures.
717
de548fe5 7182014-05-01 Marek Polacek <polacek@redhat.com>
719
720 PR c/60915
721 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
722 function-definition has an attribute after the declarator.
723
053a0ded 7242014-05-01 Marek Polacek <polacek@redhat.com>
725
726 PR c/60257
727 * c-typeck.c (warning_init): Add location_t parameter. Call
728 warning_at instead of warning.
729 (push_init_level): Pass input_location to warning_init.
730 (add_pending_init): Add location_t parameter. Pass loc to
731 warning_init.
732 (set_nonincremental_init): Pass input_location to add_pending_init.
733 (set_nonincremental_init_from_string): Likewise.
734 (output_init_element): Pass loc to warning_init and to
735 add_pending_init.
736
694296f2 7372014-05-01 Marek Polacek <polacek@redhat.com>
738
739 PR c/43395
740 * c-typeck.c (c_finish_return): Distinguish between label and variable
741 when warning about returning local address.
742
86bbd7f9 7432014-05-01 Marek Polacek <polacek@redhat.com>
744
745 PR c/29467
746 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
747 in C89 mode.
748
e4ab2ef3 7492014-05-01 Marek Polacek <polacek@redhat.com>
750
751 PR c/43245
752 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
753 instead of 0 to WARN_FOR_QUALIFIERS.
754
ca3999cb 7552014-05-01 Marek Polacek <polacek@redhat.com>
756
757 PR c/56989
758 * c-typeck.c (default_conversion): Use better location for
759 error call.
760
52cc0072 7612014-04-30 Marek Polacek <polacek@redhat.com>
762
763 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
764 also when SANITIZE_FLOAT_DIVIDE is on.
765
af379dd3 7662014-04-30 Marek Polacek <polacek@redhat.com>
767
768 PR c/60139
769 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
770 and pedwarn_init. Use loc insted of input_location.
771
b069c2a0 7722014-04-30 Marek Polacek <polacek@redhat.com>
773
774 PR c/60351
775 * c-typeck.c (build_binary_op): Use location when warning about
776 shift count.
777
4a026b48 7782014-04-25 Marek Polacek <polacek@redhat.com>
779
780 PR c/18079
781 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
782 always_inline/noinline and hot/cold attributes.
783
adc93f31 7842014-04-25 Marek Polacek <polacek@redhat.com>
785
786 PR c/60114
787 * c-parser.c (c_parser_initelt): Pass input_location to
788 process_init_element.
789 (c_parser_initval): Pass loc to process_init_element.
790 * c-tree.h (process_init_element): Adjust declaration.
791 * c-typeck.c (push_init_level): Pass input_location to
792 process_init_element.
793 (pop_init_level): Likewise.
794 (set_designator): Likewise.
795 (output_init_element): Add location_t parameter. Pass loc to
796 digest_init.
797 (output_pending_init_elements): Pass input_location to
798 output_init_element.
799 (process_init_element): Add location_t parameter. Pass loc to
800 output_init_element.
801
e1029911 8022014-04-24 Jakub Jelinek <jakub@redhat.com>
803
804 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
805 atomic-clause, allow comma in between atomic-clause and
806 seq_cst.
807
9f0a7bc6 8082014-04-22 Jakub Jelinek <jakub@redhat.com>
809
810 PR c/59073
811 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
812 fails, don't set OM_PARALLEL_COMBINED and return NULL.
813
094da06d 8142014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
815
816 PR middle-end/60469
817 * c-array-notation.c (fix_builtin_array_notation_fn): Use
818 create_tmp_var instead build_decl for creating temps.
819 (build_array_notation_expr): Likewise.
820 (fix_conditional_array_notations_1): Likewise.
821 (fix_array_notation_expr): Likewise.
822 (fix_array_notation_call_expr): Likewise.
823
5a672e62 8242014-03-28 Jakub Jelinek <jakub@redhat.com>
825
826 PR c++/60689
827 * c-tree.h (c_build_function_call_vec): New prototype.
828 * c-typeck.c (build_function_call_vec): Don't call
829 resolve_overloaded_builtin here.
830 (c_build_function_call_vec): New wrapper function around
831 build_function_call_vec. Call resolve_overloaded_builtin here.
832 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
833 Call c_build_function_call_vec instead of build_function_call_vec.
834 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
835 * c-decl.c (finish_decl): Likewise.
836
f40f5e0e 8372014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
838
839 PR c/55383
840 * c-typeck.c: Use correct format string in cast-qual warning
841
9ec099a3 8422014-03-07 Thomas Schwinge <thomas@codesourcery.com>
843
844 * c-decl.c (c_decl_attributes): Use
845 lang_hooks.types.omp_mappable_type.
846 * c-typeck.c (c_finish_omp_clauses): Likewise.
847
3bfdc94f 8482014-03-06 Marek Polacek <polacek@redhat.com>
849
850 PR c/60197
851 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
852 of checking tree code.
853
8f1128f8 8542014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
855
856 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
857 (c_parser_parameter_declaration): Likewise.
858
977b1853 8592014-02-19 Marek Polacek <polacek@redhat.com>
860
861 PR c/60195
862 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
863 Call mark_exp_read on exp.value.
864 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
865 TREE_ADDRESSABLE on old instead of val.
866 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
867
825cd6ef 8682014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
869
870 * c-parser.c (c_parser_get_builtin_args): Replace calls to
871 C_EXPR_APPEND by vec_safe_push.
872 * c-tree.h (C_EXPR_APPEND): Remove.
873
ec761d5a 8742014-01-31 Marek Polacek <polacek@redhat.com>
875
876 PR c/59963
877 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
878 build_function_call_vec.
879 (build_function_call): Likewise.
880 (build_atomic_assign): Likewise.
881 (build_function_call_vec): Add arg_loc parameter. Use it.
882 (convert_arguments): Likewise.
883 (convert_for_assignment): Rename rhs_loc to expr_loc.
884 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
885 (c_parser_objc_keywordexpr): Likewise.
886 (c_parser_postfix_expression_after_primary): Call
887 build_function_call_vec with expr_loc rather than op_loc.
888 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
889 build_function_call_vec.
890 (c_parser_expr_list): Add locations parameter. Fill it with locations
891 of function arguments.
892 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
893
22a75734 8942014-01-30 Marek Polacek <polacek@redhat.com>
895
896 PR c/59940
897 * c-typeck.c (build_function_call_vec): Use loc parameter.
898 (convert_arguments): Add location parameter. Use it.
899 (ep_convert_and_check): Likewise.
900 (build_atomic_assign): Adjust convert_for_assignment call.
901 (build_modify_expr): Likewise.
902 (digest_init): Likewise.
903 (c_finish_return): Likewise.
904 (build_conditional_expr): Adjust ep_convert_and_check calls.
905 (convert_for_assignment): Add rhs_loc parameter. Use it.
906 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
907 calls.
908
29f580ac 9092014-01-30 Richard Biener <rguenther@suse.de>
910
911 PR c/59905
912 * c-typeck.c (build_function_call_vec): Do not replace calls
913 to a function via an incompatible type with a runtime abort.
914
a89e6c15 9152014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
916
917 * c-parser.c (c_parser_declaration_or_fndef): Replaced
918 flag_enable_cilkplus with flag_cilkplus.
919 (c_parser_direct_declarator_inner): Likewise.
920 (c_parser_attribute_any_word): Likewise.
921 (c_parser_attributes): Likewise.
922 (c_parser_compound_statement): Likewise.
923 (c_parser_statement_after_labels): Likewise.
924 (c_parser_if_statement): Likewise.
925 (c_parser_switch_statement): Likewise.
926 (c_parser_do_statement): Likewise.
927 (c_parser_for_statement): Likewise.
928 (c_parser_unary_expression): Likewise.
929 (c_parser_postfix_expression): Likewise.
930 (c_parser_postfix_expression_after_primary): Likewise.
931 (c_parser_postfix_expression_after_primary): Likewise.
932 (c_parser_omp_clause_name): Likewise.
933 (c_finish_omp_declare_simd): Likewise.
934 (c_parser_cilk_verify_simd): Likewise.
935 * c-typeck.c (build_array_ref): Likewise.
936 (build_function_call_vec): Likewise.
937 (convert_arguments): Likewise.
938 (build_compound_expr): Likewise.
939 (c_finish_return): Likewise.
940 (c_finish_if_stmt): Likewise.
941 (c_finish_loop): Likewise.
942 (build_binary_op): Likewise.
943
2623625f 9442014-01-23 Marek Polacek <polacek@redhat.com>
945
946 PR c/59846
947 * c-typeck.c (parser_build_binary_op): Use location instead of
948 input_location.
949 (build_binary_op): Pass location to shorten_compare.
950
46da3601 9512014-01-23 Marek Polacek <polacek@redhat.com>
952
953 PR c/58346
954 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
955 an empty aggregate.
956
9a9db3c1 9572014-01-23 Marek Polacek <polacek@redhat.com>
958
959 PR c/59871
960 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
961 of a comma expression.
962 (emit_side_effect_warnings): Likewise.
963
69c9b607 9642014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
965
966 PR c/59825
967 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
968 function to use walk_tree and moved a lot of its functionality to
969 expand_array_notations.
970 (expand_array_notations): New function.
971
7e005ab5 9722014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
973
974 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
975 attribute an attribute without value.
976
d6779b5f 9772014-01-23 Jakub Jelinek <jakub@redhat.com>
978
979 PR middle-end/58809
980 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
981 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
982
ec431042 9832014-01-22 Marek Polacek <polacek@redhat.com>
984
985 PR c/59891
986 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
987 of remove_c_maybe_const_expr on op1 and op2.
988
1248c663 9892014-01-15 Jakub Jelinek <jakub@redhat.com>
990
991 PR c/58943
992 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
993 effects, preevaluate rhs using SAVE_EXPR first.
994
0bc789fc 9952014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
996
997 PR c++/59631
998 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
999 statements with if-elseif statements.
1000
6685d11c 10012014-01-06 Marek Polacek <polacek@redhat.com>
1002
1003 PR c/57773
1004 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
1005 defined bit-field types only in ISO C.
1006
3aea1f79 10072014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1008
1009 Update copyright years
1010
e4f22041 10112014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1012
1013 * c-array-notation.c: Use the standard form for the copyright notice.
1014
74acc703 10152013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
1016
1017 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
1018 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
1019 field in parser is not empty. If not-empty, call the function
1020 c_parser_finish_omp_declare_simd.
1021 (c_parser_cilk_clause_vectorlength): Modified function to be shared
1022 between SIMD-enabled functions and #pragma simd. Added new parameter.
1023 (c_parser_cilk_all_clauses): Modified the usage of the function
1024 c_parser_cilk_clause_vectorlength as mentioned above.
1025 (c_parser_cilk_simd_fn_vector_attrs): New function.
1026 (c_finish_cilk_simd_fn_tokens): Likewise.
1027 (is_cilkplus_vector_p): Likewise.
1028 (c_parser_omp_clause_name): Added checking for "vectorlength,"
1029 "nomask," and "mask" strings in clause name.
1030 (c_parser_omp_all_clauses): Added 3 new case statements:
1031 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
1032 PRAGMA_CILK_CLAUSE_NOMASK.
1033 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
1034 check for vector attribute and if so call the function
1035 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
1036 called the function c_finish_cilk_simd_fn_tokens.
1037 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
1038 parser field is non-empty. If so, parse them as you would parse
1039 the omp declare simd pragma.
1040 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
1041 Added a check when step is a parameter and flag it as error.
1042 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
1043 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
1044 pragma_omp_clause.
1045
395dc01c 10462013-12-17 Thomas Schwinge <thomas@codesourcery.com>
1047
1048 * c-parser.c (c_parser_omp_parallel): Fix description.
1049
433e804e 10502013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
1051
1052 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
1053 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
1054 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
1055 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
1056
a179a7dc 10572013-12-04 Joseph Myers <joseph@codesourcery.com>
1058
1059 PR c/52023
1060 * c-parser.c (c_parser_alignas_specifier): Use
1061 c_sizeof_or_alignof_type instead of c_alignof.
1062 (c_parser_alignof_expression): Likewise, with min_alignof
1063 parameter depending on alignof spelling used.
1064
bdf1e3c7 10652013-12-04 Marek Polacek <polacek@redhat.com>
1066
1067 PR c/54113
1068 * c-decl.c (start_function): Don't warn for missing prototype for
1069 inline functions.
1070
05e8f674 10712013-12-03 Marek Polacek <polacek@redhat.com>
1072
1073 PR c/59351
1074 * c-decl.c (build_compound_literal): Allow compound literals with
1075 empty initial value.
1076
39f74d66 10772013-12-02 Joseph Myers <joseph@codesourcery.com>
1078
1079 PR c/58235
1080 * c-typeck.c (build_modify_expr): Diagnose assignment to
1081 expression with array type.
1082
f221adca 10832013-11-29 Joseph Myers <joseph@codesourcery.com>
1084
1085 PR c/42262
1086 * c-typeck.c (process_init_element): Do not treat a string as
1087 initializing a whole array when used with a designator for an
1088 individual element.
1089
75bce827 10902013-11-29 Joseph Myers <joseph@codesourcery.com>
1091
1092 PR c/57574
1093 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
1094 an inline function following a static declaration.
1095
dc133326 10962013-11-28 Jakub Jelinek <jakub@redhat.com>
1097
1098 PR c/59310
1099 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
1100 to p_name before calling c_parser_omp_teams instead of after.
1101 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
1102 argument. Remove unused p_name variable.
1103
d09768a4 11042013-11-27 Aldy Hernandez <aldyh@redhat.com>
1105 Jakub Jelinek <jakub@redhat.com>
1106
1107 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
1108 external_scope is NULL.
1109
73fd9cbe 11102013-11-27 Tom de Vries <tom@codesourcery.com>
1111 Marc Glisse <marc.glisse@inria.fr>
1112
1113 PR c++/59032
1114 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
1115
bc61cadb 11162013-11-22 Andrew MacLeod <amacleod@redhat.com>
1117
1118 * c-typeck.c: Add required include files from gimple.h.
1119
3df42822 11202013-11-22 David Malcolm <dmalcolm@redhat.com>
1121
1122 * c-decl.c (define_label, shadow_tag_warned)
1123 (check_bitfield_type_and_width, grokdeclarator, grokparms,
1124 store_parm_decls_newstyle, store_parm_decls_oldstyle)
1125 (declspecs_add_type): Remove use of in_system_header macro.
1126 * c-parser.c (c_parser_unary_expression): Likewise.
1127 * c-typeck.c (store_init_value, process_init_element)
1128 (c_start_case): Likewise.
1129
1130 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
1131 macro.
1132
1133 * c-parser.c (c_parser_set_source_position_from_token): Remove
1134 reference to in_system_header from comment.
1135
08f817b3 11362013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1137
1138 * c-decl.c (grokdeclarator): Update comment to refer to
1139 tree_to_[su]hwi rather than tree_low_cst.
1140
6a0712d4 11412013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1142
1143 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
1144 tree_to_uhwi throughout.
1145
fcb97e84 11462013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1147
1148 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
1149 throughout.
1150
35ec552a 11512013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1152
1153 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
1154 throughout.
1155
f2697631 11562013-11-15 Aldy Hernandez <aldyh@redhat.com>
1157
1158 * c-parser.c (c_parser_cilk_simd): New.
1159 (c_parser_cilk_verify_simd): New.
1160 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
1161 (c_parser_omp_for_loop): Add case for NE_EXPR.
1162 Set c_break_label for CILK_SIMD.
1163 (c_parser_cilk_clause_vectorlength): New.
1164 (c_parser_cilk_clause_linear): New.
1165 (c_parser_cilk_clause_name): New.
1166 (c_parser_cilk_all_clauses): New.
1167 * c-typeck.c (build_unary_op): Pass location argument to
1168 readonly_error.
1169 (build_modify_expr): Same.
1170 (build_asm_expr): Same.
1171 (c_finish_bc_stmt): Error on break/continue in loops.
1172
e795d6e1 11732013-11-14 Andrew MacLeod <amacleod@redhat.com>
1174
1175 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
1176
9ed99284 11772013-11-14 Diego Novillo <dnovillo@google.com>
1178
1179 * c-decl.c: Include print-tree.h.
1180 Include stor-layout.h.
1181 Include varasm.h.
1182 Include attribs.h.
1183 Include stringpool.h.
1184 * c-lang.c: Include fold-const.h.
1185 * c-parser.c: Include stringpool.h.
1186 Include attribs.h.
1187 Include stor-layout.h.
1188 Include varasm.h.
1189 Include trans-mem.h.
1190 * c-typeck.c: Include stor-layout.h.
1191 Include trans-mem.h.
1192 Include varasm.h.
1193 Include stmt.h.
1194
4fba5eb9 11952013-11-13 Joseph Myers <joseph@codesourcery.com>
1196
1197 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
1198 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
1199 __auto_type.
1200 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
1201 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
1202 RID_AUTO_TYPE.
1203 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
1204 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
1205 (c_parser_declarator, c_parser_direct_declarator_inner)
1206 (c_parser_parameter_declaration, c_parser_type_name): All callers
1207 changed.
1208 (c_parser_declaration_or_fndef): Handle declarations with type
1209 determined from the initializer.
1210
a8783bee 12112013-11-12 Andrew MacLeod <amacleod@redhat.com>
1212
e795d6e1 1213 * c-typeck.c: Include gimplify.h.
a8783bee 1214
d184e0c0 12152013-11-12 Joseph Myers <joseph@codesourcery.com>
1216
1217 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
1218 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
1219 comment.
1220 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
1221 or _Thread_local as appropriate in diagnostics.
1222 (build_null_declspecs): Initialize ret->thread_gnu_p.
1223 (declspecs_add_scspec): Handle either __thread or _Thread_local
1224 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
1225 pedantic. Do not disallow _Thread_local extern and _Thread_local
1226 static.
1227
b560fabd 12282013-11-07 Joseph Myers <joseph@codesourcery.com>
1229 Andrew MacLeod <amacleod@redhat.com>
1230
1231 * c-aux-info.c (gen_type): Handle atomic qualifier.
1232 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
1233 qualifiers when compating types.
1234 (shadow_tag_warned): Handle atomic_p in declspecs.
1235 (quals_from_declspecs): Likewise.
1236 (start_decl): Use c_type_promotes_to when promoting argument
1237 types.
1238 (grokdeclarator): Handle _Atomic.
1239 (get_parm_info): Diagnose any qualifier on "void" as only
1240 parameter.
1241 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
1242 comparing types. Use c_type_promotes_to when promoting argument
1243 types.
1244 (finish_function): Use c_type_promotes_to when promoting argument
1245 types.
1246 (build_null_declspecs): Handle atomic_p in declspecs.
1247 (declspecs_add_qual): Handle RID_ATOMIC.
1248 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
1249 (c_token_starts_declspecs): Handle RID_ATOMIC.
1250 (c_parser_declspecs): Handle atomic type specifiers and
1251 qualifiers.
1252 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
1253 from types of expressions with atomic type.
1254 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
1255 (c_parser_attribute_any_word): Handle RID_ATOMIC.
1256 (c_parser_initializer, c_parser_initelt, c_parser_initval)
1257 (c_parser_statement_after_labels, c_parser_switch_statement)
1258 (c_parser_for_statement, c_parser_expr_no_commas)
1259 (c_parser_conditional_expression, c_parser_binary_expression)
1260 (c_parser_cast_expression, c_parser_unary_expression)
1261 (c_parser_postfix_expression)
1262 (c_parser_postfix_expression_after_primary, c_parser_expression):
1263 Use convert_lvalue_to_rvalue.
1264 (c_parser_expression_conv, c_parser_expr_list): Document
1265 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
1266 (c_parser_objc_synchronized_statement): Use
1267 convert_lvalue_to_rvalue.
1268 (c_parser_objc_selector): Handle RID_ATOMIC.
1269 (c_parser_objc_receiver, c_parser_array_notation): Use
1270 convert_lvalue_to_rvalue.
1271 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
1272 _Atomic (type-name).
1273 (struct c_declspecs): Add atomic_p field.
1274 (convert_lvalue_to_rvalue): Declare.
1275 * c-typeck.c (c_type_promotes_to): Promote atomic types to
1276 corresponding atomic types.
1277 (qualify_type): Don't add _Atomic qualifiers from second argument.
1278 (comp_target_types): Do not allow _Atomic mismatches.
1279 (type_lists_compatible_p): Do not remove atomic qualifiers when
1280 comparing types.
1281 (really_atomic_lvalue, convert_lvalue_to_rvalue)
1282 (build_atomic_assign): New functions.
1283 (build_unary_op): Use build_atomic_assign for atomic increment and
1284 decrement.
1285 (build_conditional_expr): Do not treat _Atomic void as a qualified
1286 version of void.
1287 (build_modify_expr): Use build_atomic_assign for atomic LHS.
1288 (find_anonymous_field_with_type, convert_to_anonymous_field)
1289 (convert_for_assignment): Do not remove atomic qualifiers when
1290 comparing types.
1291 (digest_init): Do not accept initialization of arrays of atomic
1292 elements by string constants.
1293 (build_asm_expr): Use convert_lvalue_to_rvalue.
1294 (build_binary_op): Do not treat _Atomic void as a qualified
1295 version of void.
1296
8b023e7c 12972013-11-06 DJ Delorie <dj@redhat.com>
1298
1299 * c-decl.c (locate_old_decl): If a previous conflicting decl is
1300 both explicit and builtin, print the location of the explicit one.
1301
c630ef93 13022013-11-05 Tobias Burnus <burnus@net-b.de>
1303
1304 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
1305 c_parser_omp_distribute, c_parser_omp_teams,
1306 c_parser_omp_target, c_parser_omp_declare): Handle
1307 -fopenmp-simd.
1308
2c4c3477 13092013-11-03 Marek Polacek <polacek@redhat.com>
1310
1311 * c-decl.c (grokdeclarator): Add VLA instrumentation.
1312
df205251 13132013-11-01 Jakub Jelinek <jakub@redhat.com>
1314
1315 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
1316 check_dup_generic at the end, unless remove is true.
1317 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
1318 remove = true;.
1319 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
1320
23871d0c 13212013-10-31 Jakub Jelinek <jakub@redhat.com>
1322
1323 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
1324 with decl that is not pointer nor array.
1325
d037099f 13262013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
1327
1328 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
1329 a spawning function is found.
1330 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
1331 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
1332 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
1333 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
1334 case.
1335 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
1336 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
1337 expr.
1338 (c_finish_return): Added a check to reject _Cilk_spawn in return
1339 expression.
1340 (build_cilk_spawn): New function.
1341 (build_cilk_sync): Likewise.
1342 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
1343
4c90c04c 13442013-10-27 Tobias Burnus <burnus@net-b.de>
1345
1346 PR other/33426
1347 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
1348 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
1349 (c_parser_statement_after_labels): Update calls.
1350
48a972c8 13512013-10-24 Tobias Burnus <burnus@net-b.de>
4644b593 1352
1353 PR other/33426
1354 * c-parser.c (c_parser_pragma, c_parser_for_statement):
1355 Handle PRAGMA_IVDEP.
1356 (c_parser_statement_after_labels): Update call.
1357
12f86df0 13582013-10-24 Marek Polacek <polacek@redhat.com>
1359
1360 * c-parser.c (c_parser_struct_declaration): Add a comment.
1361 (c_parser_declarator): Don't allow _Alignas here.
1362
7740abd8 13632013-10-17 Andrew MacLeod <amacleod@redhat.com>
1364
1365 * c-parser.c: Include omp-low.h.
1366 * c-typeck.c: Likewise.
1367
43d03c23 13682013-10-17 Marek Polacek <polacek@redhat.com>
1369
1370 PR c/58267
1371 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
1372 Document syntax of the array-declarator.
1373 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
1374 are not permitted.
1375 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
1376 (c_parser_struct_declaration): Likewise.
1377 (c_parser_declarator): Likewise.
1378 (c_parser_direct_declarator_inner): Likewise.
1379 (c_parser_parameter_declaration): Likewise.
1380 (c_parser_type_name): Likewise.
1381
bc7bff74 13822013-10-11 Jakub Jelinek <jakub@redhat.com>
1383
1384 * c-lang.h (current_omp_declare_target_attribute): New extern
1385 decl.
1386 * c-parser.c: Include c-lang.h.
1387 (struct c_parser): Change tokens to c_token *.
1388 Add tokens_buf field. Change tokens_avail type to unsigned int.
1389 (c_parser_consume_token): If parser->tokens isn't
1390 &parser->tokens_buf[0], increment parser->tokens.
1391 (c_parser_consume_pragma): Likewise.
1392 (enum pragma_context): Add pragma_struct and pragma_param.
1393 (c_parser_external_declaration): Adjust
1394 c_parser_declaration_or_fndef caller.
1395 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
1396 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
1397 Adjust recursive call.
1398 (c_parser_struct_or_union_specifier): Use pragma_struct instead
1399 of pragma_external.
1400 (c_parser_parameter_declaration): Use pragma_param instead of
1401 pragma_external.
1402 (c_parser_compound_statement_nostart, c_parser_label,
1403 c_parser_for_statement): Adjust
1404 c_parser_declaration_or_fndef callers.
1405 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
1406 it through to c_parser_conditional_expression.
1407 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
1408 pass it through to c_parser_binary_expression. Adjust recursive
1409 call.
1410 (c_parser_binary_expression): Remove prec argument, add
1411 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
1412 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
1413 binop matches it, use build2 instead of parser_build_binary_op.
1414 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
1415 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
1416 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
1417 Handle pragma_struct and pragma_param the same as pragma_external.
1418 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
1419 (c_parser_omp_variable_list): Parse array sections for
1420 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
1421 (c_parser_omp_clause_collapse): Fully fold collapse expression.
1422 (c_parser_omp_clause_reduction): Handle user defined reductions.
1423 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
1424 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
1425 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
1426 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
1427 c_parser_omp_clause_depend, c_parser_omp_clause_map,
1428 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
1429 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
1430 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
1431 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
1432 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
1433 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
1434 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
1435 (c_parser_omp_for_loop): Add CODE argument, pass it through
1436 to c_finish_omp_for. Change last argument to cclauses,
1437 and adjust uses to grab parallel clauses from the array of all
1438 the split clauses. Adjust c_parser_binary_expression,
1439 c_parser_declaration_or_fndef and c_finish_omp_for callers.
1440 (omp_split_clauses): New function.
1441 (c_parser_omp_simd): New function.
1442 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
1443 Allow the function to be called also when parsing combined constructs,
1444 and call c_parser_omp_simd when parsing for simd.
1445 (c_parser_omp_sections_scope): If section-sequence doesn't start with
1446 #pragma omp section, require exactly one structured-block instead of
1447 sequence of statements.
1448 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
1449 Allow the function to be called also when parsing combined constructs.
1450 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
1451 Allow the function to be called also when parsing combined
1452 constructs.
1453 (c_parser_omp_taskgroup, c_parser_omp_cancel,
1454 c_parser_omp_cancellation_point, c_parser_omp_distribute,
1455 c_parser_omp_teams, c_parser_omp_target_data,
1456 c_parser_omp_target_update, c_parser_omp_target,
1457 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
1458 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
1459 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
1460 (c_parser_omp_construct): Add p_name and mask vars. Handle
1461 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
1462 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
1463 and c_parser_omp_sections callers.
1464 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
1465 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
1466 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
1467 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
1468 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
1469 OMP_CLAUSE_DEPEND.
1470 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
1471 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
1472 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
1473 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
1474 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
1475 * c-typeck.c: Include tree-inline.h.
1476 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
1477 handle_omp_array_sections_1, handle_omp_array_sections,
1478 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
1479 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
1480 user defined reductions.
1481 (c_tree_equal): New function.
1482 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
1483 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
1484 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
1485 c_check_omp_declare_reduction_r): New prototypes.
1486 * c-decl.c (current_omp_declare_target_attribute): New variable.
1487 (c_decl_attributes): New function.
1488 (start_decl, start_function): Use it instead of decl_attributes.
1489 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
1490 c_omp_reduction_decl, c_omp_reduction_lookup,
1491 c_check_omp_declare_reduction_r): New functions.
1492
3ce7d1bd 14932013-09-25 Tom Tromey <tromey@redhat.com>
1494
1495 * Make-lang.in (c/gccspec.o): Remove.
1496 (CFLAGS-c/gccspec.o): New variable.
1497 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
1498 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
1499 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
1500
96da1c1d 15012013-09-25 Tom Tromey <tromey@redhat.com>
1502
1503 * Make-lang.in (c/gccspec.o): Don't use subshell.
1504
1b309377 15052013-09-18 Marek Polacek <polacek@redhat.com>
1506
1507 PR sanitize/58443
1508 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
1509 Remove unnecessary check.
1510
05f893e1 15112013-09-18 Marek Polacek <polacek@redhat.com>
1512
1513 PR sanitizer/58411
1514 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
1515 no_sanitize_undefined attribute.
1516
bda0b9d2 15172013-09-13 Kai Tietz <ktietz@redhat.com>
1518
1519 PR target/57848
1520 * c-decl.c (c_builtin_function_ext_scope): Remove
1521 wrong assumption that it is never called on prexisting
1522 symbol.
1523
73437615 15242013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
1525
1526 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
1527
eaab24b9 15282013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
1529
1530 * c-objc-common.c (c_tree_printer): Tidy.
1531
9e46467d 15322013-08-30 Marek Polacek <polacek@redhat.com>
1533
1534 * c-typeck.c (build_binary_op): Add division by zero and shift
1535 instrumentation.
1536
f8234178 15372013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
f9086116 1538 Joseph Myers <joseph@codesourcery.com>
f8234178 1539
c90a7d10 1540 PR c/35649
f8234178 1541 * c-typeck.c (c_common_type): Prefer double_type_node over
1542 other REAL_TYPE types with the same precision.
1543 (convert_arguments): Likewise.
1544
6f07f480 15452013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
1546
1547 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
1548 (c_initialize_diagnostics): Call a destructor for the early printer.
1549
eed6bc21 15502013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
1551
1552 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
1553 printer initialization.
1554
57717943 15552013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
eed6bc21 1556
57717943 1557 PR c/57490
1558 * c-array-notation.c (fix_conditional_array_notations_1): Added a
1559 check for truth values.
1560 (expand_array_notation_exprs): Added truth values case. Removed an
1561 unwanted else. Added for-loop to walk through subtrees in default
1562 case.
1563
a94db6b0 15642013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
1565
1566 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
1567
e76163a9 15682013-07-23 Joseph Myers <joseph@codesourcery.com>
1569
1570 * c-parser.c (struct c_generic_association): Fix typo.
1571
7aa04c8d 15722013-07-23 Tom Tromey <tromey@redhat.com>
1573 Joseph Myers <joseph@codesourcery.com>
1574
1575 * c-parser.c (struct c_generic_association): New.
1576 (c_generic_association_d): New typedef.
1577 (c_parser_generic_selection): New function.
1578 (c_parser_postfix_expression): Handle RID_GENERIC.
1579
76bbe4ca 15802013-07-13 Jason Merrill <jason@redhat.com>
1581
1582 PR c++/57793
1583 * c-decl.c (finish_struct): Check for too-large class.
1584
21ebaa24 15852013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
f5298614 1586
1587 PR c/57821
1588 * c-typeck.c (set_init_index): When folding, check for index overflow.
1589
936c3081 15902013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
1591
1592 * c-parser.c (c_parser_array_notation): Removed rejection of array
1593 notations in an array of function pointers.
1594
50acebe0 15952013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
1596
1597 * c-array-notation.c (make_triplet_val_inv): New function.
1598 (create_cmp_incr): Likewise.
1599 (create_array_refs): Likewise.
1600 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
1601 Also modularized common parts between functions and called the function.
1602 (build_array_notation_expr): Likewise.
1603 (fix_conditional_array_notations_1): Likewise.
1604 (fix_array_notation_expr): Likewise.
1605 (fix_array_notation_call_expr): Likewise.
1606
01e6cdb4 16072013-06-18 Marek Polacek <polacek@redhat.com>
1608
1609 PR c/57630
1610 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
1611
6a3adac6 16122013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
1613
1614 * c-array-notation.c (build_array_notation_expr): Reject array notation
1615 mismatch between LHS and RHS even inside a call_expr. Also, removed
1616 a couple while statements that were dead code.
1617
62aab3f3 16182013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
1619
1620 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
1621 excessive precision expressions in function parameters. Also removed
1622 couple unwanted while statements.
1623
bfc83720 16242013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
1625
1626 * c-array-notation.c (expand_array_notation_exprs): Added
1627 ARRAY_NOTATION_REF case.
1628
09970d67 16292013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
1630
1631 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
1632 function to c-family/array-notation-common.c.
1633 (is_cilkplus_reduce_builtin): Likewise.
1634 (find_rank): Likewise.
1635 (extract_array_notation_exprs): Likewise.
1636 (replace_array_notations): Likewise.
1637 (find_inv_trees): Likewise.
1638 (replace_inv_trees): Likewise.
1639 (contains_array_notation_expr): Likewise.
1640 (find_correct_array_notation_type): Likewise.
1641 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
1642 (struct inv_list): Moved this to c-family/array-notation-common.c.
1643 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
1644
6e13bc01 16452013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
1646
1647 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
1648 reduction functions outside the for-loop. Added a check if the fundecl
1649 is non-NULL. Finally, removed an unwanted if-statement, and made the
1650 body unconditional.
1651
cc92dddc 16522013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
1653
1654 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
1655 condition of the if-statement matches the rank of else-block and then-
1656 block when array notations are used.
1657 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
1658 expression after the entire function body is parsed.
1659 (c_parser_expr_no_commas): Delayed creating array notation expressions
1660 to the end of function parsing.
1661 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
1662 whole if-statement instead of just the condition.
1663 (expand_array_notation_exprs): Added MODIFY_EXPR case.
1664
eddc63fd 16652013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
1666
1667 PR c/57474
1668 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
1669 array to NULL_TREE if they are unused. Also added a check for the
1670 field to be NULL before its fields are used in future.
1671
a2115a4a 16722013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1673
1674 PR bootstrap/57450
1675 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
1676 (build_array_notation_expr): Likewise.
1677
3c6d4197 16782013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
1679
1680 * c-typeck.c (build_array_ref): Added a check to see if array's
1681 index is greater than one. If true, then emit an error.
1682 (build_function_call_vec): Exclude error reporting and checking
1683 for builtin array-notation functions.
1684 (convert_arguments): Likewise.
1685 (c_finish_return): Added a check for array notations as a return
1686 expression. If true, then emit an error.
1687 (c_finish_loop): Added a check for array notations in a loop
1688 condition. If true then emit an error.
1689 (lvalue_p): Added a ARRAY_NOTATION_REF case.
1690 (build_binary_op): Added a check for array notation expr inside
1691 op1 and op0. If present, we call another function to find correct
1692 type.
1693 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
1694 * c-parser.c (c_parser_compound_statement): Check if array
1695 notation code is used in tree, if so, then transform them into
1696 appropriate C code.
1697 (c_parser_expr_no_commas): Check if array notation is used in LHS
1698 or RHS, if so, then build array notation expression instead of
1699 regular modify.
1700 (c_parser_postfix_expression_after_primary): Added a check for
1701 colon(s) after square braces, if so then handle it like an array
1702 notation. Also, break up array notations in unary op if found.
1703 (c_parser_direct_declarator_inner): Added a check for array
1704 notation.
1705 (c_parser_compound_statement): Added a check for array notation in
1706 a stmt. If one is present, then expand array notation expr.
1707 (c_parser_if_statement): Likewise.
1708 (c_parser_switch_statement): Added a check for array notations in
1709 a switch statement's condition. If true, then output an error.
1710 (c_parser_while_statement): Similarly, but for a while.
1711 (c_parser_do_statement): Similarly, but for a do-while.
1712 (c_parser_for_statement): Similarly, but for a for-loop.
1713 (c_parser_unary_expression): Check if array notation is used in a
1714 pre-increment or pre-decrement expression. If true, then expand
1715 them.
1716 (c_parser_array_notation): New function.
1717 * c-array-notation.c: New file.
1718 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
1719
2c1c8a2c 17202013-05-23 Mike Stump <mikestump@comcast.net>
1721
1722 * c-typeck.c (convert_for_assignment): Handle references to memory
1723 spaces better.
1724
be5f9e46 17252013-05-16 Jason Merrill <jason@redhat.com>
1726
1727 * Make-lang.in (cc1$(exeext)): Use link mutex.
1728
9205a6cc 17292013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
1730
1731 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
1732 to simply use OPT_Wpointer_arith.
1733 (build_unary_op): Likewise.
1734
0b049e15 17352013-04-03 Jakub Jelinek <jakub@redhat.com>
1736
1737 PR c/19449
1738 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
1739 argument. If set, or it temporarily for parsing of the first
1740 argument into force_folding_builtin_constant_p.
1741 (c_parser_postfix_expression): Adjust callers.
1742
8e966116 17432013-03-21 Richard Biener <rguenther@suse.de>
1744
1745 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
1746 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
1747
b862f263 17482013-02-12 Marek Polacek <polacek@redhat.com>
1749
1750 PR c/44938
1751 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
1752 origtypes to NULL.
1753
54550ecb 17542013-01-24 Jakub Jelinek <jakub@redhat.com>
1755
1756 PR c/56078
1757 * c-typeck.c (set_nonincremental_init_from_string): If
1758 constructor_max_index is NULL, treat it as if tree_int_cst_lt
1759 returned false.
1760 (process_init_element): Likewise.
1761
035b65e2 17622012-12-20 Jakub Jelinek <jakub@redhat.com>
1763
1764 PR c++/55619
1765 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
1766 argument, don't call default_function_array_conversion
1767 nor c_fully_fold here.
1768 (c_parser_asm_statement): Adjust callers.
1769 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
1770 and outputs here, and call default_function_array_conversion
1771 on inputs that don't need to be addressable.
1772
7cbb7f1a 17732012-12-18 Jakub Jelinek <jakub@redhat.com>
1774
1775 PR c/39464
1776 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
1777 warning require that both c_common_unsigned_type as well as
1778 c_common_signed_type is the same for both mvl and mvr types.
1779
f1f41a6c 17802012-11-16 Diego Novillo <dnovillo@google.com>
1781
1782 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
1783
1784 * c-common.c: Use new vec API in vec.h.
1785 * c-common.h: Likewise.
1786 * c-gimplify.c: Likewise.
1787 * c-pragma.c: Likewise.
1788 * c-pretty-print.c: Likewise.
1789 * c-pretty-print.h: Likewise.
1790 * c-semantics.c: Likewise.
1791 * c-decl.c: Likewise.
1792 * c-parser.c: Likewise.
1793 * c-tree.h: Likewise.
1794 * c-typeck.c: Likewise.
1795
8b447d3f 17962012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
1797
1798 PR c++/54930
1799 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
1800
08fc5390 18012012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
1802
1803 PR c/53066
1804 * c-decl.c (warn_if_shadowing): Do not warn if a variable
1805 shadows a function, unless the variable is a function or a
1806 pointer-to-function.
1807
57f872a2 18082012-10-12 Jakub Jelinek <jakub@redhat.com>
1809
1810 PR c/54381
1811 * c-parser.c (struct c_tree_loc_pair): Removed.
1812 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
1813 add location_t * and tree * arguments, fill in array of 3
1814 sizeof_arg trees and corresponding locs.
1815 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
1816 c_parser_expr_list callers.
1817 (c_parser_postfix_expression_after_primary): Likewise. Pass
1818 array of 3 sizeof_arg trees and locs (corresponding to first
1819 3 arguments) to sizeof_pointer_memaccess_warning.
1820
d1455aa3 18212012-10-09 Lawrence Crowl <crowl@google.com>
1822
1823 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
1824 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
1825 hash table.
1826
b0e7825e 18272012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
1828
1829 PR c++/54194
1830 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
1831 call.
1832
41ed701a 18332012-10-09 Marc Glisse <marc.glisse@inria.fr>
1834
1835 PR c++/54427
1836 * c-typeck.c: Include c-common.h.
1837 (enum stv_conv): Moved to c-common.h.
1838 (scalar_to_vector): Moved to c-common.c.
1839 (build_binary_op): Adapt to scalar_to_vector's new prototype.
1840 * Make-lang.in: c-typeck.c depends on c-common.h.
1841
ef34afc1 18422012-10-04 Arnaud Charlet <charlet@adacore.com>
1843
1844 * c-decl.c (c_write_global_declarations): Fix handling of
1845 -fdump-ada-spec*.
1846
7bd765d4 18472012-09-30 Sharad Singhai <singhai@google.com>
1848
1849 * c-decl.c (c_write_global_declarations): Use a different method
1850 to determine if the dump has ben initialized.
1851
c4b1a13a 18522012-09-14 Joseph Myers <joseph@codesourcery.com>
1853
1854 PR c/54552
1855 * c-typeck.c (c_cast_expr): When casting to a type requiring
1856 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
1857 c_fully_fold first.
1858
bb554051 18592012-09-14 Joseph Myers <joseph@codesourcery.com>
1860
1861 PR c/54103
1862 * c-typeck.c (build_unary_op): Pass original argument of
1863 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
1864 any C_MAYBE_CONST_EXPR, if it has integer operands.
1865 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
1866 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
1867 to c_objc_common_truthvalue_conversion, then remove any
1868 C_MAYBE_CONST_EXPR, if they have integer operands. Use
1869 c_objc_common_truthvalue_conversion not
1870 c_common_truthvalue_conversion.
1871 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
1872 call note_integer_operands for arguments with integer operands
1873 that are not integer constants.
1874
c708c6ef 18752012-09-13 Jakub Jelinek <jakub@redhat.com>
1876
1877 PR c/54559
1878 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
1879 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
1880
cce20430 18812012-08-31 Jakub Jelinek <jakub@redhat.com>
1882
1883 PR c/54428
1884 * c-convert.c (convert): Don't call fold_convert_loc if
1885 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
1886 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
1887 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
1888
a90d57ed 18892012-08-24 Jakub Jelinek <jakub@redhat.com>
1890
1891 PR c/54355
1892 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
1893 for nested and empty_ok arguments in the call to
1894 c_parser_declaration_or_fndef.
1895
f003f5dc 18962012-08-17 Jakub Jelinek <jakub@redhat.com>
1897
1898 * c-tree.h (c_last_sizeof_arg): Declare.
1899 * c-parser.c (struct c_tree_loc_pair): New type.
1900 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
1901 non-NULL.
1902 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
1903 (c_parser_postfix_expression_after_primary): Likewise. Call
1904 sizeof_pointer_memaccess_warning if needed.
1905 (sizeof_ptr_memacc_comptypes): New function.
1906 * c-typeck.c (c_last_sizeof_arg): New global variable.
1907 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
1908
a5656b73 19092012-07-24 Uros Bizjak <ubizjak@gmail.com>
1910
1911 * c-lang.h (lang_decl): Add variable_size GTY option.
1912
b9ed1410 19132012-07-16 Steven Bosscher <steven@gcc.gnu.org>
1914
1915 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
1916 * Make-lang.in: Fix dependencies.
1917
e53d55e7 19182012-06-29 Steven Bosscher <steven@gcc.gnu.org>
1919
1920 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
1921 and add language Makefile hooks.
1922 * config-lang.in: New file.
1923 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
1924 add the required "normal" config-lang.in rules.
1925 * c-lang.h: Moved from gcc/ to here.
1926 * c-tree.h: Likewise.
1927 * c-objc-common.c: Likewise.
1928 * c-objc-common.h: Likewise.
1929 * c-typeck.c: Likewise.
1930 * c-convert.c: Likewise.
1931 * c-lang.c: Likewise.
1932 * c-aux-info.c: Likewise.
1933 * c-errors.c: Likewise.
1934 * gccspec.c: Likewise.
1935 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
1936 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
1937\f
d353bf18 1938Copyright (C) 2012-2015 Free Software Foundation, Inc.
e53d55e7 1939
1940Copying and distribution of this file, with or without modification,
1941are permitted in any medium without royalty provided the copyright
1942notice and this notice are preserved.