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