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