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