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