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