PR c/81544 - attribute noreturn and warn_unused_result on the same function accepted
[gcc.git] / gcc / c / ChangeLog
1 2017-12-07 Martin Sebor <msebor@redhat.com>
2
3 PR c/81544
4 * c-decl.c (c_decl_attributes): Look up existing declaration and
5 pass it to decl_attributes.
6
7 2017-12-06 David Malcolm <dmalcolm@redhat.com>
8
9 PR c/83236
10 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
11 reserved for use by the implementation.
12
13 2017-12-06 David Malcolm <dmalcolm@redhat.com>
14
15 * c-decl.c: Include "c-family/c-spellcheck.h".
16
17 2017-12-05 Martin Liska <mliska@suse.cz>
18 Jakub Jelinek <jakub@redhat.com>
19
20 * c-typeck.c (pointer_diff): Add new argument and instrument
21 pointer subtraction.
22 (build_binary_op): Similar for pointer comparison.
23
24 2017-12-01 Jakub Jelinek <jakub@redhat.com>
25
26 PR c/79153
27 * c-parser.c: Include tree-iterator.h.
28 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
29 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
30 on it.
31
32 PR c/83222
33 * c-tree.h (decl_constant_value_1): Declare.
34 * c-typeck.c (decl_constant_value_1): New function.
35 (decl_constant_value): Use it.
36 * c-fold.c (c_fully_fold_internal): If in_init, use
37 decl_constant_value_1 instead of decl_constant_value.
38
39 2017-11-30 Jakub Jelinek <jakub@redhat.com>
40
41 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
42
43 2017-11-28 Jakub Jelinek <jakub@redhat.com>
44
45 PR sanitizer/81275
46 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
47 c_switch_covers_all_cases_p returns true.
48
49 2017-11-28 Julia Koval <julia.koval@intel.com>
50 Sebastian Peryt <sebastian.peryt@intel.com>
51
52 * Make-lang.in (c/c-array-notation.o): Remove.
53 * c-array-notation.c: Delete.
54 * c-decl.c: Remove cilkplus condition.
55 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
56 c_parser_cilk_verify_simd, c_parser_array_notation,
57 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
58 c_parser_cilk_simd_fn_vector_attrs,
59 c_finish_cilk_simd_fn_tokens): Delete.
60 (c_parser_declaration_or_fndef): Remove cilkplus condition.
61 (c_parser_direct_declarator_inner): Ditto.
62 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
63 (c_parser_attributes, c_parser_compound_statement,
64 c_parser_statement_after_labels, c_parser_if_statement,
65 c_parser_switch_statement, c_parser_while_statement,
66 c_parser_do_statement, c_parser_for_statement,
67 c_parser_unary_expression, c_parser_postfix_expression,
68 c_parser_postfix_expression_after_primary,
69 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
70 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
71 support.
72 * c-typeck.c (build_array_ref, build_function_call_vec,
73 convert_arguments,
74 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
75 c_finish_loop, build_binary_op): Remove cilkplus support.
76
77 2017-11-28 Jakub Jelinek <jakub@redhat.com>
78
79 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
80 of build3.
81
82 2017-11-14 Boris Kolpackov <boris@codesynthesis.com>
83
84 * Make-lang.in (c.install-plugin): Install backend import library.
85
86 2017-11-23 Jakub Jelinek <jakub@redhat.com>
87
88 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
89 pragma_stmt context.
90
91 2017-11-23 Mike Stump <mikestump@comcast.net>
92 Eric Botcazou <ebotcazou@adacore.com>
93
94 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
95 ANNOTATE_EXPR.
96 (c_parser_do_statement): Likewise.
97 (c_parser_for_statement): Likewise.
98
99 2017-11-22 David Malcolm <dmalcolm@redhat.com>
100
101 PR c++/62170
102 * c-objc-common.c (c_tree_printer): Convert penultimate param from
103 bool to bool *. Within '%T' handling, if showing an "aka", use
104 "quoted" param to add appropriate quoting.
105
106 2017-11-22 Marek Polacek <polacek@redhat.com>
107
108 PR c++/60336
109 PR middle-end/67239
110 PR target/68355
111 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
112
113 2017-11-21 David Malcolm <dmalcolm@redhat.com>
114
115 PR c/83056
116 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
117 earlier failed lookups.
118
119 2017-11-21 Marc Glisse <marc.glisse@inria.fr>
120
121 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
122 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
123
124 2017-11-20 David Malcolm <dmalcolm@redhat.com>
125
126 PR c/81404
127 * c-decl.c: Include "c-family/known-headers.h".
128 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
129 to known-headers.cc.
130 (class suggest_missing_header): Move to known-header.h.
131 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
132 than get_c_name_hint.
133
134 2017-11-20 David Malcolm <dmalcolm@redhat.com>
135
136 * c-decl.c (get_c_name_hint): New function.
137 (class suggest_missing_header): New class.
138 (lookup_name_fuzzy): Call get_c_name_hint and use it to
139 suggest missing headers to the user.
140
141 2017-11-20 David Malcolm <dmalcolm@redhat.com>
142
143 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
144 Include "c-family/name-hint.h"
145 (implicit_decl_warning): Convert "hint" from
146 const char * to name_hint. Pass location to
147 lookup_name_fuzzy. Suppress any deferred diagnostic if the
148 warning was not printed.
149 (undeclared_variable): Likewise for "guessed_id".
150 (lookup_name_fuzzy): Convert return type from const char *
151 to name_hint. Add location_t param.
152 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
153 Include "c-family/name-hint.h"
154 (c_parser_declaration_or_fndef): Convert "hint" from
155 const char * to name_hint. Pass location to lookup_name_fuzzy.
156 (c_parser_parameter_declaration): Likewise.
157
158 2017-11-19 Jakub Jelinek <jakub@redhat.com>
159
160 PR c/66618
161 PR c/69960
162 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
163 where needed.
164 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
165 handle_omp_array_sections): Likewise.
166 (digest_init): Don't call decl_constant_value_for_optimization.
167 * c-tree.h (decl_constant_value_for_optimization): Removed.
168 * c-fold.c (c_fold_array_ref): New function.
169 (c_fully_fold_internal): Add LVAL argument, propagate it through
170 recursive calls. For VAR_P call decl_constant_value and
171 unshare if not LVAL and either optimizing or IN_INIT. Remove
172 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
173 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
174 (c_fully_fold): Add LVAL argument, pass it through to
175 c_fully_fold_internal.
176 (decl_constant_value_for_optimization): Removed.
177
178 2017-11-15 Joseph Myers <joseph@codesourcery.com>
179
180 PR c/81156
181 * c-parser.c (check_tgmath_function): New function.
182 (enum tgmath_parm_kind): New enum.
183 (c_parser_postfix_expression): Handle __builtin_tgmath.
184
185 2017-10-31 David Malcolm <dmalcolm@redhat.com>
186
187 * c-decl.c (implicit_decl_warning): Update for renaming of
188 pedwarn_at_rich_loc and warning_at_rich_loc.
189 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
190 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
191 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
192 (c_parser_struct_or_union_specifier): Likewise for renaming of
193 pedwarn_at_rich_loc.
194 (c_parser_parameter_declaration): Likewise for renaming of
195 error_at_rich_loc.
196 * c-typeck.c (build_component_ref): Likewise.
197 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
198 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
199 (set_init_label): Likewise for renaming of error_at_rich_loc.
200
201 2017-10-30 Richard Biener <rguenther@suse.de>
202
203 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
204 stmts.
205
206 2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
207
208 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
209 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
210
211 2017-10-25 David Malcolm <dmalcolm@redhat.com>
212
213 PR c/7356
214 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
215 semicolons.
216
217 2017-10-25 Jakub Jelinek <jakub@redhat.com>
218
219 PR libstdc++/81706
220 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
221 newdecl to corresponding __builtin_ if any.
222
223 2017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
224
225 PR c++/82466
226 * c-decl.c (diagnose_mismatched_decls): Use
227 OPT_Wbuiltin_declaration_mismatch.
228
229 2017-10-12 David Malcolm <dmalcolm@redhat.com>
230
231 * c-parser.c (c_parser_require): Add "type_is_unique" param and
232 use it to guard calls to maybe_suggest_missing_token_insertion.
233 (c_parser_parms_list_declarator): Override default value of new
234 "type_is_unique" param to c_parser_require.
235 (c_parser_asm_statement): Likewise.
236 * c-parser.h (c_parser_require): Add "type_is_unique" param,
237 defaulting to true.
238
239 2017-10-11 Nathan Sidwell <nathan@acm.org>
240
241 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
242
243 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
244
245 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
246 operating on trees as wide_ints.
247 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
248 (c_tree_equal): Likewise.
249
250 2017-10-04 David Malcolm <dmalcolm@redhat.com>
251
252 * c-decl.c (push_parm_decl): Store c_parm's location into the
253 PARAM_DECL.
254 (build_c_parm): Add "loc" param and store it within the c_parm.
255 * c-parser.c (struct c_parser): Add "last_token_location" field.
256 (c_parser_consume_token): Store location of the token into the
257 new field.
258 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
259 when handling a FUNCTION_DECL, if it doesn't already have them.
260 (c_parser_parameter_declaration): Generate a location for the
261 parameter, and pass it to the call to build_c_parm.
262 * c-tree.h (struct c_parm): Add field "loc".
263 (build_c_parm): Add location_t param.
264 * c-typeck.c (get_fndecl_argument_location): New function.
265 (inform_for_arg): New function.
266 (convert_for_assignment): Use inform_for_arg when dealing with
267 ic_argpass.
268
269 2017-09-29 Jakub Jelinek <jakub@redhat.com>
270
271 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
272 width is non-NULL.
273 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
274 don't SET_DECL_C_BIT_FIELD here.
275
276 PR c/82340
277 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
278 instead of trying to set just TREE_READONLY manually.
279
280 2017-09-16 Tom de Vries <tom@codesourcery.com>
281
282 PR c/81875
283 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
284 cond itself.
285
286 2017-09-15 Joseph Myers <joseph@codesourcery.com>
287
288 PR c/82071
289 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
290 for C11.
291 (build_conditional_expr): For C11, generate result with excess
292 precision when one argument is an integer and the other is of a
293 type using excess precision.
294
295 2017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
296
297 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
298
299 2017-09-13 Marek Polacek <polacek@redhat.com>
300
301 PR c/82167
302 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
303 than expr.original_type.
304
305 2017-09-12 Nathan Sidwell <nathan@acm.org>
306
307 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
308 resort_sorted_fields): Moved from c-family/c-common.c.
309 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
310
311 2017-09-01 Joseph Myers <joseph@codesourcery.com>
312
313 PR c/82071
314 * c-typeck.c (build_atomic_assign): Handle argument with excess
315 precision. Ensure any EXCESS_PRECISION_EXPR is present in
316 argument passed to build_binary_op and convert_for_assignment but
317 not for call to c_fully_fold.
318 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
319 Ensure build_binary_op is called with argument with original
320 semantic type. Avoid calling c_fully_fold with an
321 EXCESS_PRECISION_EXPR from build_binary_op.
322
323 2017-09-01 Jakub Jelinek <jakub@redhat.com>
324
325 PR c/81887
326 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
327
328 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
329 Alan Hayward <alan.hayward@arm.com>
330 David Sherwood <david.sherwood@arm.com>
331
332 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
333 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
334 m1 and m2 to the signed equivalent of a fixed-point
335 SCALAR_TYPE_MODE.
336
337 2017-08-24 David Malcolm <dmalcolm@redhat.com>
338
339 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
340 than CAN_HAVE_LOCATION_P when determining whether to use the
341 location_t value within "value".
342
343 2017-08-21 David Malcolm <dmalcolm@redhat.com>
344
345 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
346 rather than peeking the location of the first token.
347 * c-tree.h (c_expr::get_location): New method.
348
349 2017-08-21 David Malcolm <dmalcolm@redhat.com>
350
351 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
352 to check_function_arguments.
353
354 2017-08-18 Marek Polacek <polacek@redhat.com>
355
356 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
357 commentary.
358
359 2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
360
361 PR c/53037
362 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
363 (check_bitfield_type_and_width): Don't allow bit-field with
364 warn_if_not_aligned type.
365
366 2017-08-14 Martin Sebor <msebor@redhat.com>
367
368 PR c/81117
369 * c-objc-common.c (c_objc_common_init): Handle 'G'.
370
371 2017-08-11 Marek Polacek <polacek@redhat.com>
372
373 PR c/81795
374 * c-decl.c (pushtag): Only print inform if the warning was printed.
375 (grokdeclarator): Likewise.
376
377 2017-08-10 David Malcolm <dmalcolm@redhat.com>
378
379 * c-parser.c (c_parser_error): Rename to...
380 (c_parser_error_richloc): ...this, making static, and adding
381 "richloc" parameter, passing it to the c_parse_error call,
382 rather than calling c_parser_set_source_position_from_token.
383 (c_parser_error): Reintroduce, reimplementing in terms of the
384 above, converting return type from void to bool.
385 (class token_pair): New class.
386 (struct matching_paren_traits): New struct.
387 (matching_parens): New typedef.
388 (struct matching_brace_traits): New struct.
389 (matching_braces): New typedef.
390 (get_matching_symbol): New function.
391 (c_parser_require): Add param MATCHING_LOCATION, using it to
392 highlight matching "opening" tokens for missing "closing" tokens.
393 (c_parser_skip_until_found): Likewise.
394 (c_parser_static_assert_declaration_no_semi): Convert explicit
395 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
396 class matching_parens, so that the pertinent open parenthesis is
397 highlighted when there are problems locating the close
398 parenthesis.
399 (c_parser_struct_or_union_specifier): Likewise.
400 (c_parser_typeof_specifier): Likewise.
401 (c_parser_alignas_specifier): Likewise.
402 (c_parser_simple_asm_expr): Likewise.
403 (c_parser_braced_init): Likewise, for matching_braces.
404 (c_parser_paren_condition): Likewise, for matching_parens.
405 (c_parser_switch_statement): Likewise.
406 (c_parser_for_statement): Likewise.
407 (c_parser_asm_statement): Likewise.
408 (c_parser_asm_operands): Likewise.
409 (c_parser_cast_expression): Likewise.
410 (c_parser_sizeof_expression): Likewise.
411 (c_parser_alignof_expression): Likewise.
412 (c_parser_generic_selection): Likewise.
413 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
414 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
415 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
416 In case CPP_OPEN_PAREN, pass loc_open_paren to the
417 c_parser_skip_until_found call.
418 (c_parser_objc_class_definition): Use class matching_parens as
419 above.
420 (c_parser_objc_method_decl): Likewise.
421 (c_parser_objc_try_catch_finally_statement): Likewise.
422 (c_parser_objc_synchronized_statement): Likewise.
423 (c_parser_objc_at_property_declaration): Likewise.
424 (c_parser_oacc_wait_list): Likewise.
425 (c_parser_omp_var_list_parens): Likewise.
426 (c_parser_omp_clause_collapse): Likewise.
427 (c_parser_omp_clause_default): Likewise.
428 (c_parser_omp_clause_if): Likewise.
429 (c_parser_omp_clause_num_threads): Likewise.
430 (c_parser_omp_clause_num_tasks): Likewise.
431 (c_parser_omp_clause_grainsize): Likewise.
432 (c_parser_omp_clause_priority): Likewise.
433 (c_parser_omp_clause_hint): Likewise.
434 (c_parser_omp_clause_defaultmap): Likewise.
435 (c_parser_oacc_single_int_clause): Likewise.
436 (c_parser_omp_clause_ordered): Likewise.
437 (c_parser_omp_clause_reduction): Likewise.
438 (c_parser_omp_clause_schedule): Likewise.
439 (c_parser_omp_clause_num_teams): Likewise.
440 (c_parser_omp_clause_thread_limit): Likewise.
441 (c_parser_omp_clause_aligned): Likewise.
442 (c_parser_omp_clause_linear): Likewise.
443 (c_parser_omp_clause_safelen): Likewise.
444 (c_parser_omp_clause_simdlen): Likewise.
445 (c_parser_omp_clause_depend): Likewise.
446 (c_parser_omp_clause_map): Likewise.
447 (c_parser_omp_clause_device): Likewise.
448 (c_parser_omp_clause_dist_schedule): Likewise.
449 (c_parser_omp_clause_proc_bind): Likewise.
450 (c_parser_omp_clause_uniform): Likewise.
451 (c_parser_omp_for_loop): Likewise.
452 (c_parser_cilk_clause_vectorlength): Likewise.
453 (c_parser_cilk_clause_linear): Likewise.
454 (c_parser_transaction_expression): Likewise.
455 * c-parser.h (c_parser_require): Add param matching_location with
456 default UNKNOWN_LOCATION.
457 (c_parser_error): Convert return type from void to bool.
458 (c_parser_skip_until_found): Add param matching_location with
459 default UNKNOWN_LOCATION.
460
461 2017-08-09 Marek Polacek <polacek@redhat.com>
462
463 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
464 * c-tree.h (build_external_ref): Update declaration.
465 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
466 (build_external_ref): Change the type of a parameter to bool.
467 (parser_build_binary_op): Use true/false instead of 1/0.
468 (pointer_diff): Likewise.
469 (build_modify_expr): Likewise.
470 (set_designator): Change the type of a parameter to bool.
471 (set_init_index): Use true/false instead of 1/0.
472 (set_init_label): Likewise.
473 (output_init_element): Change the type of a parameter to bool.
474 (output_pending_init_elements): Use true/false instead of 1/0.
475 (process_init_element): Likewise.
476 (build_binary_op): Change the type of a parameter to bool.
477
478 2017-08-09 Marek Polacek <polacek@redhat.com>
479
480 PR c/81233
481 * c-typeck.c (pedwarn_init): Make the function take a variable list.
482 Call emit_diagnostic_valist instead of pedwarn.
483 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
484 Print the relevant types in diagnostics.
485
486 2017-08-09 Marek Polacek <polacek@redhat.com>
487
488 PR c/81417
489 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
490 build_conditional_expr.
491 * c-parser.c (c_parser_conditional_expression): Create locations for
492 EXP1 and EXP2 from their source ranges. Pass the locations down to
493 build_conditional_expr.
494 * c-tree.h (build_conditional_expr): Update declaration.
495 * c-typeck.c (build_conditional_expr): Add location_t parameters.
496 For -Wsign-compare, also print the types.
497
498 2017-08-08 Martin Liska <mliska@suse.cz>
499
500 * c-convert.c: Include header files.
501 * c-typeck.c: Likewise.
502
503 2017-08-07 Martin Liska <mliska@suse.cz>
504
505 * c-parser.c (c_parser_attributes): Canonicalize name of an
506 attribute.
507
508 2017-08-02 Marek Polacek <polacek@redhat.com>
509
510 PR c/81289
511 * c-parser.c (c_parser_unary_expression): Use set_error.
512
513 PR c/81448
514 PR c/81306
515 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
516 warnings. Avoid walking MACRO_MAP_LOCATIONS.
517
518 2017-07-31 Jan Hubicka <hubicka@ucw.cz>
519 Martin Liska <mliska@suse.cz>
520
521 * c-typeck.c (c_finish_goto_label): Build gimple predict
522 statement.
523
524 2017-07-31 Martin Liska <mliska@suse.cz>
525
526 PR sanitize/81530
527 * c-convert.c (convert): Guard condition with flag_sanitize_p
528 also with current_function_decl non-null equality.
529 * c-decl.c (grokdeclarator): Likewise.
530 * c-typeck.c (build_binary_op): Likewise.
531
532 2017-07-25 Marek Polacek <polacek@redhat.com>
533
534 * c-decl.c (grokfield): Remove local variable.
535
536 2017-07-25 Marek Polacek <polacek@redhat.com>
537
538 PR c/81364
539 * c-parser.c (c_parser_else_body): Don't warn about multistatement
540 macro expansion if the body is in { }.
541 (c_parser_while_statement): Likewise.
542 (c_parser_for_statement): Likewise.
543
544 2017-07-18 Nathan Sidwell <nathan@acm.org>
545
546 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
547
548 2017-07-14 David Malcolm <dmalcolm@redhat.com>
549
550 * c-decl.c (implicitly_declare): When suggesting a missing
551 #include, provide a fix-it hint.
552
553 2017-07-06 David Malcolm <dmalcolm@redhat.com>
554
555 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
556 and call that instead.
557 * c-tree.h (selftest::run_c_tests): New decl.
558
559 2017-06-26 Marek Polacek <polacek@redhat.com>
560
561 PR c/80116
562 * c-parser.c (c_parser_if_body): Set the location of the
563 body of the conditional after parsing all the labels. Call
564 warn_for_multistatement_macros.
565 (c_parser_else_body): Likewise.
566 (c_parser_switch_statement): Likewise.
567 (c_parser_while_statement): Likewise.
568 (c_parser_for_statement): Likewise.
569 (c_parser_statement): Add a default argument. Save the location
570 after labels have been parsed.
571 (c_parser_c99_block_statement): Likewise.
572
573 2017-06-19 Richard Biener <rguenther@suse.de>
574
575 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
576 negated _Literals to parse _Literal (int) -1.
577
578 2017-06-13 Martin Liska <mliska@suse.cz>
579
580 PR sanitize/78204
581 * c-convert.c (convert): Use sanitize_flags_p.
582 * c-decl.c (grokdeclarator): Likewise.
583 * c-typeck.c (convert_for_assignment): Likewise.
584 (c_finish_return): Likewise.
585 (build_binary_op): Likewise.
586
587 2017-06-08 Jakub Jelinek <jakub@redhat.com>
588
589 PR c/81006
590 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
591 to sizetype before size_binop.
592
593 2017-06-07 Jakub Jelinek <jakub@redhat.com>
594
595 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
596 of TDI_generic.
597
598 2017-06-06 Marek Polacek <polacek@redhat.com>
599
600 PR c/79983
601 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
602 ref.
603 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
604
605 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
606
607 * c-parser.c (c_parser_binary_expression): Implement the
608 -Wsizeof_pointer_div warning.
609 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
610 from a parenthesized expression.
611 (c_parser_expr_list): Use c_last_sizeof_loc.
612 * c-tree.h (c_last_sizeof_loc): New external.
613 * c-typeck.c (c_last_sizeof_loc): New variable.
614 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
615
616 2017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
617
618 PR testsuite/80580
619 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
620
621 2017-05-30 David Malcolm <dmalcolm@redhat.com>
622
623 * c-objc-common.c (c_tree_printer): Gain bool and const char **
624 parameters.
625
626 2017-05-24 Martin Sebor <msebor@redhat.com>
627
628 PR c/80731
629 * c-fold.c (c_fully_fold_internal): Adjust.
630 * c-typeck.c (parser_build_unary_op): Adjust.
631
632 2017-05-23 Thomas Schwinge <thomas@codesourcery.com>
633
634 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
635 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
636 "VECTOR_LENGTH".
637
638 2017-05-23 Marek Polacek <polacek@redhat.com>
639
640 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
641 quotes.
642
643 2017-05-22 Jakub Jelinek <jakub@redhat.com>
644
645 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
646 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
647 it returned invariant. Call tree_invariant_p unconditionally
648 afterwards to decide whether to return expr or op0.
649
650 2017-05-22 Nathan Sidwell <nathan@acm.org>
651
652 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
653
654 2017-05-19 Thomas Schwinge <thomas@codesourcery.com>
655
656 * c-parser.c (c_parser_omp_clause_default): Handle
657 "OMP_CLAUSE_DEFAULT_PRESENT".
658
659 2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
660
661 * config-lang.in (gtfiles): Add c-family/c-format.c.
662
663 2017-05-18 Nathan Sidwell <nathan@acm.org>
664
665 * c-decl.c (pushdecl_top_level): Delete unused function.
666
667 2017-05-18 Marek Polacek <polacek@redhat.com>
668
669 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
670 (check_earlier_gotos): Likewise.
671 (define_label): Likewise.
672 (pending_xref_error): Likewise.
673 (smallest_type_quals_location): Likewise.
674 (grokdeclarator): Likewise.
675 (grokparms): Likewise.
676 (identifier_global_value): Likewise.
677 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
678 (find_init_member): Likewise.
679
680 2017-05-18 Marek Polacek <polacek@redhat.com>
681
682 * c-decl.c (start_decl): Use false/true instead of 0/1.
683 (grokdeclarator): Likewise.
684 (finish_struct): Likewise.
685 (start_function): Change the return type to bool. Use false/true
686 instead of 0/1.
687 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
688 * c-tree.h (start_function): Update.
689 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
690 (set_designator): Change the return type to bool. Use false/true
691 instead of 0/1.
692
693 2017-05-17 Marek Polacek <polacek@redhat.com>
694
695 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
696 * c-typeck.c: Likewise.
697
698 2017-05-17 Marek Polacek <polacek@redhat.com>
699
700 PR sanitizer/80659
701 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
702 DECL_IGNORED_P even for non-static compound literals.
703
704 2017-05-17 Martin Liska <mliska@suse.cz>
705
706 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
707 use it instead of int type.
708
709 2017-05-17 Marek Polacek <polacek@redhat.com>
710
711 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
712 call c_fully_fold.
713 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
714 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
715 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
716 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
717 save_expr.
718 (c_parser_conditional_expression): Likewise.
719 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
720 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
721 (process_init_element): Likewise.
722 (build_binary_op): Likewise.
723 (handle_omp_array_sections_1): Likewise.
724
725 2017-05-12 Thomas Schwinge <thomas@codesourcery.com>
726
727 * c-parser.c (c_parser_omp_clause_num_gangs)
728 (c_parser_omp_clause_num_workers)
729 (c_parser_omp_clause_vector_length): Merge functions into...
730 (c_parser_oacc_single_int_clause): ... this new function. Adjust
731 all users.
732
733 2017-05-11 Nathan Sidwell <nathan@acm.org>
734
735 * gimple-parser.c: Don't #include tree-dump.h.
736
737 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
738
739 PR testsuite/80580
740 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
741
742 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
743
744 PR testsuite/80580
745 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
746 incorrect __MEM syntax.
747
748 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
749
750 PR testsuite/80580
751 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
752 type of unary '*'.
753
754 2017-05-09 Nathan Sidwell <nathan@acm.org>
755
756 * c-tree.h (pushdecl): Declare.
757
758 2017-05-05 David Malcolm <dmalcolm@redhat.com>
759
760 * c-decl.c (warn_defaults_to): Replace report_diagnostic
761 with diagnostic_report_diagnostic.
762 * c-errors.c (pedwarn_c99): Likewise.
763 (pedwarn_c90): Likewise.
764
765 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
766
767 PR c++/80038
768 * c-gimplify.c (c_gimplify_expr): Remove calls to
769 cilk_gimplifY_call_params_in_spawned_fn.
770
771 2017-04-25 David Malcolm <dmalcolm@redhat.com>
772
773 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
774 hint for removing extra semicolon.
775
776 2017-04-21 Jakub Jelinek <jakub@redhat.com>
777
778 PR c/80468
779 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
780 enabled, set specs->type to integer_type_node.
781
782 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
783
784 * c-array-notation.c: Fix typo in comment.
785
786 2017-03-29 Marek Polacek <polacek@redhat.com>
787
788 PR c/79730
789 * c-decl.c (finish_decl): Check VAR_P.
790
791 2017-03-27 Jakub Jelinek <jakub@redhat.com>
792
793 PR middle-end/80162
794 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
795 * c-typeck.c (c_mark_addressable): Likewise. Look through
796 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
797 to ARRAY_TYPE.
798 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
799
800 2017-03-23 Marek Polacek <polacek@redhat.com>
801
802 * c-tree.h: Remove a C_RID_YYCODE reference.
803
804 2017-03-21 Jakub Jelinek <jakub@redhat.com>
805
806 PR c/80097
807 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
808 optional COMPOUND_EXPR with ubsan instrumentation.
809
810 2017-03-17 Marek Polacek <polacek@redhat.com>
811
812 * c-parser.c: Add C11 references.
813
814 2017-03-15 Marek Polacek <polacek@redhat.com>
815
816 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
817
818 2017-03-11 Marek Polacek <polacek@redhat.com>
819
820 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
821
822 2017-03-10 David Malcolm <dmalcolm@redhat.com>
823
824 PR translation/79848
825 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
826 "%qs".
827 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
828
829 2017-03-09 Marek Polacek <polacek@redhat.com>
830
831 PR sanitizer/79757
832 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
833 parameter declarations with initializers.
834
835 2017-03-09 Jakub Jelinek <jakub@redhat.com>
836
837 PR c/79969
838 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
839 TYPE_STUB_DECL.
840
841 2017-03-07 Jakub Jelinek <jakub@redhat.com>
842
843 PR c/79834
844 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
845 for "may only be used in compound statements" diagnostics, change it
846 such that the same translatable string is used for all pragmas. For
847 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
848 diagnostics.
849 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
850 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
851 "may only be used in compound statements" diagnostics, such that the
852 same translatable string is used for all pragmas.
853
854 2017-03-04 Marek Polacek <polacek@redhat.com>
855
856 PR c/79847
857 * c-decl.c (implicit_decl_warning): Add missing space.
858
859 2017-03-03 Marek Polacek <polacek@redhat.com>
860
861 PR c/79758
862 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
863 current_function_prototype_arg_types is error_mark_node. Fix
864 formatting. Use TREE_VALUE instead of TREE_TYPE.
865
866 2017-03-03 Jakub Jelinek <jakub@redhat.com>
867
868 PR c/79837
869 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
870 %<min%> or %<max%> in the diagnostics, instead mention identifier.
871 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
872 diagnostics.
873
874 PR c/79836
875 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
876 instead of %<_Generic>.
877 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
878 (c_parser_omp_target_exit_data): Use %<release%> instead of
879 %<release>.
880
881 2017-02-28 Jakub Jelinek <jakub@redhat.com>
882
883 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
884 instead of just cond ? "..." : "...".
885 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
886 for "enter"/"exit" keyword.
887 (c_finish_oacc_routine): Don't use %s to supply portions of the
888 message.
889
890 2017-02-24 Jakub Jelinek <jakub@redhat.com>
891
892 PR c++/79588
893 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
894 handle -Wrestrict here.
895 * c-typeck.c (build_function_call_vec): Adjust
896 check_function_arguments caller.
897
898 2017-02-23 Richard Biener <rguenther@suse.de>
899
900 PR c/79684
901 * gimple-parser.c (c_parser_gimple_statement): Use set_error
902 to initialize c_exprs to return.
903 (c_parser_gimple_binary_expression): Likewise.
904 (c_parser_gimple_unary_expression): Likewise.
905 (c_parser_gimple_postfix_expression): Likewise.
906
907 2017-02-22 Marek Polacek <polacek@redhat.com>
908
909 PR c/79662
910 * c-typeck.c (convert_arguments): Handle error_mark_node.
911
912 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
913
914 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
915 value of c_parser_parse_ssa_name against error_mark_node and emit
916 error if ssa name is anonymous and written as default definition.
917
918 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
919
920 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
921 FMA_EXPR.
922
923 2017-02-16 Jakub Jelinek <jakub@redhat.com>
924
925 PR c++/79512
926 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
927 ignore #pragma omp target even when not followed by identifier.
928
929 2017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
930
931 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
932 (c_parser_gimple_unary_expression): Likewise.
933
934 2017-02-13 Jakub Jelinek <jakub@redhat.com>
935
936 * c-parser.c (c_parser_oacc_declare): Add missing space in
937 diagnostics.
938
939 2017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
940
941 PR c/79478
942 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
943 set_c_expr_source_range when parsing ssa-name.
944
945 2017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
946 Richard Biener <rguenther@suse.de>
947
948 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
949 building IL when arguments are error_mark_node.
950 (c_parser_gimple_unary_expression): Likewise.
951 (c_parser_gimple_if_stmt): Likewise.
952 (c_parser_gimple_switch_stmt): Likewise.
953 (c_parser_gimple_return_stmt): Likewise.
954 (c_parser_parse_ssa_name): When name lookup fails do not build
955 an SSA name. Use undeclared rather than not declared in error
956 reporting.
957
958 2017-02-09 Marek Polacek <polacek@redhat.com>
959
960 PR c/79428
961 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
962 instead of c_parser_skip_until_found.
963
964 2017-02-09 Jakub Jelinek <jakub@redhat.com>
965
966 PR c/79431
967 * c-parser.c (c_parser_omp_declare_target): Don't invoke
968 symtab_node::get on automatic variables.
969
970 2016-02-09 Nathan Sidwell <nathan@codesourcery.com>
971 Chung-Lin Tang <cltang@codesourcery.com>
972
973 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
974 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
975 semantic checking.
976 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
977
978 2017-02-07 Richard Biener <rguenther@suse.de>
979
980 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
981 (c_parser_gimple_postfix_expression_after_primary):
982 Do not use c_build_function_call_vec to avoid folding and promotion.
983 Simplify.
984
985 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
986
987 PR lto/79061
988 * c-decl.c (pop_scope): Pass main_input_filename to
989 build_translation_unit_decl.
990
991 2017-01-24 David Malcolm <dmalcolm@redhat.com>
992
993 * c-parser.c: Include "read-rtl-function.h" and
994 "run-rtl-passes.h".
995 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
996 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
997 production. Update for renaming of field "gimple_pass" to
998 "gimple_or_rtl_pass". If __RTL was seen, call
999 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
1000 to an auto_timevar, to cope with early exit.
1001 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
1002 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
1003 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
1004 Handle RID_RTL.
1005 (c_parser_parse_rtl_body): New function.
1006 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
1007 (struct c_declspecs): Rename field "gimple_pass" to
1008 "gimple_or_rtl_pass". Add field "rtl_p".
1009 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
1010 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
1011 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
1012 (c_parser_gimple_or_rtl_pass_list): ...this.
1013
1014 2017-01-20 Marek Polacek <polacek@redhat.com>
1015
1016 PR c/64279
1017 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
1018
1019 2017-01-13 Richard Biener <rguenther@suse.de>
1020
1021 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
1022 nops.
1023
1024 2017-01-13 Richard Biener <rguenther@suse.de>
1025
1026 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1027 _Literal ( type-name ) number.
1028
1029 2017-01-12 Richard Biener <rguenther@suse.de>
1030
1031 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1032 __MEM.
1033
1034 2017-01-11 Jakub Jelinek <jakub@redhat.com>
1035
1036 PR c++/72813
1037 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
1038 PCH file.
1039
1040 2017-01-11 Richard Biener <rguenther@suse.de>
1041
1042 PR bootstrap/79052
1043 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
1044 returns on parse errors.
1045
1046 2017-01-04 Marek Polacek <polacek@redhat.com>
1047
1048 PR c++/64767
1049 * c-parser.c (c_parser_postfix_expression): Mark zero character
1050 constants by setting original_type in c_expr.
1051 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
1052 with a zero character constant.
1053 (char_type_p): New function.
1054
1055 2017-01-04 David Malcolm <dmalcolm@redhat.com>
1056
1057 * c-parser.c (c_parser_declaration_or_fndef): Create a
1058 rich_location at init_loc and parse it to start_init.
1059 (last_init_list_comma): New global.
1060 (c_parser_braced_init): Update last_init_list_comma when parsing
1061 commas. Pass it to pop_init_level. Pass location of closing
1062 brace to pop_init_level.
1063 (c_parser_postfix_expression_after_paren_type): Create a
1064 rich_location at type_loc and parse it to start_init.
1065 (c_parser_omp_declare_reduction): Likewise for loc.
1066 * c-tree.h (start_init): Add rich_location * param.
1067 (pop_init_level): Add location_t param.
1068 * c-typeck.c (struct initializer_stack): Add field
1069 "missing_brace_richloc".
1070 (start_init): Add richloc param, use it to initialize
1071 the stack node's missing_brace_richloc.
1072 (last_init_list_comma): New decl.
1073 (finish_implicit_inits): Pass last_init_list_comma to
1074 pop_init_level.
1075 (push_init_level): When finding missing open braces, add fix-it
1076 hints to the richloc.
1077 (pop_init_level): Add "insert_before" param and pass it
1078 when calling pop_init_level. Add fixits about missing
1079 close braces to any richloc. Use the richloc for the
1080 -Wmissing-braces warning.
1081 (set_designator): Pass last_init_list_comma to pop_init_level.
1082 (process_init_element): Likewise.
1083
1084 2017-01-01 Jakub Jelinek <jakub@redhat.com>
1085
1086 Update copyright years.
1087
1088 2016-12-21 Jakub Jelinek <jakub@redhat.com>
1089
1090 PR bootstrap/78817
1091 * c-typeck.c (build_function_call_vec): If check_function_arguments
1092 returns true, set TREE_NO_WARNING on CALL_EXPR.
1093
1094 PR c/77767
1095 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
1096 to *expr instead of overwriting it.
1097
1098 2016-12-20 Richard Biener <rguenther@suse.de>
1099
1100 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
1101 error recovery.
1102 (c_parser_gimple_statement): Only build assigns for non-error
1103 stmts.
1104 (c_parser_gimple_postfix_expression_after): Improve error recovery.
1105
1106 2016-12-14 Martin Jambor <mjambor@suse.cz>
1107
1108 * c-parser.c: Include omp-general.h and omp-offload.h instead of
1109 omp-low.h.
1110 (c_finish_oacc_routine): Adjusted call to
1111 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
1112 to use their new names.
1113 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
1114 use its new name.
1115 (c_parser_oacc_update): Likewise.
1116 (c_parser_omp_simd): Likewise.
1117 (c_parser_omp_target_update): Likewise.
1118 * c-typeck.c: Include omp-general.h instead of omp-low.h.
1119 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
1120 name.
1121 (c_finish_omp_cancellation_point): Likewise.
1122 * gimple-parser.c: Do not include omp-low.h
1123
1124 2016-12-02 Cesar Philippidis <cesar@codesourcery.com>
1125 James Norris <jnorris@codesourcery.com>
1126
1127 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
1128 EXIT_DATA,WAIT} are not used in compound statements.
1129 (c_parser_oacc_enter_exit_data): Update diagnostics.
1130
1131 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
1132
1133 PR c++/71973
1134 * c-decl.c (diagnose_mismatched_decls): Use
1135 OPT_Wbuiltin_declaration_mismatch here too.
1136
1137 2016-11-18 Richard Sandiford <richard.sandiford@arm.com>
1138 Alan Hayward <alan.hayward@arm.com>
1139 David Sherwood <david.sherwood@arm.com>
1140
1141 * c-decl.c (merge_decls): Use SET_DECL_MODE.
1142 (make_label, finish_struct): Likewise.
1143
1144 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
1145 Richard Biener <rguenther@suse.de>
1146
1147 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
1148 * config-lang.in (gtfiles): Add c/c-parser.h.
1149 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
1150 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
1151 * c-parser.c (enum c_id_kind, struct c_token,
1152 c_parser_next_token_is, c_parser_next_token_is_not,
1153 c_parser_next_token_is_keyword,
1154 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
1155 Split out to ...
1156 * c-parser.h: ... new header.
1157 * c-parser.c: Include c-parser.h and gimple-parser.h.
1158 (c_parser_peek_token, c_parser_peek_2nd_token,
1159 c_token_starts_typename, c_parser_next_token_starts_declspecs,
1160 c_parser_next_tokens_start_declaration, c_parser_consume_token,
1161 c_parser_error, c_parser_require, c_parser_skip_until_found,
1162 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1163 c_parser_type_name): Export.
1164 (c_parser_tokens_buf): New function.
1165 (c_parser_error): Likewise.
1166 (c_parser_set_error): Likewise.
1167 (c_parser_declspecs): Handle RID_GIMPLE.
1168 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
1169 via c_parser_parse_gimple_body.
1170 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
1171 c_token_starts_typename, c_parser_next_token_starts_declspecs,
1172 c_parser_next_tokens_start_declaration, c_parser_consume_token,
1173 c_parser_error, c_parser_require, c_parser_skip_until_found,
1174 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1175 c_parser_type_name): Declare.
1176 (struct c_parser): Declare forward.
1177 (c_parser_tokens_buf): Declare.
1178 (c_parser_error): Likewise.
1179 (c_parser_set_error): Likewise.
1180 * gimple-parser.c: New file.
1181 * gimple-parser.h: Likewise.
1182
1183 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1184
1185 PR c/35503
1186 * c-parser.c (c_parser_postfix_expression_after_primary): Call
1187 warn_for_restrict.
1188
1189 2016-09-11 Le-Chun Wu <lcwu@google.com>
1190 Mark Wielaard <mjw@redhat.com>
1191
1192 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
1193 to the given -Wshadow= variant.
1194
1195 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
1196
1197 * c-typeck.c: Include memmodel.h.
1198
1199 2016-10-13 Jakub Jelinek <jakub@redhat.com>
1200
1201 PR target/77957
1202 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
1203 instead of lhd_return_null_tree_v.
1204
1205 2016-10-07 Bernd Schmidt <bschmidt@redhat.com>
1206
1207 PR c++/69733
1208 * c-decl.c (smallest_type_quals_location): New static function.
1209 (grokdeclarator): Try to find the correct location for an ignored
1210 qualifier.
1211
1212 2016-09-26 Marek Polacek <polacek@redhat.com>
1213
1214 PR c/7652
1215 * c-decl.c (pop_scope): Add gcc_fallthrough.
1216
1217 2016-09-26 Marek Polacek <polacek@redhat.com>
1218
1219 PR c/7652
1220 * c-parser.c (struct c_token): Add flags field.
1221 (c_lex_one_token): Pass it to c_lex_with_flags.
1222 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
1223 into IFN_FALLTHROUGH.
1224 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
1225 attribute fallthrough after a case label or default label.
1226 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
1227
1228 2016-09-24 Marek Polacek <polacek@redhat.com>
1229
1230 PR c/77490
1231 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
1232 have boolean value. Warn about ++/-- on booleans.
1233
1234 2016-09-23 Jakub Jelinek <jakub@redhat.com>
1235
1236 * c-parser.c (incomplete_record_decls): Remove unnecessary
1237 = vNULL initialization of file scope vec.
1238
1239 2016-09-16 Marek Polacek <polacek@redhat.com>
1240
1241 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
1242
1243 2016-09-14 Marek Polacek <polacek@redhat.com>
1244
1245 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
1246 (fix_array_notation_expr): Likewise.
1247 * c-decl.c (finish_decl): Likewise.
1248 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1249 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
1250 (function_to_pointer_conversion): Use false instead of 0.
1251 (convert_lvalue_to_rvalue): Likewise.
1252 (parser_build_unary_op): Likewise.
1253 (build_atomic_assign): Likewise.
1254 (build_unary_op): Change nonconvert parameter type to bool, use
1255 true/false instead of 1/0.
1256 (build_binary_op): Use true instead of 1.
1257
1258 2016-09-13 David Malcolm <dmalcolm@redhat.com>
1259
1260 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
1261 of add_fixit_insert to add_fixit_insert_before.
1262
1263 2016-09-13 Marek Polacek <polacek@redhat.com>
1264
1265 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
1266 it.
1267
1268 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
1269
1270 PR c++/77496
1271 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
1272 COMPOUND_EXPR to warn_for_omitted_condop.
1273
1274 2016-09-07 David Malcolm <dmalcolm@redhat.com>
1275
1276 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
1277 c_get_substring_location for this new langhook.
1278
1279 2016-09-02 Jakub Jelinek <jakub@redhat.com>
1280
1281 PR c/65467
1282 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
1283 flag_openmp.
1284 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
1285 instead of mark_exp_read on low_bound/length expression.
1286 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
1287 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
1288 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
1289 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
1290 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
1291 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
1292 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
1293 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
1294 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
1295 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
1296 instead of mark_expr_read.
1297 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
1298 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
1299 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
1300 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
1301 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
1302 array section bases outside of depend clause, for depend clause
1303 use convert_lvalue_to_rvalue on the base.
1304 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
1305 linear, aligned, map, to and from clauses.
1306 (c_omp_clause_copy_ctor): New function.
1307
1308 2016-09-01 Marek Polacek <polacek@redhat.com>
1309
1310 PR c/7652
1311 * c-typeck.c (composite_type): Add FALLTHRU comment.
1312
1313 2016-08-31 David Malcolm <dmalcolm@redhat.com>
1314
1315 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
1316 to the insertion fixits for "struct", "union", and "enum".
1317
1318 2016-08-30 David Malcolm <dmalcolm@redhat.com>
1319
1320 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
1321 rather than add_fixit_misspelled_id.
1322 (undeclared_variable): Likewise.
1323 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
1324 now-redundant "here" params from add_fixit_insert method calls.
1325 (c_parser_parameter_declaration): Likewise.
1326 * c-typeck.c (build_component_ref): Remove now-redundant range
1327 param from add_fixit_replace method calls.
1328
1329 2016-08-25 Marek Polacek <polacek@redhat.com>
1330
1331 * c-typeck.c (parser_build_binary_op): Pass LHS to
1332 warn_logical_not_parentheses.
1333
1334 2016-08-25 Marek Polacek <polacek@redhat.com>
1335
1336 PR c/77323
1337 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
1338 or _FloatN or _FloatNx is not supported.
1339 (finish_declspecs): Set type to integer_type_node when _FloatN or
1340 _FloatNx is not supported.
1341
1342 2016-08-19 Joseph Myers <joseph@codesourcery.com>
1343
1344 PR c/32187
1345 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
1346 (struct c_declspecs): Add field floatn_nx_idx.
1347 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
1348 and _FloatNx type specifiers.
1349 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
1350 (c_parser_declspecs, c_parser_attribute_any_word)
1351 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
1352 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
1353 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
1354 narrower than double.
1355
1356 2016-08-12 Jakub Jelinek <jakub@redhat.com>
1357 Martin Liska <mliska@suse.cz>
1358
1359 PR c/67410
1360 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
1361 % to determine val element to change. Assert that
1362 wchar_bytes * charwidth fits into val array.
1363
1364 2016-08-12 Marek Polacek <polacek@redhat.com>
1365
1366 PR c/7652
1367 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
1368 (c_parser_postfix_expression): Likewise.
1369 * c-typeck.c (build_unary_op): Adjust fall through comment.
1370 (c_mark_addressable): Likewise.
1371
1372 2016-08-11 Jakub Jelinek <jakub@redhat.com>
1373
1374 PR c/72816
1375 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
1376 array member through typedef, for orig_qual_indirect == 0 clear
1377 orig_qual_type.
1378
1379 2016-08-08 David Malcolm <dmalcolm@redhat.com>
1380
1381 PR c/64955
1382 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
1383 this up to selftest::run_c_tests.
1384 (selftest::run_c_tests): New function.
1385
1386 2016-08-04 Thomas Schwinge <thomas@codesourcery.com>
1387
1388 * c-parser.c (struct oacc_routine_data): Add error_seen and
1389 fndecl_seen members.
1390 (c_finish_oacc_routine): Use these.
1391 (c_parser_declaration_or_fndef): Adjust.
1392 (c_parser_oacc_routine): Likewise. Support more C language
1393 constructs, and improve diagnostics. Move pragma context
1394 checking...
1395 (c_parser_pragma): ... here.
1396
1397 * c-parser.c (struct oacc_routine_data): New.
1398 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
1399 Simplify code.
1400 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
1401 declare target" attribute.
1402
1403 2016-08-01 Jan Beulich <jbeulich@suse.com>
1404
1405 * c-fold.c (c_fully_fold_internal): Also emit shift count
1406 warnings for vector types.
1407 * c-typeck.c (build_binary_op): Likewise.
1408
1409 2016-07-29 Marek Polacek <polacek@redhat.com>
1410
1411 PR c/71742
1412 * c-decl.c (finish_struct): Rephrase an error message.
1413
1414 PR c/71853
1415 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
1416 to error node for invalid code.
1417
1418 PR c/71573
1419 * c-decl.c (implicitly_declare): Return decl early not only for
1420 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
1421
1422 2016-07-29 Jakub Jelinek <jakub@redhat.com>
1423
1424 PR c/71969
1425 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
1426 on GNU extern inline functions.
1427
1428 2016-07-29 Marek Polacek <polacek@redhat.com>
1429
1430 PR c/71583
1431 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
1432 check expr.value.
1433
1434 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
1435
1436 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
1437
1438 2016-07-20 David Malcolm <dmalcolm@redhat.com>
1439
1440 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
1441 spellcheck-tree.h
1442 (best_macro_match): Likewise, converting from a typedef to a
1443 subclass.
1444 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
1445 (lookup_name_fuzzy): Update for change of best_macro_match to a
1446 subclass with a ctor that calls cpp_forall_identifiers.
1447
1448 2016-07-20 David Malcolm <dmalcolm@redhat.com>
1449
1450 * c-decl.c (implicit_decl_warning): Update for conversion of
1451 return type of lookup_name_fuzzy to const char *.
1452 (undeclared_variable): Likewise.
1453 (lookup_name_fuzzy): Convert return type from tree to
1454 const char *.
1455 * c-parser.c (c_parser_declaration_or_fndef): Update for
1456 conversion of return type of lookup_name_fuzzy to const char *.
1457 (c_parser_parameter_declaration): Likewise.
1458
1459 2016-07-15 Cesar Philippidis <cesar@codesourcery.com>
1460
1461 * c-parser.c (c_parser_oacc_declare): Don't scan for
1462 GOMP_MAP_POINTER.
1463 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
1464 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
1465 zero-length subarrays.
1466
1467 2016-07-15 Jakub Jelinek <jakub@redhat.com>
1468
1469 PR c/71858
1470 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
1471 instead of FUZZY_LOOKUP_NAME.
1472 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
1473 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
1474
1475 2016-07-14 Jakub Jelinek <jakub@redhat.com>
1476
1477 PR c/71858
1478 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
1479
1480 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1481
1482 * c-parser.c (c_parser_generic_selection): Make type of variable
1483 auto_vec.
1484 (c_parser_omp_declare_simd): Likewise.
1485
1486 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1487
1488 * c-decl.c (struct c_struct_parse_info): Change member types
1489 from vec to auto_vec.
1490 (start_struct): Adjust.
1491 (finish_struct): Likewise.
1492
1493 2016-07-02 Jakub Jelinek <jakub@redhat.com>
1494
1495 PR c/71719
1496 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
1497
1498 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
1499
1500 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
1501 Move pragma context checking into...
1502 (c_parser_omp_cancellation_point): ... here, and improve
1503 diagnostic messages.
1504 * c-typeck.c (c_finish_omp_cancel)
1505 (c_finish_omp_cancellation_point): Improve diagnostic messages.
1506
1507 2016-06-29 Jakub Jelinek <jakub@redhat.com>
1508
1509 PR c/71685
1510 * c-typeck.c (c_build_qualified_type): Don't clear
1511 C_TYPE_INCOMPLETE_VARS for the main variant.
1512
1513 2016-06-28 Martin Sebor <msebor@redhat.com>
1514
1515 PR c/71552
1516 * c-typeck.c (output_init_element): Diagnose incompatible types
1517 before non-constant initializers.
1518
1519 2016-06-28 Jakub Jelinek <jakub@redhat.com>
1520
1521 * Make-lang.in: Don't cat ../stage_current if it does not exist.
1522
1523 2016-06-23 Andi Kleen <ak@linux.intel.com>
1524
1525 * Make-lang.in: Add support for autofdo.
1526
1527 2016-06-22 David Malcolm <dmalcolm@redhat.com>
1528
1529 PR c/70339
1530 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
1531 (implicit_decl_warning): When issuing warnings for implicit
1532 declarations, attempt to provide a suggestion via
1533 lookup_name_fuzzy.
1534 (undeclared_variable): Likewise when issuing errors.
1535 (lookup_name_in_scope): Likewise.
1536 (struct edit_distance_traits<cpp_hashnode *>): New struct.
1537 (best_macro_match): New typedef.
1538 (find_closest_macro_cpp_cb): New function.
1539 (lookup_name_fuzzy): New function.
1540 * c-parser.c: Include gcc-rich-location.h.
1541 (c_token_starts_typename): Split out case CPP_KEYWORD into...
1542 (c_keyword_starts_typename): ...this new function.
1543 (c_parser_declaration_or_fndef): When issuing errors about
1544 missing "struct" etc, add a fixit. For other kinds of errors,
1545 attempt to provide a suggestion via lookup_name_fuzzy.
1546 (c_parser_parms_declarator): When looking ahead to detect typos in
1547 type names, also reject CPP_KEYWORD.
1548 (c_parser_parameter_declaration): When issuing errors about
1549 unknown type names, attempt to provide a suggestion via
1550 lookup_name_fuzzy.
1551 * c-tree.h (c_keyword_starts_typename): New prototype.
1552
1553 2016-06-20 Joseph Myers <joseph@codesourcery.com>
1554
1555 PR c/71601
1556 * c-typeck.c (build_conditional_expr): Return error_mark_node if
1557 c_common_type returns error_mark_node.
1558
1559 2016-06-19 Martin Sebor <msebor@redhat.com>
1560
1561 PR c/69507
1562 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
1563 __alignof__ (expression).
1564
1565 2016-06-14 David Malcolm <dmalcolm@redhat.com>
1566
1567 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
1568
1569 2016-06-14 David Malcolm <dmalcolm@redhat.com>
1570
1571 * c-typeck.c (build_component_ref): Simplify fixit code by
1572 using gcc_rich_location::add_fixit_misspelled_id.
1573 (set_init_label): Likewise.
1574
1575 2016-06-13 David Malcolm <dmalcolm@redhat.com>
1576
1577 * c-parser.c (c_parser_initelt): Provide location of name for new
1578 location_t param of set_init_label.
1579 * c-tree.h (set_init_label): Add location_t param.
1580 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
1581 param and use it when issuing error messages about unrecognized
1582 field names. Attempt to provide a fixit hint if appropriate,
1583 otherwise update the error message to provide the type name.
1584
1585 2016-06-10 Thomas Schwinge <thomas@codesourcery.com>
1586
1587 PR c/71381
1588 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
1589 Loosen checking.
1590
1591 2016-06-08 Martin Sebor <msebor@redhat.com>
1592 Jakub Jelinek <jakub@redhat.com>
1593
1594 PR c++/70507
1595 PR c/68120
1596 * c-typeck.c (convert_arguments): Don't promote last argument
1597 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
1598
1599 2016-06-08 Marek Polacek <polacek@redhat.com>
1600
1601 PR c/71418
1602 * c-decl.c (grokdeclarator): Check TYPE_P.
1603
1604 PR c/71426
1605 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
1606 code.
1607
1608 2016-06-07 David Malcolm <dmalcolm@redhat.com>
1609
1610 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
1611 and structure element reference, capture the location of the
1612 element name token and pass it to build_component_ref.
1613 (c_parser_postfix_expression_after_primary): Likewise for
1614 structure element dereference.
1615 (c_parser_omp_variable_list): Likewise for
1616 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
1617 * c-tree.h (build_component_ref): Add location_t param.
1618 * c-typeck.c (build_component_ref): Add location_t param
1619 COMPONENT_LOC. Use it, if available, when issuing hints about
1620 mispelled member names to provide a fixit replacement hint.
1621
1622 2016-06-06 Marek Polacek <polacek@redhat.com>
1623
1624 PR c/71362
1625 * c-parser.c (c_parser_direct_declarator): Set location.
1626
1627 2016-06-06 Marek Polacek <polacek@redhat.com>
1628
1629 * c-typeck.c (comptypes_internal): Handle comparisons of
1630 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
1631 TYPE_REF_CAN_ALIAS_ALL.
1632
1633 2016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
1634
1635 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
1636 arguments as addressable when async clause exists.
1637
1638 2016-05-30 Jakub Jelinek <jakub@redhat.com>
1639
1640 PR c++/71349
1641 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
1642 when combined with target construct.
1643
1644 2016-05-26 Jakub Jelinek <jakub@redhat.com>
1645
1646 * c-parser.c (c_parser_omp_clause_schedule): Warn if
1647 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
1648
1649 2016-05-25 Marek Polacek <polacek@redhat.com>
1650
1651 PR c/71265
1652 * c-decl.c (c_make_fname_decl): Don't check seen_error.
1653
1654 PR c/71266
1655 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
1656
1657 2016-05-24 Cesar Philippidis <cesar@codesourcery.com>
1658
1659 * c-parser.c (c_parser_oacc_declare): Add support for
1660 GOMP_MAP_FIRSTPRIVATE_POINTER.
1661 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
1662 argument with enum c_omp_region_type ort.
1663 (handle_omp_array_sections): Likewise. Update call to
1664 handle_omp_array_sections_1.
1665 (c_finish_omp_clauses): Add specific errors and warning messages for
1666 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
1667 call to handle_omp_array_sections.
1668
1669 2016-05-24 Thomas Schwinge <thomas@codesourcery.com>
1670
1671 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
1672
1673 2016-05-24 Richard Biener <rguenther@suse.de>
1674
1675 PR middle-end/70434
1676 PR c/69504
1677 * c-typeck.c (build_array_ref): Do not complain about indexing
1678 non-lvalue vectors. Adjust for function name change.
1679
1680 2016-05-20 Martin Sebor <msebor@redhat.com>
1681
1682 PR c/71115
1683 * c-typeck.c (error_init): Use
1684 expansion_point_location_if_in_system_header.
1685 (warning_init): Same.
1686
1687 2016-05-19 David Malcolm <dmalcolm@redhat.com>
1688
1689 PR c/71171
1690 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
1691 in error-handling.
1692 (c_parser_postfix_expression): Likewise.
1693 * c-tree.h (c_expr::set_error): New method.
1694 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
1695 that result's range is initialized.
1696
1697 2016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
1698
1699 * c-typeck.c (parser_build_unary_op): Fix formatting.
1700
1701 2016-05-16 Matthew Wahab <matthew.wahab@arm.com>
1702
1703 * c-decl.c (grokdeclarator): Remove errmsg and use of
1704 targetm.invalid_return_type.
1705 (grokparms): Remove errmsg and use of
1706 targetm.invalid_parameter_type.
1707
1708 2016-05-13 Joseph Myers <joseph@codesourcery.com>
1709
1710 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
1711 function return type.
1712
1713 2016-05-12 Marek Polacek <polacek@redhat.com>
1714
1715 PR c/70756
1716 * c-decl.c (build_compound_literal): Pass LOC down to
1717 c_incomplete_type_error.
1718 * c-tree.h (require_complete_type): Adjust declaration.
1719 (c_incomplete_type_error): Likewise.
1720 * c-typeck.c (require_complete_type): Add location parameter, pass it
1721 down to c_incomplete_type_error.
1722 (c_incomplete_type_error): Add location parameter, pass it down to
1723 error_at.
1724 (build_component_ref): Pass location down to c_incomplete_type_error.
1725 (default_conversion): Pass location down to require_complete_type.
1726 (build_array_ref): Likewise.
1727 (build_function_call_vec): Likewise.
1728 (convert_arguments): Likewise.
1729 (build_unary_op): Likewise.
1730 (build_c_cast): Likewise.
1731 (build_modify_expr): Likewise.
1732 (convert_for_assignment): Likewise.
1733 (c_finish_omp_clauses): Likewise.
1734
1735 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1736
1737 PR c/43651
1738 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
1739 is enabled.
1740 * c-errors.c (pedwarn_c90): Return true if warned.
1741 * c-tree.h (pedwarn_c90): Change return type to bool.
1742 (enum c_declspec_word): Add new enumerator cdw_atomic.
1743
1744 2016-05-11 Marek Polacek <polacek@redhat.com>
1745
1746 PR c++/71024
1747 * c-decl.c (diagnose_mismatched_decls): Factor out code to
1748 diagnose_mismatched_attributes and call it.
1749
1750 2016-05-10 Marek Polacek <polacek@redhat.com>
1751
1752 PR c/70255
1753 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
1754 on a declaration following the definition.
1755
1756 2016-05-05 Jakub Jelinek <jakub@redhat.com>
1757
1758 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
1759 parse it through to c_parser_c99_block_statement.
1760 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
1761 caller.
1762
1763 2016-05-04 Marek Polacek <polacek@redhat.com>
1764
1765 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
1766 OPT_Wdangling_else.
1767
1768 2016-05-04 Marek Polacek <polacek@redhat.com>
1769
1770 PR c/48778
1771 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
1772 for macro expansions.
1773
1774 2016-05-03 Marek Polacek <polacek@redhat.com>
1775
1776 PR c/70859
1777 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
1778 check_builtin_function_arguments.
1779
1780 2016-05-03 Richard Biener <rguenther@suse.de>
1781
1782 * Make-lang.in (cc1-checksum.c): For stage-final re-use
1783 the checksum from the previous stage.
1784
1785 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
1786
1787 * c-parser.c (c_parser_oacc_all_clauses): Update call to
1788 c_finish_omp_clauses.
1789 (c_parser_omp_all_clauses): Likewise.
1790 (c_parser_oacc_cache): Likewise.
1791 (c_parser_oacc_loop): Likewise.
1792 (omp_split_clauses): Likewise.
1793 (c_parser_omp_declare_target): Likewise.
1794 (c_parser_cilk_all_clauses): Likewise.
1795 (c_parser_cilk_for): Likewise.
1796 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
1797 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
1798
1799 2016-05-02 Marek Polacek <polacek@redhat.com>
1800
1801 PR c/70851
1802 * c-decl.c (grokdeclarator): Diagnose when array's size has an
1803 incomplete type.
1804
1805 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
1806
1807 PR middle-end/70626
1808 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
1809 OACC_LOOP_CLAUSE_MASK.
1810 (c_parser_oacc_kernels_parallel): Update call to
1811 c_oacc_split_loop_clauses.
1812
1813 2016-04-28 Andrew MacLeod <amacleod@redhat.com>
1814
1815 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
1816 argument to build_modify_expr in two cases.
1817
1818 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
1819
1820 * c-parser.c (c_parser_postfix_expression_after_primary): Call
1821 warn_for_memset instead of warning directly here.
1822
1823 2016-04-26 Marek Polacek <polacek@redhat.com>
1824
1825 PR c/67784
1826 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
1827 out of ...
1828 (c_parser_for_statement): ... here.
1829 (c_parser_if_statement): Use it.
1830 (c_parser_switch_statement): Use it.
1831 (c_parser_while_statement): Use it.
1832
1833 PR c/70791
1834 * c-decl.c (pushdecl): Pass LOCUS down to warning.
1835
1836 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
1837
1838 PR c++/69363
1839 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
1840 instead of c_finish_cilk_clauses.
1841 * c-tree.h (c_finish_omp_clauses): Add new default argument.
1842 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
1843 floating-point variables in the linear clause for Cilk Plus.
1844
1845 2016-04-18 Michael Matz <matz@suse.de>
1846
1847 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
1848 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
1849
1850 2016-04-15 Marek Polacek <polacek@redhat.com>
1851
1852 PR c/70671
1853 * c-typeck.c (build_unary_op): Pass location down to error and
1854 warning call.
1855
1856 2016-04-15 Jakub Jelinek <jakub@redhat.com>
1857
1858 PR c/70436
1859 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
1860 where needed.
1861 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
1862 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
1863 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
1864 Adjust c_parser_pragma callers.
1865 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
1866 caller.
1867 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
1868 c_parser_statement.
1869 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
1870 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
1871 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
1872 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
1873 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
1874 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
1875 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
1876 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
1877 down where needed.
1878 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
1879 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
1880 calls.
1881
1882 2016-04-13 Marek Polacek <polacek@redhat.com>
1883
1884 PR c/70436
1885 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
1886 adjust callers.
1887 (c_parser_statement): Likewise.
1888 (c_parser_c99_block_statement): Likewise.
1889 (c_parser_while_statement): Likewise.
1890 (c_parser_for_statement): Likewise.
1891 (c_parser_if_body): Don't set IF_P here.
1892 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
1893 about dangling else here.
1894 * c-tree.h (c_finish_if_stmt): Adjust declaration.
1895 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
1896 warn about dangling else here.
1897
1898 2016-04-04 Marek Polacek <polacek@redhat.com>
1899
1900 PR c/70307
1901 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
1902
1903 2016-03-31 Marek Polacek <polacek@redhat.com>
1904
1905 PR c/70297
1906 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
1907
1908 2016-03-18 David Malcolm <dmalcolm@redhat.com>
1909
1910 PR c/70281
1911 * c-parser.c (c_parser_postfix_expression): Set the source range
1912 for uses of "__builtin_types_compatible_p".
1913
1914 2016-03-17 Jakub Jelinek <jakub@redhat.com>
1915
1916 PR c/70280
1917 * c-typeck.c (composite_type): Don't count void_list_node
1918 into len, if the list is terminated by void_list_node, start
1919 with void_list_node instead of NULL for newargs. Stop
1920 at void_list_node.
1921
1922 2016-03-16 Marek Polacek <polacek@redhat.com>
1923
1924 PR c/70093
1925 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
1926 nested functions returning VM types.
1927
1928 2016-03-09 Cesar Philippidis <cesar@codesourcery.com>
1929
1930 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
1931 when calling c_finish_omp_clauses.
1932
1933 2016-03-04 Bernd Schmidt <bschmidt@redhat.com>
1934
1935 PR c/69824
1936 * c-decl.c (get_parm_info): Don't queue implicit function declarations
1937 for later.
1938
1939 2016-03-04 Marek Polacek <polacek@redhat.com>
1940
1941 PR c/69798
1942 * c-parser.c (c_parser_postfix_expression): Call
1943 c_parser_cast_expression rather than c_parser_postfix_expression.
1944
1945 2016-03-01 Jakub Jelinek <jakub@redhat.com>
1946
1947 PR c/69796
1948 PR c/69974
1949 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
1950 of incomplete decls to error_mark_node.
1951
1952 2016-02-24 Marek Polacek <polacek@redhat.com>
1953
1954 PR c/69819
1955 * c-decl.c (finish_decl): Don't update the copy of the type of a
1956 different decl type.
1957
1958 2016-02-23 Jakub Jelinek <jakub@redhat.com>
1959
1960 PR objc/69844
1961 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
1962 in id_kind reclassification.
1963
1964 2016-02-16 Jakub Jelinek <jakub@redhat.com>
1965
1966 PR c/69835
1967 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
1968
1969 2016-02-16 James Norris <jnorris@codesourcery.com>
1970
1971 PR c/64748
1972 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
1973
1974 2016-02-12 Bernd Schmidt <bschmidt@redhat.com>
1975
1976 * c-decl.c (build_null_declspecs): Zero the entire struct.
1977
1978 PR c/69522
1979 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
1980 callers changed. If nested_p is true, use it to call
1981 finish_implicit_inits.
1982 * c-tree.h (finish_implicit_inits): Declare.
1983 * c-typeck.c (finish_implicit_inits): New function. Move code
1984 from ...
1985 (push_init_level): ... here.
1986 (set_designator, process_init_element): Call finish_implicit_inits.
1987
1988 2016-02-11 Jakub Jelinek <jakub@redhat.com>
1989
1990 PR c/69768
1991 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
1992 arguments for -Waddress warning.
1993
1994 2016-02-04 Jakub Jelinek <jakub@redhat.com>
1995
1996 PR c/69669
1997 * c-decl.c (finish_enum): When honoring mode attribute,
1998 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
1999
2000 2016-01-29 Jakub Jelinek <jakub@redhat.com>
2001
2002 PR debug/69518
2003 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
2004 all type variants, not just TYPE_MAIN_VARIANT.
2005
2006 2016-01-27 Jakub Jelinek <jakub@redhat.com>
2007
2008 PR debug/66869
2009 * c-decl.c (c_write_global_declarations_1): Warn with
2010 warn_unused_function if static prototype without definition
2011 is not C_DECL_USED.
2012
2013 2016-01-27 Marek Polacek <polacek@redhat.com>
2014
2015 PR c/68062
2016 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
2017 to unsigned, if needed. Add -Wsign-compare warning.
2018
2019 2016-01-26 Jakub Jelinek <jakub@redhat.com>
2020
2021 PR tree-optimization/69483
2022 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
2023
2024 2016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2025
2026 PR c/24293
2027 * c-tree.h (incomplete_record_decls): Declare.
2028 * c-parser.c (incomplete_record_decls): Define.
2029 (c_parser_translation_unit): Iterate through incomplete_record_decls and
2030 report error if any decl has zero size.
2031 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
2032 or enum type to incomplete_record_decls.
2033
2034 2016-01-14 Tom de Vries <tom@codesourcery.com>
2035
2036 PR tree-optimization/68773
2037 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
2038 set force_output.
2039
2040 2016-01-14 Marek Polacek <polacek@redhat.com>
2041
2042 PR c/69262
2043 * c-decl.c (grokdeclarator): Provide more information for invalid
2044 array declarations.
2045
2046 2016-01-06 David Malcolm <dmalcolm@redhat.com>
2047
2048 * c-parser.c (c_parser_unary_expression): For dereferences, build
2049 a combined location before calling build_indirect_ref, so that
2050 error reports cover the full range, manually updating the c_expr
2051 src_range.
2052
2053 2016-01-06 Marek Polacek <polacek@redhat.com>
2054
2055 PR sanitizer/69099
2056 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
2057 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
2058 NULL.
2059
2060 2016-01-04 Jakub Jelinek <jakub@redhat.com>
2061
2062 Update copyright years.
2063
2064 2016-01-04 Marek Polacek <polacek@redhat.com>
2065
2066 PR c/68908
2067 * c-typeck.c (build_atomic_assign): Improve commentary. Add
2068 optimization to use __atomic_fetch_* built-in if possible.
2069
2070 2015-12-23 Thomas Schwinge <thomas@codesourcery.com>
2071
2072 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
2073 into...
2074 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
2075 all users.
2076
2077 2015-12-22 Marek Polacek <polacek@redhat.com>
2078
2079 PR c/69002
2080 * c-typeck.c (build_component_ref): Warn when acessing elements of
2081 atomic structures or unions.
2082
2083 2015-12-21 David Malcolm <dmalcolm@redhat.com>
2084
2085 * c-typeck.c: Include "gcc-rich-location.h".
2086 (build_binary_op): In the two places that call binary_op_error,
2087 create a gcc_rich_location and populate it with the location of
2088 the binary op and its two operands.
2089
2090 2015-12-16 David Malcolm <dmalcolm@redhat.com>
2091
2092 * c-parser.c (c_parser_statement_after_labels): When calling
2093 c_finish_return, Use the return expression's location if it has
2094 one, falling back to the location of the first token within it.
2095 * c-typeck.c (c_finish_return): When issuing warnings about
2096 the incorrect presence/absence of a return value, issue a note
2097 showing the declaration of the function.
2098
2099 2015-12-16 David Malcolm <dmalcolm@redhat.com>
2100
2101 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
2102 to 4.
2103 (c_parser_peek_nth_token): New function.
2104 (c_parser_peek_conflict_marker): New function.
2105 (c_parser_error): Detect conflict markers and report them as such.
2106
2107 2015-12-16 David Malcolm <dmalcolm@redhat.com>
2108
2109 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
2110 to preserve range information for the primary expression
2111 in the call to c_parser_postfix_expression_after_primary.
2112
2113 2015-12-16 David Malcolm <dmalcolm@redhat.com>
2114
2115 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
2116 expression location, falling back on the first token location,
2117 rather than always using the latter.
2118
2119 2015-12-16 Marek Polacek <polacek@redhat.com>
2120
2121 PR c/64637
2122 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
2123 available.
2124
2125 2015-12-15 Marek Polacek <polacek@redhat.com>
2126
2127 PR c/68907
2128 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
2129 artificial decl.
2130
2131 2015-12-08 David Malcolm <dmalcolm@redhat.com>
2132
2133 * c-parser.c (c_parser_alignof_expression): Capture location of
2134 closing parenthesis (if any), or of end of unary expression, and
2135 use it to build a src_range for the expression.
2136
2137 2015-12-08 David Malcolm <dmalcolm@redhat.com>
2138
2139 PR c/68757
2140 * c-parser.c (c_parser_get_builtin_args): Add
2141 "out_close_paren_loc" param, and write back to it.
2142 (c_parser_postfix_expression): Capture the closing
2143 parenthesis location for RID_CHOOSE_EXPR,
2144 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
2145 RID_BUILTIN_SHUFFLE and use it to set the source range
2146 for such expressions; within RID_BUILTIN_COMPLEX set
2147 the underlying location.
2148
2149 2015-12-07 Marek Polacek <polacek@redhat.com>
2150
2151 PR c/68668
2152 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
2153 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
2154
2155 2015-12-04 Eric Botcazou <ebotcazou@adacore.com>
2156
2157 * c-tree.h (c_build_va_arg): Adjust prototype.
2158 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
2159 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
2160 parameter, adjust throughout and issue an error if EXPR is a component
2161 with reverse storage order.
2162
2163 2015-12-02 Jason Merrill <jason@redhat.com>
2164
2165 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
2166 (c_fully_fold_internal, decl_constant_value_for_optimization):
2167 Move from c-common.c.
2168 * c-tree.h: Declare decl_constant_value_for_optimization.
2169 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
2170
2171 2015-12-02 Joseph Myers <joseph@codesourcery.com>
2172
2173 PR c/68162
2174 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
2175 following link from declarator to next declarator. Track original
2176 qualified type and pass it to c_build_qualified_type.
2177 * c-typeck.c (c_build_qualified_type): Add arguments
2178 orig_qual_type and orig_qual_indirect.
2179
2180 2015-12-02 Thomas Schwinge <thomas@codesourcery.com>
2181
2182 * c-parser.c (c_parser_omp_clause_name)
2183 (c_parser_oacc_all_clauses): Alphabetical sorting.
2184
2185 2015-12-02 Jakub Jelinek <jakub@redhat.com>
2186
2187 PR c/68533
2188 * c-decl.c (get_parm_info): Use b->locus instead of input_location
2189 for diagnostics.
2190
2191 2015-12-01 Julian Brown <julian@codesourcery.com>
2192 Cesar Philippidis <cesar@codesourcery.com>
2193 James Norris <James_Norris@mentor.com>
2194
2195 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
2196 (c_parser_oacc_clause_use_device): New function.
2197 (c_parser_oacc_all_clauses): Add use_device support.
2198 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
2199 (c_parser_oacc_host_data): New function.
2200 (c_parser_omp_construct): Add host_data support.
2201 * c-tree.h (c_finish_oacc_host_data): Add prototype.
2202 * c-typeck.c (c_finish_oacc_host_data): New function.
2203 (c_finish_omp_clauses): Add use_device support.
2204
2205 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
2206
2207 PR c/67106
2208 * c-decl.c: Set TYPE_PACKED in variants.
2209
2210 2015-11-27 Martin Liska <mliska@suse.cz>
2211
2212 PR c++/68312
2213 * c-array-notation.c (fix_builtin_array_notation_fn):
2214 Use release_vec_vec instead of vec::release.
2215 (build_array_notation_expr): Likewise.
2216 (fix_conditional_array_notations_1): Likewise.
2217 (fix_array_notation_expr): Likewise.
2218 (fix_array_notation_call_expr): Likewise.
2219
2220 2015-11-27 Jakub Jelinek <jakub@redhat.com>
2221
2222 PR c/63326
2223 * c-parser.c (c_parser_compound_statement_nostart): If
2224 last_label is true, use pragma_stmt instead of pragma_compound
2225 as second c_parser_pragma argument.
2226 (c_parser_omp_ordered, c_parser_omp_target_update,
2227 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
2228 false as second argument to c_parser_skip_to_pragma_eol after
2229 diagnosing standalone directives used in pragma_stmt context.
2230
2231 2015-11-24 Ilya Verbin <ilya.verbin@intel.com>
2232
2233 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
2234 with "if (ENABLE_OFFLOADING)".
2235
2236 2015-11-23 David Malcolm <dmalcolm@redhat.com>
2237
2238 PR objc/68438
2239 * c-parser.c (c_parser_postfix_expression): Set up source ranges
2240 for various Objective-C constructs: Class.name syntax,
2241 @selector(), @protocol(), @encode(), and [] message syntax.
2242
2243 2015-11-20 David Malcolm <dmalcolm@redhat.com>
2244
2245 PR 62314
2246 * c-typeck.c (should_suggest_deref_p): New function.
2247 (build_component_ref): Special-case POINTER_TYPE when
2248 generating a "not a structure of union" error message, and
2249 suggest a "->" rather than a ".", providing a fix-it hint.
2250
2251 2015-11-19 David Malcolm <dmalcolm@redhat.com>
2252
2253 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
2254 candidate into a new function, find_closest_identifier.
2255
2256 2015-11-19 Marek Polacek <polacek@redhat.com>
2257
2258 PR c/68412
2259 * c-typeck.c (parser_build_binary_op): Properly handle
2260 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
2261
2262 2015-11-17 David Malcolm <dmalcolm@redhat.com>
2263
2264 * c-parser.c (set_c_expr_source_range): Bulletproof both
2265 overloaded implementations against NULL expr->value.
2266 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
2267 values.
2268 (c_parser_unary_expression): Likewise when handling addresses of
2269 labels.
2270 (c_parser_postfix_expression): Likewise for statement expressions,
2271 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
2272 __builtin_va_arg, and for __builtin_offset_of.
2273 (c_parser_postfix_expression_after_paren_type): Initialize expr's
2274 src_range using the range of the braced initializer.
2275 (c_parser_transaction_expression): Set src_range for "ret" to a
2276 sane pair of values.
2277
2278 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
2279
2280 * c-parser.c (c_finish_omp_declare_simd): Look for
2281 "simd" attribute as well. Update error message.
2282
2283 2015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2284
2285 * c-parser.c (c_parser_omp_declare_target): Adjust.
2286
2287 2015-11-14 Jakub Jelinek <jakub@redhat.com>
2288
2289 * c-typeck.c (c_finish_omp_clauses): Don't mark
2290 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
2291
2292 2015-11-14 Marek Polacek <polacek@redhat.com>
2293
2294 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
2295 * c-typeck.c: Likewise.
2296
2297 2015-11-13 David Malcolm <dmalcolm@redhat.com>
2298
2299 * c-decl.c (warn_defaults_to): Pass line_table to
2300 rich_location ctor.
2301 * c-errors.c (pedwarn_c99): Likewise.
2302 (pedwarn_c90): Likewise.
2303 * c-parser.c (set_c_expr_source_range): New functions.
2304 (c_token::get_range): New method.
2305 (c_token::get_finish): New method.
2306 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
2307 based on the range from the start of the LHS to the end of the
2308 RHS.
2309 (c_parser_conditional_expression): Likewise, based on the range
2310 from the start of the cond.value to the end of exp2.value.
2311 (c_parser_binary_expression): Call set_c_expr_source_range on
2312 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
2313 (c_parser_cast_expression): Call set_c_expr_source_range on ret
2314 based on the cast_loc through to the end of the expr.
2315 (c_parser_unary_expression): Likewise, based on the
2316 op_loc through to the end of op.
2317 (c_parser_sizeof_expression) Likewise, based on the start of the
2318 sizeof token through to either the closing paren or the end of
2319 expr.
2320 (c_parser_postfix_expression): Likewise, using the token range,
2321 or from the open paren through to the close paren for
2322 parenthesized expressions.
2323 (c_parser_postfix_expression_after_primary): Likewise, for
2324 various kinds of expression.
2325 * c-tree.h (struct c_expr): Add field "src_range".
2326 (c_expr::get_start): New method.
2327 (c_expr::get_finish): New method.
2328 (set_c_expr_source_range): New decls.
2329 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
2330 on ret for prefix unary ops.
2331 (parser_build_binary_op): Likewise, running from the start of
2332 arg1.value through to the end of arg2.value.
2333
2334 2015-11-13 Marek Polacek <polacek@redhat.com>
2335
2336 PR c/68320
2337 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
2338
2339 2015-11-13 David Malcolm <dmalcolm@redhat.com>
2340
2341 * c-typeck.c: Include spellcheck.h.
2342 (lookup_field_fuzzy_find_candidates): New function.
2343 (lookup_field_fuzzy): New function.
2344 (build_component_ref): If the field was not found, try using
2345 lookup_field_fuzzy and potentially offer a suggestion.
2346
2347 2015-11-12 James Norris <jnorris@codesourcery.com>
2348 Joseph Myers <joseph@codesourcery.com>
2349
2350 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
2351 (c_parser_omp_clause_name): Handle 'device_resident' clause.
2352 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
2353 and PRAGMA_OMP_CLAUSE_LINK.
2354 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
2355 and PRAGMA_OACC_CLAUSE_LINK.
2356 (OACC_DECLARE_CLAUSE_MASK): New definition.
2357 (c_parser_oacc_declare): New function.
2358
2359 2015-11-12 Marek Polacek <polacek@redhat.com>
2360
2361 PR c/67784
2362 * c-parser.c (c_parser_for_statement): Reclassify the token in
2363 a correct scope.
2364
2365 2015-11-11 Marek Polacek <polacek@redhat.com>
2366
2367 PR c/68107
2368 PR c++/68266
2369 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
2370 checking the size of an array.
2371
2372 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
2373
2374 * c-array-notation.c: Remove unused header files.
2375 * c-aux-info.c: Likewise.
2376 * c-convert.c: Likewise.
2377 * c-decl.c: Likewise.
2378 * c-errors.c: Likewise.
2379 * c-lang.c: Likewise.
2380 * c-objc-common.c: Likewise.
2381 * c-parser.c: Likewise.
2382 * c-typeck.c: Likewise.
2383 * gccspec.c: Likewise.
2384
2385 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
2386 Cesar Philippidis <cesar@codesourcery.com>
2387 James Norris <jnorris@codesourcery.com>
2388 Julian Brown <julian@codesourcery.com>
2389 Nathan Sidwell <nathan@codesourcery.com>
2390
2391 c/
2392 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
2393 routine arg.
2394 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
2395 (c_parser_pragma): Parse 'acc routine'.
2396 (OACC_ROUTINE_CLAUSE_MARK): Define.
2397 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
2398
2399 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
2400
2401 PR debug/67192
2402 * c-typeck.c (c_finish_loop): For unconditional loops, set the
2403 location of the backward-goto to the start of the loop body.
2404
2405 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
2406
2407 PR debug/67192
2408 * c-parser.c (c_parser_while_statement): Finish the loop before
2409 parsing ahead for misleading indentation.
2410 (c_parser_for_statement): Likewise.
2411
2412 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
2413
2414 * c-decl.c (finish_struct): If the structure has reverse storage
2415 order, rewrite the type of array fields with scalar component. Call
2416 maybe_apply_pragma_scalar_storage_order on entry.
2417 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
2418 errors on bit-fields and reverse SSO here and not...
2419 (c_mark_addressable): ...here.
2420 (output_init_element): Adjust call to initializer_constant_valid_p.
2421 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
2422
2423 2015-11-06 David Malcolm <dmalcolm@redhat.com>
2424
2425 * c-decl.c (warn_defaults_to): Update for change in signature
2426 of diagnostic_set_info.
2427 * c-errors.c (pedwarn_c99): Likewise.
2428 (pedwarn_c90): Likewise.
2429 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
2430 for textinfo::set_location.
2431
2432 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
2433 Thomas Schwinge <thomas@codesourcery.com>
2434 James Norris <jnorris@codesourcery.com>
2435
2436 * c-parser.c (c_parser_omp_clause_name): Add support for
2437 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
2438 (c_parser_omp_clause_default): Add is_oacc argument. Handle
2439 default(none) in OpenACC.
2440 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
2441 arguments.
2442 (c_parser_oacc_clause_tile): New function.
2443 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
2444 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
2445 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
2446 TILE}.
2447 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
2448 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
2449 FIRSTPRIVATE}.
2450 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
2451 (c_parser_oacc_update): Update the error message for missing clauses.
2452 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
2453 and OMP_CLAUSE_INDEPENDENT.
2454
2455 2015-11-05 Marek Polacek <polacek@redhat.com>
2456
2457 PR c/68090
2458 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
2459 deal with pre-evaluation on invalid types.
2460
2461 2015-11-05 Jakub Jelinek <jakub@redhat.com>
2462 Ilya Verbin <ilya.verbin@intel.com>
2463
2464 * c-parser.c: Include context.h and gimple-expr.h.
2465 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
2466 monotonic together with nonmonotonic.
2467 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
2468 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
2469 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
2470 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
2471 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
2472 expressions on combined target teams before the target.
2473 (c_parser_omp_declare_target): If decl has "omp declare target" or
2474 "omp declare target link" attribute, and cgraph or varpool node already
2475 exists, then set corresponding flags. Call c_finish_omp_clauses
2476 in the parenthesized extended-list syntax case.
2477 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
2478 declare target.
2479 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
2480 on OMP_CLAUSE_REDUCTION array sections.
2481 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
2482 into the constant offset, or for variable low-bound using
2483 POINTER_PLUS_EXPR. For structure element based array sections use
2484 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
2485 (c_finish_omp_clauses): Drop generic_field_head, structure
2486 elements are now always mapped even as array section bases,
2487 diagnose same var in data sharing and mapping clauses. Diagnose if
2488 linear step on declare simd is neither a constant nor a uniform
2489 parameter. Look through POINTER_PLUS_EXPR for array section
2490 reductions. Diagnose the same var or function appearing multiple
2491 times on the same directive. Fix up wording for the to clause if t
2492 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
2493 modifier on kinds other than dynamic or guided or nonmonotonic
2494 modifier together with ordered clause.
2495
2496 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
2497 Chung-Lin Tang <cltang@codesourcery.com>
2498
2499 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
2500
2501 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
2502
2503 * c-array-notation.c: Reorder #include's and remove duplicates.
2504 * c-aux-info.c: Likewise.
2505 * c-convert.c: Likewise.
2506 * c-decl.c: Likewise.
2507 * c-errors.c: Likewise.
2508 * c-lang.c: Likewise.
2509 * c-objc-common.c: Likewise.
2510 * c-parser.c: Likewise.
2511 * c-typeck.c: Likewise.
2512
2513 2015-10-26 Jim Wilson <jim.wilson@linaro.org>
2514
2515 PR debug/66068
2516 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
2517 after calling build_qualified_type.
2518
2519 2015-10-27 Cesar Philippidis <cesar@codesourcery.com>
2520 Thomas Schwinge <thomas@codesourcery.com>
2521 James Norris <jnorris@codesourcery.com>
2522 Joseph Myers <joseph@codesourcery.com>
2523 Julian Brown <julian@codesourcery.com>
2524 Bernd Schmidt <bschmidt@redhat.com>
2525
2526 * c-parser.c (c_parser_oacc_shape_clause): New.
2527 (c_parser_oacc_simple_clause): New.
2528 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
2529 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
2530
2531 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
2532 James Norris <jnorris@codesourcery.com>
2533 Cesar Philippidis <cesar@codesourcery.com>
2534
2535 PR c/64765
2536 PR c/64880
2537 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
2538 parameters, and handle these. Adjust all users.
2539 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
2540 into...
2541 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
2542 all users.
2543 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
2544 declare functions.
2545 (c_finish_omp_construct): Declare function.
2546 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
2547 Merge functions into...
2548 (c_finish_omp_construct): ... this new function.
2549
2550 2015-10-22 Richard Biener <rguenther@suse.de>
2551
2552 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
2553 before folding a MINUS_EXPR.
2554
2555 2015-10-21 Marek Polacek <polacek@redhat.com>
2556
2557 PR c/68024
2558 * c-decl.c (start_function): Warn about vararg functions without
2559 a prototype.
2560
2561 2015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
2562
2563 * c-typeck.c (build_conditional_expr): Use boolean vector
2564 type for vector comparison.
2565 (build_vec_cmp): New.
2566 (build_binary_op): Use build_vec_cmp for comparison.
2567
2568 2015-10-20 Marek Polacek <polacek@redhat.com>
2569
2570 * c-parser.c (is_cilkplus_vector_p): Don't define here.
2571
2572 2015-10-20 Marek Polacek <polacek@redhat.com>
2573
2574 PR c/67964
2575 * c-parser.c (c_parser_attributes): Break out of the loop if the
2576 token after an attribute isn't a comma.
2577
2578 2015-10-13 Jakub Jelinek <jakub@redhat.com>
2579 Aldy Hernandez <aldyh@redhat.com>
2580
2581 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
2582 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
2583 (c_parser_omp_variable_list): Handle structure elements for
2584 map, to and from clauses. Handle array sections in reduction
2585 clause. Formatting fixes.
2586 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
2587 if clause modifiers.
2588 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
2589 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
2590 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
2591 c_parser_omp_clause_is_device_ptr): New functions.
2592 (c_parser_omp_clause_ordered): Parse optional parameter.
2593 (c_parser_omp_clause_reduction): Handle array reductions.
2594 (c_parser_omp_clause_schedule): Parse optional simd modifier.
2595 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
2596 functions.
2597 (c_parser_omp_clause_linear): Parse linear clause modifiers.
2598 (c_parser_omp_clause_depend_sink): New function.
2599 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
2600 (c_parser_omp_clause_map): Parse release/delete map kinds and
2601 optional always modifier.
2602 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
2603 and c_finish_omp_clauses callers.
2604 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
2605 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
2606 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
2607 (OMP_CRITICAL_CLAUSE_MASK): Define.
2608 (c_parser_omp_critical): Parse critical clauses.
2609 (c_parser_omp_for_loop): Handle doacross loops, adjust
2610 c_finish_omp_for and c_finish_omp_clauses callers.
2611 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
2612 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
2613 (OMP_FOR_CLAUSE_MASK): Add linear clause.
2614 (c_parser_omp_for): Disallow ordered clause when combined with
2615 distribute. Disallow linear clause when combined with distribute
2616 and not combined with simd.
2617 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
2618 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
2619 parse clauses and if depend clause is found, don't parse a body.
2620 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
2621 Allow target parallel without for after it.
2622 (OMP_TASK_CLAUSE_MASK): Add priority clause.
2623 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
2624 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
2625 invalid kinds.
2626 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
2627 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
2628 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
2629 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
2630 functions.
2631 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
2632 defaultmap and is_device_ptr clauses.
2633 (c_parser_omp_target): Parse target parallel and target simd. Set
2634 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
2635 and target exit data. Diagnose invalid map kinds.
2636 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
2637 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
2638 construct.
2639 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
2640 &omp_priv.
2641 (OMP_TASKLOOP_CLAUSE_MASK): Define.
2642 (c_parser_omp_taskloop): New function.
2643 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
2644 handle PRAGMA_OMP_TASKLOOP.
2645 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
2646 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
2647 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
2648 Add IS_OMP argument, handle structure element bases, diagnose
2649 bitfields, pass IS_OMP recursively, diagnose known zero length
2650 array sections in depend clauses, handle array sections in reduction
2651 clause, diagnose negative length even for pointers.
2652 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
2653 types, pass IS_OMP down to handle_omp_array_sections_1, handle
2654 array sections in reduction clause, set
2655 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
2656 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
2657 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
2658 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
2659
2660 2015-10-06 Marek Polacek <polacek@redhat.com>
2661
2662 * c-parser.c (c_parser_statement_after_labels): Use
2663 protected_set_expr_location.
2664 (c_parser_omp_clause_num_gangs): Likewise.
2665 (c_parser_omp_clause_num_threads): Likewise.
2666 (c_parser_omp_clause_num_workers): Likewise.
2667 (c_parser_omp_clause_vector_length): Likewise.
2668 (c_parser_omp_clause_num_teams): Likewise.
2669 (c_parser_omp_clause_thread_limit): Likewise.
2670 * c-typeck.c (build_c_cast): Likewise.
2671 (c_cast_expr): Likewise.
2672
2673 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
2674
2675 * c-typeck.c (c_tree_equal): Use real_equal instead of
2676 REAL_VALUES_EQUAL.
2677
2678 2015-10-04 Jason Merrill <jason@redhat.com>
2679
2680 * c-parser.c (c_lex_one_token): Handle @synchronized.
2681 * c-decl.c (match_builtin_function_types): A declaration of a built-in
2682 can change whether the function is transaction_safe.
2683
2684 2015-10-02 Marek Polacek <polacek@redhat.com>
2685
2686 PR c/67730
2687 * c-typeck.c (convert_for_assignment): Use the expansion point
2688 location throughout.
2689
2690 2015-10-02 Marek Polacek <polacek@redhat.com>
2691
2692 PR c/64249
2693 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
2694 and pass it down to c_parser_if_statement.
2695 (c_parser_else_body): Add CHAIN parameter and pass it down to
2696 c_parser_statement_after_labels.
2697 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
2698 duplicated if-else-if conditions.
2699
2700 2015-10-01 Marek Polacek <polacek@redhat.com>
2701
2702 * c-typeck.c (convert_for_assignment): Improve commentary.
2703
2704 2015-09-30 Marek Polacek <polacek@redhat.com>
2705
2706 PR c/67730
2707 * c-typeck.c (c_finish_return): Use the expansion point location for
2708 certain "return with value" warnings.
2709
2710 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
2711
2712 * c-parser.c (pragma_lex): Add loc argument.
2713
2714 2015-09-15 Marek Polacek <polacek@redhat.com>
2715
2716 PR c/67580
2717 * c-decl.c (tag_exists_p): New function.
2718 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
2719 struct/union/enum keywords are missing.
2720 * c-tree.h (tag_exists_p): Declare.
2721
2722 2015-09-15 Marek Polacek <polacek@redhat.com>
2723
2724 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
2725 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
2726 Return NULL_TREE instead of 0.
2727 (lookup_name): Return NULL_TREE instead of 0.
2728 (lookup_name_in_scope): Likewise.
2729 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
2730 (parser_xref_tag): Use false instead of 0.
2731 (start_struct): Use true instead of 1.
2732 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
2733
2734 2015-09-14 Marek Polacek <polacek@redhat.com>
2735
2736 * c-typeck.c (set_nonincremental_init_from_string): Use
2737 HOST_WIDE_INT_M1U when shifting a negative value.
2738
2739 2015-09-09 Mark Wielaard <mjw@redhat.com>
2740
2741 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
2742 parm against NULL.
2743
2744 2015-09-10 Jakub Jelinek <jakub@redhat.com>
2745
2746 PR c/67502
2747 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
2748 into OMP_FOR_PRE_BODY rather than before the loop.
2749
2750 2015-09-09 Jakub Jelinek <jakub@redhat.com>
2751
2752 PR c/67501
2753 * c-parser.c (c_parser_oacc_all_clauses,
2754 c_parser_omp_all_clauses): Remove invalid clause from
2755 list of clauses even if parser->error is set.
2756
2757 PR c/67500
2758 * c-parser.c (c_parser_omp_clause_aligned,
2759 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
2760 test for errors.
2761 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
2762 error_mark_node.
2763
2764 PR c/67495
2765 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
2766 instead of c_parser_unary_expression. If the result is !lvalue_p,
2767 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
2768
2769 2015-09-04 Marek Polacek <polacek@redhat.com>
2770
2771 PR sanitizer/67279
2772 * c-typeck.c (build_binary_op): Don't instrument static initializers.
2773
2774 2015-09-03 Martin Sebor <msebor@redhat.com>
2775
2776 PR c/66516
2777 * c-typeck.c (convert_arguments, parser_build_unary_op,
2778 build_conditional_expr, c_cast_expr, convert_for_assignment,
2779 build_binary_op, _objc_common_truthvalue_conversion): Call
2780 reject_gcc_builtin.
2781 (c_decl_implicit): Define.
2782
2783 2015-09-02 Marek Polacek <polacek@redhat.com>
2784
2785 PR c/67432
2786 * c-parser.c (c_parser_enum_specifier): Give a better error for
2787 an empty enum.
2788
2789 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
2790
2791 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
2792
2793 2015-08-12 Marek Polacek <polacek@redhat.com>
2794
2795 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
2796 LOC to it.
2797
2798 2015-08-03 Marek Polacek <polacek@redhat.com>
2799
2800 PR c/67088
2801 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
2802 Use it.
2803 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
2804
2805 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
2806
2807 * c-parser.c (c_parser_if_body): Take token_indent_info
2808 argument. Call warn_for_misleading_indentation even when the
2809 body is a semicolon. Extract token_indent_infos corresponding
2810 to the guard, body and next tokens. Adjust call to
2811 warn_for_misleading_indentation accordingly.
2812 (c_parser_else_body): Likewise.
2813 (c_parser_if_statement): Likewise.
2814 (c_parser_while_statement): Likewise.
2815 (c_parser_for_statement): Likewise.
2816
2817 2015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
2818 Manuel López-Ibáñez <manu@gcc.gnu.org>
2819
2820 * c-decl.c (get_parm_info): Remove static var. Update warning
2821 message.
2822
2823 2015-07-27 Marek Polacek <polacek@redhat.com>
2824
2825 PR c++/66555
2826 PR c/54979
2827 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
2828
2829 2015-07-20 Marek Polacek <polacek@redhat.com>
2830
2831 PR c++/55095
2832 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
2833 (build_binary_op): Warn about left shift overflows.
2834
2835 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
2836
2837 * c-array-notation.c: Adjust includes for flags.h changes.
2838 * c-objc-common.c: Likewise.
2839
2840 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
2841
2842 * c-array-notation.c: Adjust includes.
2843 * c-aux-info.c: Likewise.
2844 * c-convert.c: Likewise.
2845 * c-decl.c: Likewise.
2846 * c-errors.c: Likewise.
2847 * c-lang.c: Likewise.
2848 * c-objc-common.c: Likewise.
2849 * c-parser.c: Likewise.
2850 * c-typeck.c: Likewise.
2851
2852 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
2853
2854 PR fortran/66605
2855 * c-decl.c (finish_function): Call do_warn_unused_parameter.
2856
2857 2015-06-29 Marek Polacek <polacek@redhat.com>
2858
2859 PR c/66322
2860 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
2861 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
2862 about -Wswitch-bool here.
2863 (do_case): Update c_add_case_label call.
2864 (c_finish_case): Update c_do_switch_warnings call.
2865
2866 2015-06-27 Marek Polacek <polacek@redhat.com>
2867
2868 * c-typeck.c: Use VECTOR_TYPE_P throughout.
2869
2870 2015-06-26 Marek Polacek <polacek@redhat.com>
2871
2872 * c-array-notation.c (fix_builtin_array_notation_fn): Use
2873 INDIRECT_REF_P.
2874 * c-typeck.c (array_to_pointer_conversion): Likewise.
2875 (build_unary_op): Likewise.
2876 (c_finish_return): Likewise.
2877
2878 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
2879
2880 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
2881 * c-parser.c: Likewise.
2882
2883 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
2884
2885 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
2886 instead of pointer_hash.
2887 (detect_field_duplicates): Likewise.
2888
2889 2015-06-25 Marek Polacek <polacek@redhat.com>
2890
2891 * c-array-notation.c: Use VAR_P throughout.
2892 * c-decl.c: Likewise.
2893 * c-objc-common.c: Likewise.
2894 * c-parser.c: Likewise.
2895 * c-typeck.c: Likewise.
2896
2897 2015-06-25 Marek Polacek <polacek@redhat.com>
2898
2899 * c-decl.c: Use is_global_var throughout.
2900 * c-parser.c: Likewise.
2901 * c-typeck.c: Likewise.
2902
2903 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
2904
2905 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
2906 * c-aux-info.c: Likewise.
2907 * c-convert.c: Likewise.
2908 * c-decl.c: Likewise.
2909 * c-errors.c: Likewise.
2910 * c-lang.c: Likewise.
2911 * c-objc-common.c: Likewise.
2912 * c-parser.c: Likewise.
2913 * c-typeck.c: Likewise.
2914
2915 2015-06-11 Jan Hubicka <hubicka@ucw.cz>
2916
2917 PR middle-end/66325
2918 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
2919 variants.
2920
2921 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
2922
2923 * c-decl.c (pop_scope): Register the main translation unit
2924 through the new debug hook.
2925
2926 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
2927
2928 * c-array-notation.c : Adjust include files.
2929 * c-aux-info.c : Likewise.
2930 * c-convert.c : Likewise.
2931 * c-decl.c : Likewise.
2932 * c-errors.c : Likewise.
2933 * c-lang.c : Likewise.
2934 * c-lang.h : Likewise.
2935 * c-objc-common.c : Likewise.
2936 * c-parser.c : Likewise.
2937 * c-typeck.c : Likewise.
2938
2939 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
2940
2941 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
2942 immediately clobber it.
2943 (c_write_global_declarations_1): Remove call to
2944 check_global_declaration_1.
2945 (c_write_global_declarations_2): Remove.
2946 (c_write_final_cleanups): Rename from c_write_global_declarations.
2947 Remove call to finalize_compilation_unit.
2948 Remove calls to debugging hooks.
2949 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
2950 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
2951 * c-tree.h: Remove c_write_global_declarations.
2952
2953 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
2954
2955 * c-array-notation.c: Adjust includes for restructured coretypes.h.
2956 * c-aux-info.c: Likewise.
2957 * c-convert.c: Likewise.
2958 * c-decl.c: Likewise.
2959 * c-errors.c: Likewise.
2960 * c-lang.c: Likewise.
2961 * c-objc-common.c: Likewise.
2962 * c-parser.c: Likewise.
2963 * c-typeck.c: Likewise.
2964
2965 2015-06-04 Marek Polacek <polacek@redhat.com>
2966
2967 PR c/66341
2968 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
2969 it is a lvalue.
2970
2971 2015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2972
2973 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
2974 Warn for empty struct.
2975 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
2976
2977 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
2978
2979 * c-decl.c (start_function): Call plugin before parsing.
2980 (finish_function): Call plugin after parsing.
2981
2982 2015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2983
2984 PR c/49551
2985 * c-decl.c (merge_decls): Merge DECL_COMMON.
2986
2987 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
2988
2989 * Make-lang.in (check_gcc_pallelize): Define.
2990
2991 2015-05-22 Marek Polacek <polacek@redhat.com>
2992
2993 PR c/47043
2994 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
2995 attributes.
2996
2997 2015-05-21 Marek Polacek <polacek@redhat.com>
2998
2999 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
3000 DECL_BUILT_IN.
3001
3002 2015-05-20 Marek Polacek <polacek@redhat.com>
3003
3004 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
3005 * c-typeck.c: Likewise.
3006
3007 2015-05-19 Marek Polacek <polacek@redhat.com>
3008
3009 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
3010
3011 2015-05-19 Jakub Jelinek <jakub@redhat.com>
3012
3013 PR middle-end/66199
3014 * c-parser.c (c_parser_omp_for_loop): Don't add
3015 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
3016 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
3017 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
3018 constructs.
3019
3020 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
3021
3022 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
3023 swaps.
3024
3025 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
3026
3027 PR fortran/44054
3028 * c-objc-common.c (c_tree_printer): Replace locus pointer with
3029 accessor function.
3030
3031 2015-05-14 Marek Polacek <polacek@redhat.com>
3032
3033 PR c/66066
3034 PR c/66127
3035 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
3036 rather than with 0.
3037
3038 2015-05-12 David Malcolm <dmalcolm@redhat.com>
3039
3040 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
3041 to add a call to warn_for_misleading_indentation.
3042 (c_parser_else_body): Likewise, adding param "else_loc".
3043 (c_parser_if_statement): Check for misleading indentation.
3044 (c_parser_while_statement): Likewise.
3045 (c_parser_for_statement): Likewise.
3046
3047 2015-05-08 Marek Polacek <polacek@redhat.com>
3048
3049 PR c/64918
3050 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
3051 (output_init_element): Likewise.
3052
3053 2015-05-07 Marek Polacek <polacek@redhat.com>
3054
3055 PR c/65179
3056 * c-typeck.c (build_binary_op): Warn when left shifting a negative
3057 value.
3058
3059 2015-04-30 Marek Polacek <polacek@redhat.com>
3060
3061 * c-typeck.c (set_init_label): Call error_at instead of error and
3062 pass LOC to it.
3063
3064 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
3065 the type of a decl.
3066
3067 * c-typeck.c (c_build_va_arg): Clarify the error message.
3068
3069 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
3070
3071 * c-parser.c (c_parser_oacc_enter_exit_data): Use
3072 OMP_STANDALONE_CLAUSES.
3073
3074 2015-04-28 Marek Polacek <polacek@redhat.com>
3075
3076 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
3077
3078 2015-04-28 Marek Polacek <polacek@redhat.com>
3079
3080 PR c/65901
3081 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
3082
3083 2015-04-25 Marek Polacek <polacek@redhat.com>
3084
3085 PR c/52085
3086 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
3087 attribute.
3088
3089 2015-04-23 Marek Polacek <polacek@redhat.com>
3090
3091 PR c/65345
3092 * c-decl.c (set_labels_context_r): New function.
3093 (store_parm_decls): Call it via walk_tree_without_duplicates.
3094 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
3095 instead of create_tmp_var. Build TARGET_EXPR instead of
3096 COMPOUND_EXPR.
3097 (build_atomic_assign): Use create_tmp_var_raw instead of
3098 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
3099
3100 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
3101
3102 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
3103 (c_parser_omp_target_update): Add missed %> to error_at ().
3104
3105 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
3106
3107 PR target/55143
3108 * c-decl.c (c_default_pointer_mode): Remove definition.
3109 * c-tree.h (c_default_pointer_mode): Remove declaration.
3110
3111 2015-03-27 Tobias Burnus <burnus@net-b.de>
3112
3113 PR c/65586
3114 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
3115 error out.
3116 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
3117 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
3118 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
3119
3120 2015-03-19 Jakub Jelinek <jakub@redhat.com>
3121
3122 * c-decl.c (c_decl_attributes): Also add "omp declare target"
3123 attribute for DECL_EXTERNAL VAR_DECLs.
3124
3125 2015-03-11 Jakub Jelinek <jakub@redhat.com>
3126
3127 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
3128 argument.
3129
3130 2015-03-10 Jakub Jelinek <jakub@redhat.com>
3131
3132 PR c/65120
3133 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
3134 before preparing arguments to warn_logical_not_parentheses.
3135
3136 2015-03-09 Jakub Jelinek <jakub@redhat.com>
3137
3138 PR c/65120
3139 * c-typeck.c (parser_build_binary_op): Don't warn for
3140 !!x == y or !b == y where b is _Bool.
3141
3142 2015-03-09 Marek Polacek <polacek@redhat.com>
3143
3144 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
3145 * c-decl.c (grokdeclarator): Likewise.
3146 * c-typeck.c (build_binary_op): Likewise.
3147
3148 2015-02-27 Marek Polacek <polacek@redhat.com>
3149
3150 PR c/65228
3151 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
3152
3153 2015-02-14 Marek Polacek <polacek@redhat.com>
3154
3155 PR c/64768
3156 * c-decl.c (grokdeclarator): Set the range of a flexible array member
3157 declared through a typedef name.
3158
3159 2015-02-13 Marek Polacek <polacek@redhat.com>
3160
3161 PR c/65050
3162 * c-decl.c (grokdeclarator): Print also the type when giving
3163 the error message about array's incomplete element type.
3164
3165 2015-02-11 Jakub Jelinek <jakub@redhat.com>
3166
3167 PR c/64824
3168 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
3169 check in the POP macro.
3170
3171 2015-02-09 Marek Polacek <polacek@redhat.com>
3172
3173 PR c/64856
3174 * c-typeck.c (process_init_element): Don't always wrap
3175 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
3176 initializing a range of elements.
3177
3178 2015-02-04 Jakub Jelinek <jakub@redhat.com>
3179
3180 PR c/64824
3181 PR c/64868
3182 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
3183
3184 2015-02-02 Bruno Loff <bruno.loff@gmail.com>
3185
3186 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
3187 processing enum declaration.
3188
3189 2015-01-29 Marek Polacek <polacek@redhat.com>
3190
3191 PR c/64709
3192 * c-typeck.c (pop_init_level): If constructor_elements has
3193 exactly one element with integer_zerop value, set constructor_zeroinit
3194 to 1. Remove braces around warning_init call.
3195
3196 2015-01-27 Jakub Jelinek <jakub@redhat.com>
3197
3198 PR c/64766
3199 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
3200 of FUNCTION_DECLs with error_mark_node.
3201
3202 2015-01-26 Jakub Jelinek <jakub@redhat.com>
3203
3204 PR c/64778
3205 * c-typeck.c (convert_arguments): Return -1 if there are
3206 error_args, even if we've diagnosed too many arguments.
3207
3208 2015-01-21 Richard Biener <rguenther@suse.de>
3209
3210 PR middle-end/64313
3211 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
3212 for builtins the user declared correctly.
3213
3214 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
3215 Bernd Schmidt <bernds@codesourcery.com>
3216 Cesar Philippidis <cesar@codesourcery.com>
3217 James Norris <jnorris@codesourcery.com>
3218 Jakub Jelinek <jakub@redhat.com>
3219 Ilmir Usmanov <i.usmanov@samsung.com>
3220
3221 * c-parser.c: Include "gomp-constants.h".
3222 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
3223 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
3224 Use OMP_CLAUSE_SET_MAP_KIND.
3225 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
3226 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
3227 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
3228 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
3229 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
3230 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
3231 "copyout", "create", "delete", "deviceptr", "gang", "host",
3232 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
3233 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
3234 "present_or_create", "pcreate", "seq", "self", "vector",
3235 "vector_length", "wait", "worker".
3236 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
3237 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
3238 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
3239 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
3240 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
3241 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
3242 (c_parser_oacc_data_clause_deviceptr)
3243 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
3244 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
3245 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
3246 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
3247 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
3248 (c_parser_oacc_parallel, c_parser_oacc_update)
3249 (c_parser_oacc_wait): New functions.
3250 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
3251 (c_finish_oacc_data): New prototypes.
3252 * c-typeck.c: Include "gomp-constants.h".
3253 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
3254 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
3255 OMP_CLAUSE_SET_MAP_KIND.
3256 (c_finish_oacc_parallel, c_finish_oacc_kernels)
3257 (c_finish_oacc_data): New functions.
3258 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
3259 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
3260 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
3261 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
3262 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
3263 GOMP_MAP_FORCE_DEVICEPTR.
3264
3265 2015-01-09 Michael Collison <michael.collison@linaro.org>
3266
3267 * c-array-notation.c: Include hash-set.h, machmode.h,
3268 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3269 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
3270 * c-aux-info.c: Ditto.
3271 * c-convert.c: Ditto.
3272 * c-decl.c: Ditto.
3273 * c-errors.c: Ditto.
3274 * c-lang.c: Dittoxs.
3275 * c-objc-common.c: Ditto.
3276 * c-parser.c: Ditto.
3277 * c-typeck.c: Include hash-set.h, machmode.h,
3278 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3279 fold-const.h, wide-int.h, inchash.h, real.h and
3280 fixed-value.h due to flattening of tree.h.
3281
3282 2015-01-07 Marek Polacek <polacek@redhat.com>
3283
3284 PR c/64417
3285 * c-typeck.c (process_init_element): Disallow initialization of
3286 a flexible array member with a string constant if the structure
3287 is in an array.
3288
3289 2015-01-05 Jakub Jelinek <jakub@redhat.com>
3290
3291 PR sanitizer/64344
3292 * c-typeck.c (convert_for_assignment, c_finish_return): For
3293 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
3294 types also set in_late_binary_op around convert call.
3295 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
3296 to integral type casts, if not in_late_binary_op, pass c_fully_fold
3297 result on expr as last argument to ubsan_instrument_float_cast,
3298 if in_late_binary_op, don't use c_save_expr but save_expr.
3299
3300 Update copyright years.
3301
3302 2015-01-05 Marek Polacek <polacek@redhat.com>
3303
3304 PR c/64423
3305 * c-typeck.c (build_array_ref): Pass loc down to
3306 warn_array_subscript_with_type_char.
3307
3308 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
3309
3310 * c-typeck.c: New behavious for pointers to arrays with qualifiers
3311 (common-pointer-type): For pointers to arrays take qualifiers from
3312 element type.
3313 (build_conditional_expr): Add warnings for lost qualifiers.
3314 (comp-target-types): Allow pointers to arrays with different qualifiers.
3315 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
3316 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
3317 to PEDWARN_FOR_QUALIFIERS.
3318
3319 2014-12-17 Jakub Jelinek <jakub@redhat.com>
3320
3321 PR sanitizer/64289
3322 * c-convert.c: Include ubsan.h.
3323 (convert): For real -> integral casts and
3324 -fsanitize=float-cast-overflow don't call convert_to_integer, but
3325 instead instrument the float cast directly.
3326
3327 2014-11-29 Jakub Jelinek <jakub@redhat.com>
3328
3329 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
3330 c_finish_stmt_expr): Remove NULL last argument from
3331 create_tmp_var_raw and create_tmp_var calls.
3332 * c-array-notation.c (fix_builtin_array_notation_fn,
3333 build_array_notation_expr, fix_conditional_array_notations_1,
3334 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
3335
3336 2014-11-28 Marek Polacek <polacek@redhat.com>
3337
3338 PR c/63862
3339 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
3340 convert the right operand to integer type.
3341
3342 2014-11-25 Marek Polacek <polacek@redhat.com>
3343
3344 PR c/63877
3345 * c-decl.c (start_function): Disable -Wmissing-declarations warning
3346 for inline functions.
3347
3348 2014-11-21 Jakub Jelinek <jakub@redhat.com>
3349
3350 PR target/63764
3351 * c-typeck.c (build_array_ref): Adjust
3352 convert_vector_to_pointer_for_subscript caller. If it returns true,
3353 call non_lvalue_loc on the result.
3354
3355 2014-11-11 Richard Biener <rguenther@suse.de>
3356
3357 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
3358 to true.
3359
3360 2014-11-10 Andi Kleen <ak@linux.intel.com>
3361
3362 PR c/60804
3363 * c-parser.c (c_parser_statement_after_labels): Call
3364 check_no_cilk.
3365 (c_parser_if_statement): Dito.
3366 (c_parser_switch_statement): Dito.
3367 (c_parser_while_statement): Dito.
3368 (c_parser_do_statement): Dito.
3369 (c_parser_for_statement): Dito.
3370 * c-typeck.c (c_finish_loop): Dito.
3371
3372 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
3373
3374 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
3375 OPT_Wshift_count_overflow in the warnings.
3376
3377 2014-10-30 Marek Polacek <polacek@redhat.com>
3378
3379 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
3380 print the stripped version as well, if they're not the same.
3381
3382 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
3383
3384 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
3385 machine_mode.
3386
3387 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
3388
3389 * c-decl.c: Adjust include files.
3390 * c-parser.c: Ditto.
3391
3392 2014-10-27 Phil Muldoon <pmuldoon@redhat.com>
3393 Tom Tromey <tromey@redhat.com>
3394
3395 * c-tree.h (enum c_oracle_request): New.
3396 (c_binding_oracle_function): New typedef.
3397 (c_binding_oracle, c_pushtag, c_bind): Declare.
3398 * c-decl.c (c_binding_oracle): New global.
3399 (I_SYMBOL_CHECKED): New macro.
3400 (i_symbol_binding): New function.
3401 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
3402 (I_TAG_CHECKED): New macro.
3403 (i_tag_binding): New function.
3404 (I_TAG_BINDING, I_TAG_DECL): Redefine.
3405 (I_LABEL_CHECKED): New macro.
3406 (i_label_binding): New function.
3407 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
3408 (c_print_identifier): Save and restore c_binding_oracle.
3409 (c_pushtag, c_bind): New functions.
3410
3411 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
3412
3413 * c-typeck.c: Adjust include files.
3414
3415 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
3416
3417 PR c++/53061
3418 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
3419 initialization here...
3420 (c_initialize_diagnostics): ... but here. Set defaults after
3421 building pretty-printer.
3422
3423 2014-10-23 Marek Polacek <polacek@redhat.com>
3424
3425 PR c/63626
3426 * c-decl.c (pop_scope): Don't print warning in external_scope.
3427
3428 2014-10-19 Marek Polacek <polacek@redhat.com>
3429
3430 PR c/63567
3431 * c-typeck.c (output_init_element): Allow initializing objects with
3432 static storage duration with compound literals even in C99 and add
3433 pedwarn for it.
3434
3435 2014-10-17 Marek Polacek <polacek@redhat.com>
3436
3437 PR c/63567
3438 * c-typeck.c (digest_init): Allow initializing objects with static
3439 storage duration with compound literals even in C99 and add pedwarn
3440 for it.
3441
3442 2014-10-17 Marek Polacek <polacek@redhat.com>
3443
3444 PR c/63543
3445 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
3446 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
3447 error multiple times. Print the type.
3448
3449 2014-10-17 Marek Polacek <polacek@redhat.com>
3450
3451 PR c/63549
3452 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
3453 type.
3454
3455 2014-10-17 Marek Polacek <polacek@redhat.com>
3456
3457 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
3458 (start_function): Use OPT_Wimplicit_int instead of 0.
3459 (store_parm_decls_oldstyle): Likewise.
3460
3461 2014-10-17 Alan Modra <amodra@gmail.com>
3462
3463 PR middle-end/61848
3464 * c-decl.c (merge_decls): Don't merge section name or tls model
3465 to newdecl symtab node, instead merge to olddecl. Override
3466 existing olddecl section name. Set tls_model for all thread-local
3467 vars, not just OMP thread-private ones. Remove incorrect comment.
3468
3469 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
3470
3471 * c-decl.c: Adjust include files.
3472
3473 2014-10-14 DJ Delorie <dj@redhat.com>
3474
3475 * c-parser.c (c_parse_init): Add RID entries for each __intN.
3476 (c_token_starts_typename): Check all __intN, not just __int128.
3477 (c_token_starts_declspecs): Likewise.
3478 (c_parser_declspecs): Likewise.
3479 (c_parser_attribute_any_word): Likewise.
3480 (c_parser_objc_selector): Likewise.
3481 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
3482 (struct c_declspecs): Add int_n_idx field to record *which* __intN
3483 is specified.
3484 * c-decl.c (declspecs_add_type): Check for all __intN, not just
3485 __int128.
3486 (finish_declspecs): Likewise.
3487
3488 2014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
3489
3490 * c-parser.c (c_parser_all_labels): New function to replace
3491 the duplicate code.
3492 (c_parser_statement): Call the new function.
3493
3494 2014-10-09 Marek Polacek <polacek@redhat.com>
3495
3496 PR c/63480
3497 * c-typeck.c (pop_init_level): Don't warn about initializing
3498 with { }.
3499
3500 2014-10-07 Marek Polacek <polacek@redhat.com>
3501
3502 PR c/59717
3503 * c-decl.c (header_for_builtin_fn): New function.
3504 (implicitly_declare): Suggest which header to include.
3505
3506 2014-10-07 Marek Polacek <polacek@redhat.com>
3507
3508 * c-convert.c (convert): Use error_operand_p.
3509 * c-typeck.c (require_complete_type): Likewise.
3510 (really_atomic_lvalue): Likewise.
3511 (digest_init): Likewise.
3512 (handle_omp_array_sections_1): Likewise.
3513
3514 2014-10-03 Marek Polacek <polacek@redhat.com>
3515
3516 PR c/63453
3517 * c-decl.c (pop_scope): Don't warn about "inline function declared
3518 but never defined" for functions marked with gnu_inline attribute.
3519
3520 2014-09-25 Jakub Jelinek <jakub@redhat.com>
3521
3522 PR c++/63249
3523 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
3524 on low_bound and length.
3525
3526 2014-09-24 Marek Polacek <polacek@redhat.com>
3527
3528 PR c/61405
3529 PR c/53874
3530 * c-parser.c: Don't define CPP_KEYWORD.
3531 (c_parser_switch_statement): Pass original type to c_finish_case.
3532 * c-tree.h (c_finish_case): Update declaration.
3533 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
3534 conditionally to c_do_switch_warnings.
3535
3536 2014-09-03 Marek Polacek <polacek@redhat.com>
3537
3538 PR c/62024
3539 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
3540 conversions.
3541
3542 2014-09-02 Jakub Jelinek <jakub@redhat.com>
3543 Balaji V. Iyer <balaji.v.iyer@intel.com>
3544 Igor Zamyatin <igor.zamyatin@intel.com>
3545
3546 * c-parser.c (c_parser_cilk_for): New function.
3547 (c_parser_cilk_grainsize): Likewise.
3548 (c_get_temp_regvar): Likewise.
3549 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
3550 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
3551 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
3552 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
3553 case.
3554
3555 2014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
3556
3557 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
3558 with using HOST_WIDE_INT without truncation to 'int'
3559
3560 2014-08-22 Marek Polacek <polacek@redhat.com>
3561
3562 PR c++/62199
3563 * c-typeck.c (parser_build_binary_op): Adjust call to
3564 warn_logical_not_parentheses.
3565
3566 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
3567
3568 PR other/62008
3569 * c-parser.c (c_parser_array_notation): Check for correct
3570 type of an array added.
3571
3572 2014-08-19 Marek Polacek <polacek@redhat.com>
3573
3574 PR c++/62153
3575 * c-typeck.c (build_binary_op): If either operand of a comparison
3576 is a boolean expression, call maybe_warn_bool_compare.
3577
3578 2014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
3579
3580 PR c/45584
3581 * c-typeck.c (build_c_cast): Do a conversion even when the
3582 TYPE_MAIN_VARIANTs are the same.
3583
3584 2014-08-19 Marek Polacek <polacek@redhat.com>
3585
3586 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
3587 pedwarn_c99 instead of pedwarn.
3588 (grokfield): Likewise.
3589 (warn_defaults_to): New function.
3590 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
3591 Unconditionally call pedwarn_c99 instead of pedwarn.
3592 (start_function): Call warn_defaults_to instead of pedwarn_c99.
3593 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
3594 check flag_isoc11 before.
3595 * c-errors.c (pedwarn_c99): Change the return type to bool.
3596 Handle -Wc99-c11-compat.
3597 * c-parser.c (disable_extension_diagnostics): Handle
3598 warn_c99_c11_compat.
3599 (restore_extension_diagnostics): Likewise.
3600 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
3601 instead of pedwarn, don't check flag_isoc11 before.
3602 (c_parser_declspecs): Likewise.
3603 (c_parser_alignas_specifier): Likewise.
3604 (c_parser_alignof_expression): Likewise.
3605 (c_parser_generic_selection): Likewise.
3606 * c-tree.h (pedwarn_c99): Update declaration.
3607 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
3608 of pedwarn_c99.
3609
3610 2014-08-19 Marek Polacek <polacek@redhat.com>
3611
3612 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
3613 to pedwarn_c90.
3614 * c-errors.c: Include "opts.h".
3615 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
3616 * c-parser.c (disable_extension_diagnostics): Handle negative value
3617 of warn_c90_c99_compat, too.
3618 (restore_extension_diagnostics): Likewise.
3619 (c_parser_compound_statement_nostart): Pass
3620 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
3621
3622 2014-08-12 Marek Polacek <polacek@redhat.com>
3623
3624 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
3625 Add pedwarn.
3626 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
3627 Likewise.
3628 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
3629
3630 2014-08-10 Marek Polacek <polacek@redhat.com>
3631
3632 PR c/51849
3633 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
3634 Call pedwarn_c90 instead of pedwarn.
3635 (check_bitfield_type_and_width): Likewise.
3636 (declspecs_add_qual): Likewise.
3637 (declspecs_add_type): Likewise.
3638 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
3639 Adjust to only call pedwarn_c90.
3640 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
3641 pedwarn_c90 instead of pedwarn.
3642 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
3643 * c-parser.c (disable_extension_diagnostics): Handle
3644 warn_c90_c99_compat.
3645 (restore_extension_diagnostics): Likewise.
3646 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
3647 pedwarn_c90 instead of pedwarn.
3648 (c_parser_initelt): Likewise.
3649 (c_parser_postfix_expression): Likewise.
3650 (c_parser_postfix_expression_after_paren_type): Likewise.
3651 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
3652 * c-tree.h: Fix formatting.
3653 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
3654 pedwarn_c90 instead of pedwarn.
3655
3656 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
3657
3658 * c-typeck.c: Remove include of pointer-set.h.
3659
3660 2014-08-07 Marek Polacek <polacek@redhat.com>
3661
3662 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
3663
3664 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
3665
3666 * c-typeck.c: Use hash_map instead of pointer_map.
3667
3668 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
3669
3670 * c-decl.c: Use hash_set instead of pointer_set.
3671
3672 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
3673
3674 PR middle-end/61455
3675 * c-array-notation.c (expand_array_notations): Handling
3676 of DECL_EXPR added.
3677
3678 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
3679
3680 PR c++/60517
3681 * c-typeck.c (c_finish_return): Return 0 instead of the address of
3682 a local variable.
3683
3684 2014-07-30 Tom Tromey <tromey@redhat.com>
3685
3686 * c-typeck.c (struct constructor_stack) <designator_depth>: New
3687 field.
3688 (really_start_incremental_init, push_init_level): Initialize
3689 designator_depth.
3690 (pop_init_level): Set global designator_depth.
3691 (process_init_element): Check for designated_init attribute.
3692
3693 2014-07-20 Marek Polacek <polacek@redhat.com>
3694
3695 PR c/61852
3696 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
3697 (implicitly_declare): Pass location to implicit_decl_warning.
3698
3699 2014-07-14 Jakub Jelinek <jakub@redhat.com>
3700
3701 PR middle-end/61294
3702 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
3703 If non-NULL, call c_parser_check_literal_zero.
3704 (c_parser_check_literal_zero): New function.
3705 (c_parser_postfix_expression_after_primary): Adjust
3706 c_parser_expr_list caller, handle -Wmemset-transposed-args.
3707
3708 2014-07-06 Marek Polacek <polacek@redhat.com>
3709
3710 PR c/6940
3711 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
3712 * c-tree.h (C_ARRAY_PARAMETER): Define.
3713 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
3714 function parameter.
3715
3716 2014-07-02 Jan Hubicka <hubicka@ucw.cz>
3717 Chen Gang <gang.chen.5i5j@gmail.com>
3718
3719 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
3720 releasing symbol.
3721
3722 2014-07-01 Marek Polacek <polacek@redhat.com>
3723
3724 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
3725 instead of 0 to WARN_FOR_ASSIGNMENT.
3726
3727 2014-07-01 Marek Polacek <polacek@redhat.com>
3728
3729 PR c/58286
3730 * c-typeck.c (convert_for_assignment): Pass
3731 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
3732
3733 2014-06-30 Marek Polacek <polacek@redhat.com>
3734
3735 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
3736 has no_sanitize_undefined attribute.
3737
3738 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
3739
3740 PR middle-end/57541
3741 * c-array-notation.c (fix_builtin_array_notation_fn):
3742 Check for 0 arguments in builtin call. Check that bultin argument is
3743 correct.
3744 * c-parser.c (c_parser_array_notation): Check for incorrect initial
3745 index.
3746
3747 2014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
3748
3749 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
3750 qualifiers in __auto_type for atomic types.
3751 (c_parser_typeof_specifier): Discard all type qualifiers in
3752 __typeof__ for atomic types.
3753
3754 2014-06-25 Marek Polacek <polacek@redhat.com>
3755
3756 PR c/61162
3757 * c-parser.c (c_parser_statement_after_labels): Pass the location of
3758 the return expression to c_finish_return.
3759
3760 2014-06-25 Jakub Jelinek <jakub@redhat.com>
3761
3762 * c-typeck.c (c_finish_omp_clauses): Make sure
3763 OMP_CLAUSE_LINEAR_STEP has correct type.
3764
3765 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
3766
3767 * c-decl.c: Adjust.
3768
3769 2014-06-24 Jakub Jelinek <jakub@redhat.com>
3770
3771 * c-parser.c (c_parser_omp_for_loop): For
3772 #pragma omp parallel for simd move lastprivate clause from parallel
3773 to for rather than simd.
3774
3775 2014-06-23 Marek Polacek <polacek@redhat.com>
3776
3777 * c-typeck.c (parser_build_binary_op): Don't call
3778 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
3779
3780 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
3781
3782 * c-parser.c (c_parser_omp_threadprivate): Likewise.
3783 * c-decl.c (merge_decls): Likewise.
3784
3785 2014-06-09 Marek Polacek <polacek@redhat.com>
3786
3787 PR c/36446
3788 * c-typeck.c (error_init): Call inform instead of error_at.
3789 (pedwarn_init): Call inform instead of pedwarn.
3790 (warning_init): Call inform instead of warning_at.
3791
3792 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
3793
3794 * c-decl.c (merge_decls): Use set_decl_section_name.
3795 (duplicate_decls): Remove node if it exists.
3796
3797 2014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
3798
3799 PR c/53119
3800 * c-typeck.c (push_init_level, process_init_element,
3801 pop_init_level): Correct check for zero initialization, move
3802 missing brace warning to respect zero initialization.
3803
3804 2014-06-05 Marek Polacek <polacek@redhat.com>
3805
3806 PR c/56724
3807 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
3808
3809 2014-06-05 Marek Polacek <polacek@redhat.com>
3810
3811 PR c/49706
3812 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
3813 on the left hand side operand of a comparison.
3814
3815 2014-06-05 Marek Polacek <polacek@redhat.com>
3816
3817 PR c/48062
3818 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
3819 Print note only if the warning was printed.
3820
3821 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
3822
3823 PR c/58942
3824 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
3825 with a pointer.
3826
3827 2014-06-03 Marek Polacek <polacek@redhat.com>
3828
3829 PR c/60439
3830 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
3831 c_start_case.
3832 * c-tree.h (c_start_case): Update.
3833 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
3834 switch condition has boolean value.
3835
3836 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
3837
3838 * c-decl.c: Include builtins.h.
3839 * c-parser.c: Likewise.
3840
3841 2014-05-27 Marek Polacek <polacek@redhat.com>
3842
3843 PR c/56724
3844 * c-typeck.c (convert_arguments): Get location of a parameter. Change
3845 error and warning calls to error_at and warning_at. Pass location of
3846 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
3847 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
3848 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
3849
3850 2014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
3851
3852 PR c/61191
3853 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
3854 function parameters.
3855
3856 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
3857
3858 * c-decl.c (merge_decls): Preserve symtab node pointers.
3859 (duplicate_decls): Free new decl.
3860
3861 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
3862
3863 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
3864 initialization.
3865
3866 * c-parser.c (c_parser_omp_target): Return bool values.
3867
3868 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
3869
3870 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
3871 num_teams_loc variable to num_thread_limit_loc.
3872
3873 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
3874
3875 * c-array-notation.c (expand_array_notations): Use void_node
3876 instead of void_zero_node.
3877
3878 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
3879
3880 * c-decl.c (finish_struct): Adjust.
3881 (finish_enum): Likewise.
3882 (bind): Adjust.
3883 (record_inline_static): Likewise.
3884 (push_scope): Likewise.
3885 (make_label): Likewise.
3886 (lookup_label_for_goto): Likewise.
3887 (finish_struct): Likewise.
3888 (finish_enum): Likewise.
3889 (store_parm_decls): Likewise.
3890 (c_push_function_context): Likewise.
3891 * c-lang.h: Remove usage of variable_size gty attribute.
3892 * c-parser.c (c_parse_init): Adjust.
3893 (c_parse_file): Likewise.
3894
3895 2014-05-13 Marek Polacek <polacek@redhat.com>
3896
3897 PR c/61162
3898 * c-typeck.c (convert_for_assignment): Pass location to
3899 WARN_FOR_ASSIGNMENT instead of input_location.
3900
3901 2014-05-10 Marek Polacek <polacek@redhat.com>
3902
3903 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
3904 maybe_warn_string_init.
3905 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
3906 maybe_warn_string_init.
3907 * c-tree.h (maybe_warn_string_init): Update declaration.
3908 * c-typeck.c (maybe_warn_string_init): Add location parameter.
3909 Call pedwarn_init with loc instead of with input_location.
3910 (digest_init): Pass init_loc to maybe_warn_string_init.
3911 (pop_init_level): Call pedwarn_init with loc instead of with
3912 input_location.
3913 (set_init_index): Likewise.
3914 (process_init_element): Likewise.
3915
3916 2014-05-09 Marek Polacek <polacek@redhat.com>
3917
3918 PR c/61096
3919 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
3920 (c_parser_initelt): Pass location to set_init_label. Pass array index
3921 location to set_init_index.
3922 * c-tree.h (push_init_level): Update declaration.
3923 (pop_init_level): Likewise.
3924 (set_init_index): Likewise.
3925 (set_init_label): Likewise.
3926 * c-typeck.c (error_init): Add location parameter. Call error_at
3927 instead of error.
3928 (digest_init): Pass init_loc to error_init.
3929 (really_start_incremental_init):
3930 (push_init_level): Add location parameter. Pass loc to pop_init_level
3931 and error_init.
3932 (pop_init_level): Likewise.
3933 (set_designator): Add location parameter. Pass loc to pop_init_level,
3934 push_init_level, and error_init.
3935 (set_init_index): Add location parameter. Pass loc to error_init and
3936 set_designator.
3937 (set_init_label): Likewise.
3938 (output_init_element): Pass loc to error_init.
3939 (process_init_element): Pass loc to error_init, pop_init_level,
3940 pedwarn_init, and push_init_level.
3941
3942 2014-05-09 Marek Polacek <polacek@redhat.com>
3943
3944 PR c/50459
3945 * c-parser.c (c_parser_attributes): Parse the arguments as an
3946 expression-list if the attribute takes identifier.
3947
3948 2014-05-08 Marek Polacek <polacek@redhat.com>
3949
3950 PR c/61053
3951 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
3952 TYPE_ALIGN_UNIT.
3953
3954 2014-05-08 Marek Polacek <polacek@redhat.com>
3955
3956 PR c/61077
3957 * c-decl.c (start_function): Warn for _Atomic-qualified return type
3958 of main.
3959
3960 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
3961 Mike Stump <mikestump@comcast.net>
3962 Richard Sandiford <rdsandiford@googlemail.com>
3963
3964 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
3965 (finish_enum): Use wide-int interfaces.
3966 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
3967 * c-typeck.c (build_c_cast): Likewise.
3968 (set_nonincremental_init_from_string): Likewise.
3969 (c_tree_equal): Likewise.
3970
3971 2014-05-02 Marek Polacek <polacek@redhat.com>
3972
3973 PR c/25801
3974 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
3975 Return size_one_node when the type is not complete.
3976 (pointer_diff): Remove comment.
3977 (build_unary_op): Improve error messages.
3978
3979 2014-05-02 Marek Polacek <polacek@redhat.com>
3980
3981 * c-typeck.c (c_finish_return): Separate warning_at calls.
3982
3983 2014-05-02 Marek Polacek <polacek@redhat.com>
3984
3985 * c-tree.h (error_init): Remove declaration.
3986 (pedwarn_init): Likewise.
3987 * c-typeck.c (error_init): Make static and move above.
3988 (pedwarn_init): Likewise.
3989 (warning_init): Move above.
3990 (maybe_warn_string_init): Likewise.
3991
3992 2014-05-01 Jeff Law <law@redhat.com>
3993
3994 Revert:
3995
3996 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3997 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
3998 avoid goto.
3999
4000 2014-05-02 Marek Polacek <polacek@redhat.com>
4001
4002 PR c/60784
4003 * c-typeck.c (push_init_level): Set constructor_designated to
4004 p->designated for structures.
4005
4006 2014-05-01 Marek Polacek <polacek@redhat.com>
4007
4008 PR c/60915
4009 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
4010 function-definition has an attribute after the declarator.
4011
4012 2014-05-01 Marek Polacek <polacek@redhat.com>
4013
4014 PR c/60257
4015 * c-typeck.c (warning_init): Add location_t parameter. Call
4016 warning_at instead of warning.
4017 (push_init_level): Pass input_location to warning_init.
4018 (add_pending_init): Add location_t parameter. Pass loc to
4019 warning_init.
4020 (set_nonincremental_init): Pass input_location to add_pending_init.
4021 (set_nonincremental_init_from_string): Likewise.
4022 (output_init_element): Pass loc to warning_init and to
4023 add_pending_init.
4024
4025 2014-05-01 Marek Polacek <polacek@redhat.com>
4026
4027 PR c/43395
4028 * c-typeck.c (c_finish_return): Distinguish between label and variable
4029 when warning about returning local address.
4030
4031 2014-05-01 Marek Polacek <polacek@redhat.com>
4032
4033 PR c/29467
4034 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
4035 in C89 mode.
4036
4037 2014-05-01 Marek Polacek <polacek@redhat.com>
4038
4039 PR c/43245
4040 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
4041 instead of 0 to WARN_FOR_QUALIFIERS.
4042
4043 2014-05-01 Marek Polacek <polacek@redhat.com>
4044
4045 PR c/56989
4046 * c-typeck.c (default_conversion): Use better location for
4047 error call.
4048
4049 2014-04-30 Marek Polacek <polacek@redhat.com>
4050
4051 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
4052 also when SANITIZE_FLOAT_DIVIDE is on.
4053
4054 2014-04-30 Marek Polacek <polacek@redhat.com>
4055
4056 PR c/60139
4057 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
4058 and pedwarn_init. Use loc insted of input_location.
4059
4060 2014-04-30 Marek Polacek <polacek@redhat.com>
4061
4062 PR c/60351
4063 * c-typeck.c (build_binary_op): Use location when warning about
4064 shift count.
4065
4066 2014-04-25 Marek Polacek <polacek@redhat.com>
4067
4068 PR c/18079
4069 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
4070 always_inline/noinline and hot/cold attributes.
4071
4072 2014-04-25 Marek Polacek <polacek@redhat.com>
4073
4074 PR c/60114
4075 * c-parser.c (c_parser_initelt): Pass input_location to
4076 process_init_element.
4077 (c_parser_initval): Pass loc to process_init_element.
4078 * c-tree.h (process_init_element): Adjust declaration.
4079 * c-typeck.c (push_init_level): Pass input_location to
4080 process_init_element.
4081 (pop_init_level): Likewise.
4082 (set_designator): Likewise.
4083 (output_init_element): Add location_t parameter. Pass loc to
4084 digest_init.
4085 (output_pending_init_elements): Pass input_location to
4086 output_init_element.
4087 (process_init_element): Add location_t parameter. Pass loc to
4088 output_init_element.
4089
4090 2014-04-24 Jakub Jelinek <jakub@redhat.com>
4091
4092 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
4093 atomic-clause, allow comma in between atomic-clause and
4094 seq_cst.
4095
4096 2014-04-22 Jakub Jelinek <jakub@redhat.com>
4097
4098 PR c/59073
4099 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
4100 fails, don't set OM_PARALLEL_COMBINED and return NULL.
4101
4102 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
4103
4104 PR middle-end/60469
4105 * c-array-notation.c (fix_builtin_array_notation_fn): Use
4106 create_tmp_var instead build_decl for creating temps.
4107 (build_array_notation_expr): Likewise.
4108 (fix_conditional_array_notations_1): Likewise.
4109 (fix_array_notation_expr): Likewise.
4110 (fix_array_notation_call_expr): Likewise.
4111
4112 2014-03-28 Jakub Jelinek <jakub@redhat.com>
4113
4114 PR c++/60689
4115 * c-tree.h (c_build_function_call_vec): New prototype.
4116 * c-typeck.c (build_function_call_vec): Don't call
4117 resolve_overloaded_builtin here.
4118 (c_build_function_call_vec): New wrapper function around
4119 build_function_call_vec. Call resolve_overloaded_builtin here.
4120 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
4121 Call c_build_function_call_vec instead of build_function_call_vec.
4122 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
4123 * c-decl.c (finish_decl): Likewise.
4124
4125 2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4126
4127 PR c/55383
4128 * c-typeck.c: Use correct format string in cast-qual warning
4129
4130 2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
4131
4132 * c-decl.c (c_decl_attributes): Use
4133 lang_hooks.types.omp_mappable_type.
4134 * c-typeck.c (c_finish_omp_clauses): Likewise.
4135
4136 2014-03-06 Marek Polacek <polacek@redhat.com>
4137
4138 PR c/60197
4139 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
4140 of checking tree code.
4141
4142 2014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4143
4144 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
4145 (c_parser_parameter_declaration): Likewise.
4146
4147 2014-02-19 Marek Polacek <polacek@redhat.com>
4148
4149 PR c/60195
4150 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
4151 Call mark_exp_read on exp.value.
4152 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
4153 TREE_ADDRESSABLE on old instead of val.
4154 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
4155
4156 2014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4157
4158 * c-parser.c (c_parser_get_builtin_args): Replace calls to
4159 C_EXPR_APPEND by vec_safe_push.
4160 * c-tree.h (C_EXPR_APPEND): Remove.
4161
4162 2014-01-31 Marek Polacek <polacek@redhat.com>
4163
4164 PR c/59963
4165 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
4166 build_function_call_vec.
4167 (build_function_call): Likewise.
4168 (build_atomic_assign): Likewise.
4169 (build_function_call_vec): Add arg_loc parameter. Use it.
4170 (convert_arguments): Likewise.
4171 (convert_for_assignment): Rename rhs_loc to expr_loc.
4172 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
4173 (c_parser_objc_keywordexpr): Likewise.
4174 (c_parser_postfix_expression_after_primary): Call
4175 build_function_call_vec with expr_loc rather than op_loc.
4176 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
4177 build_function_call_vec.
4178 (c_parser_expr_list): Add locations parameter. Fill it with locations
4179 of function arguments.
4180 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
4181
4182 2014-01-30 Marek Polacek <polacek@redhat.com>
4183
4184 PR c/59940
4185 * c-typeck.c (build_function_call_vec): Use loc parameter.
4186 (convert_arguments): Add location parameter. Use it.
4187 (ep_convert_and_check): Likewise.
4188 (build_atomic_assign): Adjust convert_for_assignment call.
4189 (build_modify_expr): Likewise.
4190 (digest_init): Likewise.
4191 (c_finish_return): Likewise.
4192 (build_conditional_expr): Adjust ep_convert_and_check calls.
4193 (convert_for_assignment): Add rhs_loc parameter. Use it.
4194 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
4195 calls.
4196
4197 2014-01-30 Richard Biener <rguenther@suse.de>
4198
4199 PR c/59905
4200 * c-typeck.c (build_function_call_vec): Do not replace calls
4201 to a function via an incompatible type with a runtime abort.
4202
4203 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
4204
4205 * c-parser.c (c_parser_declaration_or_fndef): Replaced
4206 flag_enable_cilkplus with flag_cilkplus.
4207 (c_parser_direct_declarator_inner): Likewise.
4208 (c_parser_attribute_any_word): Likewise.
4209 (c_parser_attributes): Likewise.
4210 (c_parser_compound_statement): Likewise.
4211 (c_parser_statement_after_labels): Likewise.
4212 (c_parser_if_statement): Likewise.
4213 (c_parser_switch_statement): Likewise.
4214 (c_parser_do_statement): Likewise.
4215 (c_parser_for_statement): Likewise.
4216 (c_parser_unary_expression): Likewise.
4217 (c_parser_postfix_expression): Likewise.
4218 (c_parser_postfix_expression_after_primary): Likewise.
4219 (c_parser_postfix_expression_after_primary): Likewise.
4220 (c_parser_omp_clause_name): Likewise.
4221 (c_finish_omp_declare_simd): Likewise.
4222 (c_parser_cilk_verify_simd): Likewise.
4223 * c-typeck.c (build_array_ref): Likewise.
4224 (build_function_call_vec): Likewise.
4225 (convert_arguments): Likewise.
4226 (build_compound_expr): Likewise.
4227 (c_finish_return): Likewise.
4228 (c_finish_if_stmt): Likewise.
4229 (c_finish_loop): Likewise.
4230 (build_binary_op): Likewise.
4231
4232 2014-01-23 Marek Polacek <polacek@redhat.com>
4233
4234 PR c/59846
4235 * c-typeck.c (parser_build_binary_op): Use location instead of
4236 input_location.
4237 (build_binary_op): Pass location to shorten_compare.
4238
4239 2014-01-23 Marek Polacek <polacek@redhat.com>
4240
4241 PR c/58346
4242 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
4243 an empty aggregate.
4244
4245 2014-01-23 Marek Polacek <polacek@redhat.com>
4246
4247 PR c/59871
4248 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
4249 of a comma expression.
4250 (emit_side_effect_warnings): Likewise.
4251
4252 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
4253
4254 PR c/59825
4255 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
4256 function to use walk_tree and moved a lot of its functionality to
4257 expand_array_notations.
4258 (expand_array_notations): New function.
4259
4260 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
4261
4262 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
4263 attribute an attribute without value.
4264
4265 2014-01-23 Jakub Jelinek <jakub@redhat.com>
4266
4267 PR middle-end/58809
4268 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
4269 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
4270
4271 2014-01-22 Marek Polacek <polacek@redhat.com>
4272
4273 PR c/59891
4274 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
4275 of remove_c_maybe_const_expr on op1 and op2.
4276
4277 2014-01-15 Jakub Jelinek <jakub@redhat.com>
4278
4279 PR c/58943
4280 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
4281 effects, preevaluate rhs using SAVE_EXPR first.
4282
4283 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
4284
4285 PR c++/59631
4286 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
4287 statements with if-elseif statements.
4288
4289 2014-01-06 Marek Polacek <polacek@redhat.com>
4290
4291 PR c/57773
4292 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
4293 defined bit-field types only in ISO C.
4294
4295 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
4296
4297 Update copyright years
4298
4299 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
4300
4301 * c-array-notation.c: Use the standard form for the copyright notice.
4302
4303 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
4304
4305 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
4306 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
4307 field in parser is not empty. If not-empty, call the function
4308 c_parser_finish_omp_declare_simd.
4309 (c_parser_cilk_clause_vectorlength): Modified function to be shared
4310 between SIMD-enabled functions and #pragma simd. Added new parameter.
4311 (c_parser_cilk_all_clauses): Modified the usage of the function
4312 c_parser_cilk_clause_vectorlength as mentioned above.
4313 (c_parser_cilk_simd_fn_vector_attrs): New function.
4314 (c_finish_cilk_simd_fn_tokens): Likewise.
4315 (is_cilkplus_vector_p): Likewise.
4316 (c_parser_omp_clause_name): Added checking for "vectorlength,"
4317 "nomask," and "mask" strings in clause name.
4318 (c_parser_omp_all_clauses): Added 3 new case statements:
4319 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
4320 PRAGMA_CILK_CLAUSE_NOMASK.
4321 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
4322 check for vector attribute and if so call the function
4323 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
4324 called the function c_finish_cilk_simd_fn_tokens.
4325 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
4326 parser field is non-empty. If so, parse them as you would parse
4327 the omp declare simd pragma.
4328 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
4329 Added a check when step is a parameter and flag it as error.
4330 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
4331 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
4332 pragma_omp_clause.
4333
4334 2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
4335
4336 * c-parser.c (c_parser_omp_parallel): Fix description.
4337
4338 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
4339
4340 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
4341 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
4342 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
4343 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
4344
4345 2013-12-04 Joseph Myers <joseph@codesourcery.com>
4346
4347 PR c/52023
4348 * c-parser.c (c_parser_alignas_specifier): Use
4349 c_sizeof_or_alignof_type instead of c_alignof.
4350 (c_parser_alignof_expression): Likewise, with min_alignof
4351 parameter depending on alignof spelling used.
4352
4353 2013-12-04 Marek Polacek <polacek@redhat.com>
4354
4355 PR c/54113
4356 * c-decl.c (start_function): Don't warn for missing prototype for
4357 inline functions.
4358
4359 2013-12-03 Marek Polacek <polacek@redhat.com>
4360
4361 PR c/59351
4362 * c-decl.c (build_compound_literal): Allow compound literals with
4363 empty initial value.
4364
4365 2013-12-02 Joseph Myers <joseph@codesourcery.com>
4366
4367 PR c/58235
4368 * c-typeck.c (build_modify_expr): Diagnose assignment to
4369 expression with array type.
4370
4371 2013-11-29 Joseph Myers <joseph@codesourcery.com>
4372
4373 PR c/42262
4374 * c-typeck.c (process_init_element): Do not treat a string as
4375 initializing a whole array when used with a designator for an
4376 individual element.
4377
4378 2013-11-29 Joseph Myers <joseph@codesourcery.com>
4379
4380 PR c/57574
4381 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
4382 an inline function following a static declaration.
4383
4384 2013-11-28 Jakub Jelinek <jakub@redhat.com>
4385
4386 PR c/59310
4387 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
4388 to p_name before calling c_parser_omp_teams instead of after.
4389 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
4390 argument. Remove unused p_name variable.
4391
4392 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
4393 Jakub Jelinek <jakub@redhat.com>
4394
4395 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
4396 external_scope is NULL.
4397
4398 2013-11-27 Tom de Vries <tom@codesourcery.com>
4399 Marc Glisse <marc.glisse@inria.fr>
4400
4401 PR c++/59032
4402 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
4403
4404 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
4405
4406 * c-typeck.c: Add required include files from gimple.h.
4407
4408 2013-11-22 David Malcolm <dmalcolm@redhat.com>
4409
4410 * c-decl.c (define_label, shadow_tag_warned)
4411 (check_bitfield_type_and_width, grokdeclarator, grokparms,
4412 store_parm_decls_newstyle, store_parm_decls_oldstyle)
4413 (declspecs_add_type): Remove use of in_system_header macro.
4414 * c-parser.c (c_parser_unary_expression): Likewise.
4415 * c-typeck.c (store_init_value, process_init_element)
4416 (c_start_case): Likewise.
4417
4418 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
4419 macro.
4420
4421 * c-parser.c (c_parser_set_source_position_from_token): Remove
4422 reference to in_system_header from comment.
4423
4424 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4425
4426 * c-decl.c (grokdeclarator): Update comment to refer to
4427 tree_to_[su]hwi rather than tree_low_cst.
4428
4429 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4430
4431 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
4432 tree_to_uhwi throughout.
4433
4434 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4435
4436 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
4437 throughout.
4438
4439 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4440
4441 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
4442 throughout.
4443
4444 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
4445
4446 * c-parser.c (c_parser_cilk_simd): New.
4447 (c_parser_cilk_verify_simd): New.
4448 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
4449 (c_parser_omp_for_loop): Add case for NE_EXPR.
4450 Set c_break_label for CILK_SIMD.
4451 (c_parser_cilk_clause_vectorlength): New.
4452 (c_parser_cilk_clause_linear): New.
4453 (c_parser_cilk_clause_name): New.
4454 (c_parser_cilk_all_clauses): New.
4455 * c-typeck.c (build_unary_op): Pass location argument to
4456 readonly_error.
4457 (build_modify_expr): Same.
4458 (build_asm_expr): Same.
4459 (c_finish_bc_stmt): Error on break/continue in loops.
4460
4461 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
4462
4463 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
4464
4465 2013-11-14 Diego Novillo <dnovillo@google.com>
4466
4467 * c-decl.c: Include print-tree.h.
4468 Include stor-layout.h.
4469 Include varasm.h.
4470 Include attribs.h.
4471 Include stringpool.h.
4472 * c-lang.c: Include fold-const.h.
4473 * c-parser.c: Include stringpool.h.
4474 Include attribs.h.
4475 Include stor-layout.h.
4476 Include varasm.h.
4477 Include trans-mem.h.
4478 * c-typeck.c: Include stor-layout.h.
4479 Include trans-mem.h.
4480 Include varasm.h.
4481 Include stmt.h.
4482
4483 2013-11-13 Joseph Myers <joseph@codesourcery.com>
4484
4485 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
4486 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
4487 __auto_type.
4488 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
4489 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
4490 RID_AUTO_TYPE.
4491 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
4492 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
4493 (c_parser_declarator, c_parser_direct_declarator_inner)
4494 (c_parser_parameter_declaration, c_parser_type_name): All callers
4495 changed.
4496 (c_parser_declaration_or_fndef): Handle declarations with type
4497 determined from the initializer.
4498
4499 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
4500
4501 * c-typeck.c: Include gimplify.h.
4502
4503 2013-11-12 Joseph Myers <joseph@codesourcery.com>
4504
4505 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
4506 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
4507 comment.
4508 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
4509 or _Thread_local as appropriate in diagnostics.
4510 (build_null_declspecs): Initialize ret->thread_gnu_p.
4511 (declspecs_add_scspec): Handle either __thread or _Thread_local
4512 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
4513 pedantic. Do not disallow _Thread_local extern and _Thread_local
4514 static.
4515
4516 2013-11-07 Joseph Myers <joseph@codesourcery.com>
4517 Andrew MacLeod <amacleod@redhat.com>
4518
4519 * c-aux-info.c (gen_type): Handle atomic qualifier.
4520 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
4521 qualifiers when compating types.
4522 (shadow_tag_warned): Handle atomic_p in declspecs.
4523 (quals_from_declspecs): Likewise.
4524 (start_decl): Use c_type_promotes_to when promoting argument
4525 types.
4526 (grokdeclarator): Handle _Atomic.
4527 (get_parm_info): Diagnose any qualifier on "void" as only
4528 parameter.
4529 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
4530 comparing types. Use c_type_promotes_to when promoting argument
4531 types.
4532 (finish_function): Use c_type_promotes_to when promoting argument
4533 types.
4534 (build_null_declspecs): Handle atomic_p in declspecs.
4535 (declspecs_add_qual): Handle RID_ATOMIC.
4536 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
4537 (c_token_starts_declspecs): Handle RID_ATOMIC.
4538 (c_parser_declspecs): Handle atomic type specifiers and
4539 qualifiers.
4540 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
4541 from types of expressions with atomic type.
4542 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
4543 (c_parser_attribute_any_word): Handle RID_ATOMIC.
4544 (c_parser_initializer, c_parser_initelt, c_parser_initval)
4545 (c_parser_statement_after_labels, c_parser_switch_statement)
4546 (c_parser_for_statement, c_parser_expr_no_commas)
4547 (c_parser_conditional_expression, c_parser_binary_expression)
4548 (c_parser_cast_expression, c_parser_unary_expression)
4549 (c_parser_postfix_expression)
4550 (c_parser_postfix_expression_after_primary, c_parser_expression):
4551 Use convert_lvalue_to_rvalue.
4552 (c_parser_expression_conv, c_parser_expr_list): Document
4553 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
4554 (c_parser_objc_synchronized_statement): Use
4555 convert_lvalue_to_rvalue.
4556 (c_parser_objc_selector): Handle RID_ATOMIC.
4557 (c_parser_objc_receiver, c_parser_array_notation): Use
4558 convert_lvalue_to_rvalue.
4559 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
4560 _Atomic (type-name).
4561 (struct c_declspecs): Add atomic_p field.
4562 (convert_lvalue_to_rvalue): Declare.
4563 * c-typeck.c (c_type_promotes_to): Promote atomic types to
4564 corresponding atomic types.
4565 (qualify_type): Don't add _Atomic qualifiers from second argument.
4566 (comp_target_types): Do not allow _Atomic mismatches.
4567 (type_lists_compatible_p): Do not remove atomic qualifiers when
4568 comparing types.
4569 (really_atomic_lvalue, convert_lvalue_to_rvalue)
4570 (build_atomic_assign): New functions.
4571 (build_unary_op): Use build_atomic_assign for atomic increment and
4572 decrement.
4573 (build_conditional_expr): Do not treat _Atomic void as a qualified
4574 version of void.
4575 (build_modify_expr): Use build_atomic_assign for atomic LHS.
4576 (find_anonymous_field_with_type, convert_to_anonymous_field)
4577 (convert_for_assignment): Do not remove atomic qualifiers when
4578 comparing types.
4579 (digest_init): Do not accept initialization of arrays of atomic
4580 elements by string constants.
4581 (build_asm_expr): Use convert_lvalue_to_rvalue.
4582 (build_binary_op): Do not treat _Atomic void as a qualified
4583 version of void.
4584
4585 2013-11-06 DJ Delorie <dj@redhat.com>
4586
4587 * c-decl.c (locate_old_decl): If a previous conflicting decl is
4588 both explicit and builtin, print the location of the explicit one.
4589
4590 2013-11-05 Tobias Burnus <burnus@net-b.de>
4591
4592 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
4593 c_parser_omp_distribute, c_parser_omp_teams,
4594 c_parser_omp_target, c_parser_omp_declare): Handle
4595 -fopenmp-simd.
4596
4597 2013-11-03 Marek Polacek <polacek@redhat.com>
4598
4599 * c-decl.c (grokdeclarator): Add VLA instrumentation.
4600
4601 2013-11-01 Jakub Jelinek <jakub@redhat.com>
4602
4603 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
4604 check_dup_generic at the end, unless remove is true.
4605 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
4606 remove = true;.
4607 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
4608
4609 2013-10-31 Jakub Jelinek <jakub@redhat.com>
4610
4611 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
4612 with decl that is not pointer nor array.
4613
4614 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
4615
4616 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
4617 a spawning function is found.
4618 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
4619 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
4620 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
4621 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
4622 case.
4623 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
4624 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
4625 expr.
4626 (c_finish_return): Added a check to reject _Cilk_spawn in return
4627 expression.
4628 (build_cilk_spawn): New function.
4629 (build_cilk_sync): Likewise.
4630 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
4631
4632 2013-10-27 Tobias Burnus <burnus@net-b.de>
4633
4634 PR other/33426
4635 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
4636 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
4637 (c_parser_statement_after_labels): Update calls.
4638
4639 2013-10-24 Tobias Burnus <burnus@net-b.de>
4640
4641 PR other/33426
4642 * c-parser.c (c_parser_pragma, c_parser_for_statement):
4643 Handle PRAGMA_IVDEP.
4644 (c_parser_statement_after_labels): Update call.
4645
4646 2013-10-24 Marek Polacek <polacek@redhat.com>
4647
4648 * c-parser.c (c_parser_struct_declaration): Add a comment.
4649 (c_parser_declarator): Don't allow _Alignas here.
4650
4651 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
4652
4653 * c-parser.c: Include omp-low.h.
4654 * c-typeck.c: Likewise.
4655
4656 2013-10-17 Marek Polacek <polacek@redhat.com>
4657
4658 PR c/58267
4659 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
4660 Document syntax of the array-declarator.
4661 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
4662 are not permitted.
4663 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
4664 (c_parser_struct_declaration): Likewise.
4665 (c_parser_declarator): Likewise.
4666 (c_parser_direct_declarator_inner): Likewise.
4667 (c_parser_parameter_declaration): Likewise.
4668 (c_parser_type_name): Likewise.
4669
4670 2013-10-11 Jakub Jelinek <jakub@redhat.com>
4671
4672 * c-lang.h (current_omp_declare_target_attribute): New extern
4673 decl.
4674 * c-parser.c: Include c-lang.h.
4675 (struct c_parser): Change tokens to c_token *.
4676 Add tokens_buf field. Change tokens_avail type to unsigned int.
4677 (c_parser_consume_token): If parser->tokens isn't
4678 &parser->tokens_buf[0], increment parser->tokens.
4679 (c_parser_consume_pragma): Likewise.
4680 (enum pragma_context): Add pragma_struct and pragma_param.
4681 (c_parser_external_declaration): Adjust
4682 c_parser_declaration_or_fndef caller.
4683 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
4684 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
4685 Adjust recursive call.
4686 (c_parser_struct_or_union_specifier): Use pragma_struct instead
4687 of pragma_external.
4688 (c_parser_parameter_declaration): Use pragma_param instead of
4689 pragma_external.
4690 (c_parser_compound_statement_nostart, c_parser_label,
4691 c_parser_for_statement): Adjust
4692 c_parser_declaration_or_fndef callers.
4693 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
4694 it through to c_parser_conditional_expression.
4695 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
4696 pass it through to c_parser_binary_expression. Adjust recursive
4697 call.
4698 (c_parser_binary_expression): Remove prec argument, add
4699 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
4700 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
4701 binop matches it, use build2 instead of parser_build_binary_op.
4702 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
4703 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
4704 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
4705 Handle pragma_struct and pragma_param the same as pragma_external.
4706 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
4707 (c_parser_omp_variable_list): Parse array sections for
4708 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
4709 (c_parser_omp_clause_collapse): Fully fold collapse expression.
4710 (c_parser_omp_clause_reduction): Handle user defined reductions.
4711 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
4712 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
4713 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
4714 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
4715 c_parser_omp_clause_depend, c_parser_omp_clause_map,
4716 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
4717 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
4718 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
4719 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
4720 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
4721 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
4722 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
4723 (c_parser_omp_for_loop): Add CODE argument, pass it through
4724 to c_finish_omp_for. Change last argument to cclauses,
4725 and adjust uses to grab parallel clauses from the array of all
4726 the split clauses. Adjust c_parser_binary_expression,
4727 c_parser_declaration_or_fndef and c_finish_omp_for callers.
4728 (omp_split_clauses): New function.
4729 (c_parser_omp_simd): New function.
4730 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
4731 Allow the function to be called also when parsing combined constructs,
4732 and call c_parser_omp_simd when parsing for simd.
4733 (c_parser_omp_sections_scope): If section-sequence doesn't start with
4734 #pragma omp section, require exactly one structured-block instead of
4735 sequence of statements.
4736 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
4737 Allow the function to be called also when parsing combined constructs.
4738 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
4739 Allow the function to be called also when parsing combined
4740 constructs.
4741 (c_parser_omp_taskgroup, c_parser_omp_cancel,
4742 c_parser_omp_cancellation_point, c_parser_omp_distribute,
4743 c_parser_omp_teams, c_parser_omp_target_data,
4744 c_parser_omp_target_update, c_parser_omp_target,
4745 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
4746 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
4747 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
4748 (c_parser_omp_construct): Add p_name and mask vars. Handle
4749 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
4750 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
4751 and c_parser_omp_sections callers.
4752 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
4753 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
4754 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
4755 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
4756 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
4757 OMP_CLAUSE_DEPEND.
4758 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
4759 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
4760 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
4761 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
4762 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
4763 * c-typeck.c: Include tree-inline.h.
4764 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
4765 handle_omp_array_sections_1, handle_omp_array_sections,
4766 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
4767 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
4768 user defined reductions.
4769 (c_tree_equal): New function.
4770 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
4771 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
4772 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
4773 c_check_omp_declare_reduction_r): New prototypes.
4774 * c-decl.c (current_omp_declare_target_attribute): New variable.
4775 (c_decl_attributes): New function.
4776 (start_decl, start_function): Use it instead of decl_attributes.
4777 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
4778 c_omp_reduction_decl, c_omp_reduction_lookup,
4779 c_check_omp_declare_reduction_r): New functions.
4780
4781 2013-09-25 Tom Tromey <tromey@redhat.com>
4782
4783 * Make-lang.in (c/gccspec.o): Remove.
4784 (CFLAGS-c/gccspec.o): New variable.
4785 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
4786 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
4787 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
4788
4789 2013-09-25 Tom Tromey <tromey@redhat.com>
4790
4791 * Make-lang.in (c/gccspec.o): Don't use subshell.
4792
4793 2013-09-18 Marek Polacek <polacek@redhat.com>
4794
4795 PR sanitize/58443
4796 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
4797 Remove unnecessary check.
4798
4799 2013-09-18 Marek Polacek <polacek@redhat.com>
4800
4801 PR sanitizer/58411
4802 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
4803 no_sanitize_undefined attribute.
4804
4805 2013-09-13 Kai Tietz <ktietz@redhat.com>
4806
4807 PR target/57848
4808 * c-decl.c (c_builtin_function_ext_scope): Remove
4809 wrong assumption that it is never called on prexisting
4810 symbol.
4811
4812 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
4813
4814 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
4815
4816 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
4817
4818 * c-objc-common.c (c_tree_printer): Tidy.
4819
4820 2013-08-30 Marek Polacek <polacek@redhat.com>
4821
4822 * c-typeck.c (build_binary_op): Add division by zero and shift
4823 instrumentation.
4824
4825 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
4826 Joseph Myers <joseph@codesourcery.com>
4827
4828 PR c/35649
4829 * c-typeck.c (c_common_type): Prefer double_type_node over
4830 other REAL_TYPE types with the same precision.
4831 (convert_arguments): Likewise.
4832
4833 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
4834
4835 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
4836 (c_initialize_diagnostics): Call a destructor for the early printer.
4837
4838 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
4839
4840 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
4841 printer initialization.
4842
4843 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
4844
4845 PR c/57490
4846 * c-array-notation.c (fix_conditional_array_notations_1): Added a
4847 check for truth values.
4848 (expand_array_notation_exprs): Added truth values case. Removed an
4849 unwanted else. Added for-loop to walk through subtrees in default
4850 case.
4851
4852 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
4853
4854 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
4855
4856 2013-07-23 Joseph Myers <joseph@codesourcery.com>
4857
4858 * c-parser.c (struct c_generic_association): Fix typo.
4859
4860 2013-07-23 Tom Tromey <tromey@redhat.com>
4861 Joseph Myers <joseph@codesourcery.com>
4862
4863 * c-parser.c (struct c_generic_association): New.
4864 (c_generic_association_d): New typedef.
4865 (c_parser_generic_selection): New function.
4866 (c_parser_postfix_expression): Handle RID_GENERIC.
4867
4868 2013-07-13 Jason Merrill <jason@redhat.com>
4869
4870 PR c++/57793
4871 * c-decl.c (finish_struct): Check for too-large class.
4872
4873 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
4874
4875 PR c/57821
4876 * c-typeck.c (set_init_index): When folding, check for index overflow.
4877
4878 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
4879
4880 * c-parser.c (c_parser_array_notation): Removed rejection of array
4881 notations in an array of function pointers.
4882
4883 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
4884
4885 * c-array-notation.c (make_triplet_val_inv): New function.
4886 (create_cmp_incr): Likewise.
4887 (create_array_refs): Likewise.
4888 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
4889 Also modularized common parts between functions and called the function.
4890 (build_array_notation_expr): Likewise.
4891 (fix_conditional_array_notations_1): Likewise.
4892 (fix_array_notation_expr): Likewise.
4893 (fix_array_notation_call_expr): Likewise.
4894
4895 2013-06-18 Marek Polacek <polacek@redhat.com>
4896
4897 PR c/57630
4898 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
4899
4900 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
4901
4902 * c-array-notation.c (build_array_notation_expr): Reject array notation
4903 mismatch between LHS and RHS even inside a call_expr. Also, removed
4904 a couple while statements that were dead code.
4905
4906 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
4907
4908 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
4909 excessive precision expressions in function parameters. Also removed
4910 couple unwanted while statements.
4911
4912 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
4913
4914 * c-array-notation.c (expand_array_notation_exprs): Added
4915 ARRAY_NOTATION_REF case.
4916
4917 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
4918
4919 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
4920 function to c-family/array-notation-common.c.
4921 (is_cilkplus_reduce_builtin): Likewise.
4922 (find_rank): Likewise.
4923 (extract_array_notation_exprs): Likewise.
4924 (replace_array_notations): Likewise.
4925 (find_inv_trees): Likewise.
4926 (replace_inv_trees): Likewise.
4927 (contains_array_notation_expr): Likewise.
4928 (find_correct_array_notation_type): Likewise.
4929 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
4930 (struct inv_list): Moved this to c-family/array-notation-common.c.
4931 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
4932
4933 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
4934
4935 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
4936 reduction functions outside the for-loop. Added a check if the fundecl
4937 is non-NULL. Finally, removed an unwanted if-statement, and made the
4938 body unconditional.
4939
4940 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
4941
4942 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
4943 condition of the if-statement matches the rank of else-block and then-
4944 block when array notations are used.
4945 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
4946 expression after the entire function body is parsed.
4947 (c_parser_expr_no_commas): Delayed creating array notation expressions
4948 to the end of function parsing.
4949 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
4950 whole if-statement instead of just the condition.
4951 (expand_array_notation_exprs): Added MODIFY_EXPR case.
4952
4953 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
4954
4955 PR c/57474
4956 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
4957 array to NULL_TREE if they are unused. Also added a check for the
4958 field to be NULL before its fields are used in future.
4959
4960 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4961
4962 PR bootstrap/57450
4963 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
4964 (build_array_notation_expr): Likewise.
4965
4966 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
4967
4968 * c-typeck.c (build_array_ref): Added a check to see if array's
4969 index is greater than one. If true, then emit an error.
4970 (build_function_call_vec): Exclude error reporting and checking
4971 for builtin array-notation functions.
4972 (convert_arguments): Likewise.
4973 (c_finish_return): Added a check for array notations as a return
4974 expression. If true, then emit an error.
4975 (c_finish_loop): Added a check for array notations in a loop
4976 condition. If true then emit an error.
4977 (lvalue_p): Added a ARRAY_NOTATION_REF case.
4978 (build_binary_op): Added a check for array notation expr inside
4979 op1 and op0. If present, we call another function to find correct
4980 type.
4981 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
4982 * c-parser.c (c_parser_compound_statement): Check if array
4983 notation code is used in tree, if so, then transform them into
4984 appropriate C code.
4985 (c_parser_expr_no_commas): Check if array notation is used in LHS
4986 or RHS, if so, then build array notation expression instead of
4987 regular modify.
4988 (c_parser_postfix_expression_after_primary): Added a check for
4989 colon(s) after square braces, if so then handle it like an array
4990 notation. Also, break up array notations in unary op if found.
4991 (c_parser_direct_declarator_inner): Added a check for array
4992 notation.
4993 (c_parser_compound_statement): Added a check for array notation in
4994 a stmt. If one is present, then expand array notation expr.
4995 (c_parser_if_statement): Likewise.
4996 (c_parser_switch_statement): Added a check for array notations in
4997 a switch statement's condition. If true, then output an error.
4998 (c_parser_while_statement): Similarly, but for a while.
4999 (c_parser_do_statement): Similarly, but for a do-while.
5000 (c_parser_for_statement): Similarly, but for a for-loop.
5001 (c_parser_unary_expression): Check if array notation is used in a
5002 pre-increment or pre-decrement expression. If true, then expand
5003 them.
5004 (c_parser_array_notation): New function.
5005 * c-array-notation.c: New file.
5006 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
5007
5008 2013-05-23 Mike Stump <mikestump@comcast.net>
5009
5010 * c-typeck.c (convert_for_assignment): Handle references to memory
5011 spaces better.
5012
5013 2013-05-16 Jason Merrill <jason@redhat.com>
5014
5015 * Make-lang.in (cc1$(exeext)): Use link mutex.
5016
5017 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
5018
5019 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
5020 to simply use OPT_Wpointer_arith.
5021 (build_unary_op): Likewise.
5022
5023 2013-04-03 Jakub Jelinek <jakub@redhat.com>
5024
5025 PR c/19449
5026 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
5027 argument. If set, or it temporarily for parsing of the first
5028 argument into force_folding_builtin_constant_p.
5029 (c_parser_postfix_expression): Adjust callers.
5030
5031 2013-03-21 Richard Biener <rguenther@suse.de>
5032
5033 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
5034 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
5035
5036 2013-02-12 Marek Polacek <polacek@redhat.com>
5037
5038 PR c/44938
5039 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
5040 origtypes to NULL.
5041
5042 2013-01-24 Jakub Jelinek <jakub@redhat.com>
5043
5044 PR c/56078
5045 * c-typeck.c (set_nonincremental_init_from_string): If
5046 constructor_max_index is NULL, treat it as if tree_int_cst_lt
5047 returned false.
5048 (process_init_element): Likewise.
5049
5050 2012-12-20 Jakub Jelinek <jakub@redhat.com>
5051
5052 PR c++/55619
5053 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
5054 argument, don't call default_function_array_conversion
5055 nor c_fully_fold here.
5056 (c_parser_asm_statement): Adjust callers.
5057 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
5058 and outputs here, and call default_function_array_conversion
5059 on inputs that don't need to be addressable.
5060
5061 2012-12-18 Jakub Jelinek <jakub@redhat.com>
5062
5063 PR c/39464
5064 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
5065 warning require that both c_common_unsigned_type as well as
5066 c_common_signed_type is the same for both mvl and mvr types.
5067
5068 2012-11-16 Diego Novillo <dnovillo@google.com>
5069
5070 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
5071
5072 * c-common.c: Use new vec API in vec.h.
5073 * c-common.h: Likewise.
5074 * c-gimplify.c: Likewise.
5075 * c-pragma.c: Likewise.
5076 * c-pretty-print.c: Likewise.
5077 * c-pretty-print.h: Likewise.
5078 * c-semantics.c: Likewise.
5079 * c-decl.c: Likewise.
5080 * c-parser.c: Likewise.
5081 * c-tree.h: Likewise.
5082 * c-typeck.c: Likewise.
5083
5084 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
5085
5086 PR c++/54930
5087 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
5088
5089 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5090
5091 PR c/53066
5092 * c-decl.c (warn_if_shadowing): Do not warn if a variable
5093 shadows a function, unless the variable is a function or a
5094 pointer-to-function.
5095
5096 2012-10-12 Jakub Jelinek <jakub@redhat.com>
5097
5098 PR c/54381
5099 * c-parser.c (struct c_tree_loc_pair): Removed.
5100 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
5101 add location_t * and tree * arguments, fill in array of 3
5102 sizeof_arg trees and corresponding locs.
5103 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
5104 c_parser_expr_list callers.
5105 (c_parser_postfix_expression_after_primary): Likewise. Pass
5106 array of 3 sizeof_arg trees and locs (corresponding to first
5107 3 arguments) to sizeof_pointer_memaccess_warning.
5108
5109 2012-10-09 Lawrence Crowl <crowl@google.com>
5110
5111 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
5112 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
5113 hash table.
5114
5115 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
5116
5117 PR c++/54194
5118 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
5119 call.
5120
5121 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
5122
5123 PR c++/54427
5124 * c-typeck.c: Include c-common.h.
5125 (enum stv_conv): Moved to c-common.h.
5126 (scalar_to_vector): Moved to c-common.c.
5127 (build_binary_op): Adapt to scalar_to_vector's new prototype.
5128 * Make-lang.in: c-typeck.c depends on c-common.h.
5129
5130 2012-10-04 Arnaud Charlet <charlet@adacore.com>
5131
5132 * c-decl.c (c_write_global_declarations): Fix handling of
5133 -fdump-ada-spec*.
5134
5135 2012-09-30 Sharad Singhai <singhai@google.com>
5136
5137 * c-decl.c (c_write_global_declarations): Use a different method
5138 to determine if the dump has ben initialized.
5139
5140 2012-09-14 Joseph Myers <joseph@codesourcery.com>
5141
5142 PR c/54552
5143 * c-typeck.c (c_cast_expr): When casting to a type requiring
5144 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
5145 c_fully_fold first.
5146
5147 2012-09-14 Joseph Myers <joseph@codesourcery.com>
5148
5149 PR c/54103
5150 * c-typeck.c (build_unary_op): Pass original argument of
5151 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
5152 any C_MAYBE_CONST_EXPR, if it has integer operands.
5153 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
5154 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
5155 to c_objc_common_truthvalue_conversion, then remove any
5156 C_MAYBE_CONST_EXPR, if they have integer operands. Use
5157 c_objc_common_truthvalue_conversion not
5158 c_common_truthvalue_conversion.
5159 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
5160 call note_integer_operands for arguments with integer operands
5161 that are not integer constants.
5162
5163 2012-09-13 Jakub Jelinek <jakub@redhat.com>
5164
5165 PR c/54559
5166 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
5167 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
5168
5169 2012-08-31 Jakub Jelinek <jakub@redhat.com>
5170
5171 PR c/54428
5172 * c-convert.c (convert): Don't call fold_convert_loc if
5173 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
5174 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
5175 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
5176
5177 2012-08-24 Jakub Jelinek <jakub@redhat.com>
5178
5179 PR c/54355
5180 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
5181 for nested and empty_ok arguments in the call to
5182 c_parser_declaration_or_fndef.
5183
5184 2012-08-17 Jakub Jelinek <jakub@redhat.com>
5185
5186 * c-tree.h (c_last_sizeof_arg): Declare.
5187 * c-parser.c (struct c_tree_loc_pair): New type.
5188 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
5189 non-NULL.
5190 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
5191 (c_parser_postfix_expression_after_primary): Likewise. Call
5192 sizeof_pointer_memaccess_warning if needed.
5193 (sizeof_ptr_memacc_comptypes): New function.
5194 * c-typeck.c (c_last_sizeof_arg): New global variable.
5195 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
5196
5197 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
5198
5199 * c-lang.h (lang_decl): Add variable_size GTY option.
5200
5201 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
5202
5203 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
5204 * Make-lang.in: Fix dependencies.
5205
5206 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
5207
5208 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
5209 and add language Makefile hooks.
5210 * config-lang.in: New file.
5211 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
5212 add the required "normal" config-lang.in rules.
5213 * c-lang.h: Moved from gcc/ to here.
5214 * c-tree.h: Likewise.
5215 * c-objc-common.c: Likewise.
5216 * c-objc-common.h: Likewise.
5217 * c-typeck.c: Likewise.
5218 * c-convert.c: Likewise.
5219 * c-lang.c: Likewise.
5220 * c-aux-info.c: Likewise.
5221 * c-errors.c: Likewise.
5222 * gccspec.c: Likewise.
5223 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
5224 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
5225 \f
5226 Copyright (C) 2012-2017 Free Software Foundation, Inc.
5227
5228 Copying and distribution of this file, with or without modification,
5229 are permitted in any medium without royalty provided the copyright
5230 notice and this notice are preserved.