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