re PR c/65467 ([libgomp] sorry, unimplemented: '_Atomic' with OpenMP)
[gcc.git] / gcc / c / ChangeLog
1 2016-09-02 Jakub Jelinek <jakub@redhat.com>
2
3 PR c/65467
4 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
5 flag_openmp.
6 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
7 instead of mark_exp_read on low_bound/length expression.
8 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
9 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
10 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
11 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
12 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
13 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
14 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
15 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
16 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
17 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
18 instead of mark_expr_read.
19 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
20 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
21 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
22 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
23 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
24 array section bases outside of depend clause, for depend clause
25 use convert_lvalue_to_rvalue on the base.
26 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
27 linear, aligned, map, to and from clauses.
28 (c_omp_clause_copy_ctor): New function.
29
30 2016-09-01 Marek Polacek <polacek@redhat.com>
31
32 PR c/7652
33 * c-typeck.c (composite_type): Add FALLTHRU comment.
34
35 2016-08-31 David Malcolm <dmalcolm@redhat.com>
36
37 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
38 to the insertion fixits for "struct", "union", and "enum".
39
40 2016-08-30 David Malcolm <dmalcolm@redhat.com>
41
42 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
43 rather than add_fixit_misspelled_id.
44 (undeclared_variable): Likewise.
45 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
46 now-redundant "here" params from add_fixit_insert method calls.
47 (c_parser_parameter_declaration): Likewise.
48 * c-typeck.c (build_component_ref): Remove now-redundant range
49 param from add_fixit_replace method calls.
50
51 2016-08-25 Marek Polacek <polacek@redhat.com>
52
53 * c-typeck.c (parser_build_binary_op): Pass LHS to
54 warn_logical_not_parentheses.
55
56 2016-08-25 Marek Polacek <polacek@redhat.com>
57
58 PR c/77323
59 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
60 or _FloatN or _FloatNx is not supported.
61 (finish_declspecs): Set type to integer_type_node when _FloatN or
62 _FloatNx is not supported.
63
64 2016-08-19 Joseph Myers <joseph@codesourcery.com>
65
66 PR c/32187
67 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
68 (struct c_declspecs): Add field floatn_nx_idx.
69 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
70 and _FloatNx type specifiers.
71 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
72 (c_parser_declspecs, c_parser_attribute_any_word)
73 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
74 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
75 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
76 narrower than double.
77
78 2016-08-12 Jakub Jelinek <jakub@redhat.com>
79 Martin Liska <mliska@suse.cz>
80
81 PR c/67410
82 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
83 % to determine val element to change. Assert that
84 wchar_bytes * charwidth fits into val array.
85
86 2016-08-12 Marek Polacek <polacek@redhat.com>
87
88 PR c/7652
89 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
90 (c_parser_postfix_expression): Likewise.
91 * c-typeck.c (build_unary_op): Adjust fall through comment.
92 (c_mark_addressable): Likewise.
93
94 2016-08-11 Jakub Jelinek <jakub@redhat.com>
95
96 PR c/72816
97 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
98 array member through typedef, for orig_qual_indirect == 0 clear
99 orig_qual_type.
100
101 2016-08-08 David Malcolm <dmalcolm@redhat.com>
102
103 PR c/64955
104 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
105 this up to selftest::run_c_tests.
106 (selftest::run_c_tests): New function.
107
108 2016-08-04 Thomas Schwinge <thomas@codesourcery.com>
109
110 * c-parser.c (struct oacc_routine_data): Add error_seen and
111 fndecl_seen members.
112 (c_finish_oacc_routine): Use these.
113 (c_parser_declaration_or_fndef): Adjust.
114 (c_parser_oacc_routine): Likewise. Support more C language
115 constructs, and improve diagnostics. Move pragma context
116 checking...
117 (c_parser_pragma): ... here.
118
119 * c-parser.c (struct oacc_routine_data): New.
120 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
121 Simplify code.
122 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
123 declare target" attribute.
124
125 2016-08-01 Jan Beulich <jbeulich@suse.com>
126
127 * c-fold.c (c_fully_fold_internal): Also emit shift count
128 warnings for vector types.
129 * c-typeck.c (build_binary_op): Likewise.
130
131 2016-07-29 Marek Polacek <polacek@redhat.com>
132
133 PR c/71742
134 * c-decl.c (finish_struct): Rephrase an error message.
135
136 PR c/71853
137 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
138 to error node for invalid code.
139
140 PR c/71573
141 * c-decl.c (implicitly_declare): Return decl early not only for
142 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
143
144 2016-07-29 Jakub Jelinek <jakub@redhat.com>
145
146 PR c/71969
147 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
148 on GNU extern inline functions.
149
150 2016-07-29 Marek Polacek <polacek@redhat.com>
151
152 PR c/71583
153 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
154 check expr.value.
155
156 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
157
158 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
159
160 2016-07-20 David Malcolm <dmalcolm@redhat.com>
161
162 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
163 spellcheck-tree.h
164 (best_macro_match): Likewise, converting from a typedef to a
165 subclass.
166 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
167 (lookup_name_fuzzy): Update for change of best_macro_match to a
168 subclass with a ctor that calls cpp_forall_identifiers.
169
170 2016-07-20 David Malcolm <dmalcolm@redhat.com>
171
172 * c-decl.c (implicit_decl_warning): Update for conversion of
173 return type of lookup_name_fuzzy to const char *.
174 (undeclared_variable): Likewise.
175 (lookup_name_fuzzy): Convert return type from tree to
176 const char *.
177 * c-parser.c (c_parser_declaration_or_fndef): Update for
178 conversion of return type of lookup_name_fuzzy to const char *.
179 (c_parser_parameter_declaration): Likewise.
180
181 2016-07-15 Cesar Philippidis <cesar@codesourcery.com>
182
183 * c-parser.c (c_parser_oacc_declare): Don't scan for
184 GOMP_MAP_POINTER.
185 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
186 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
187 zero-length subarrays.
188
189 2016-07-15 Jakub Jelinek <jakub@redhat.com>
190
191 PR c/71858
192 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
193 instead of FUZZY_LOOKUP_NAME.
194 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
195 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
196
197 2016-07-14 Jakub Jelinek <jakub@redhat.com>
198
199 PR c/71858
200 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
201
202 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
203
204 * c-parser.c (c_parser_generic_selection): Make type of variable
205 auto_vec.
206 (c_parser_omp_declare_simd): Likewise.
207
208 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
209
210 * c-decl.c (struct c_struct_parse_info): Change member types
211 from vec to auto_vec.
212 (start_struct): Adjust.
213 (finish_struct): Likewise.
214
215 2016-07-02 Jakub Jelinek <jakub@redhat.com>
216
217 PR c/71719
218 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
219
220 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
221
222 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
223 Move pragma context checking into...
224 (c_parser_omp_cancellation_point): ... here, and improve
225 diagnostic messages.
226 * c-typeck.c (c_finish_omp_cancel)
227 (c_finish_omp_cancellation_point): Improve diagnostic messages.
228
229 2016-06-29 Jakub Jelinek <jakub@redhat.com>
230
231 PR c/71685
232 * c-typeck.c (c_build_qualified_type): Don't clear
233 C_TYPE_INCOMPLETE_VARS for the main variant.
234
235 2016-06-28 Martin Sebor <msebor@redhat.com>
236
237 PR c/71552
238 * c-typeck.c (output_init_element): Diagnose incompatible types
239 before non-constant initializers.
240
241 2016-06-28 Jakub Jelinek <jakub@redhat.com>
242
243 * Make-lang.in: Don't cat ../stage_current if it does not exist.
244
245 2016-06-23 Andi Kleen <ak@linux.intel.com>
246
247 * Make-lang.in: Add support for autofdo.
248
249 2016-06-22 David Malcolm <dmalcolm@redhat.com>
250
251 PR c/70339
252 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
253 (implicit_decl_warning): When issuing warnings for implicit
254 declarations, attempt to provide a suggestion via
255 lookup_name_fuzzy.
256 (undeclared_variable): Likewise when issuing errors.
257 (lookup_name_in_scope): Likewise.
258 (struct edit_distance_traits<cpp_hashnode *>): New struct.
259 (best_macro_match): New typedef.
260 (find_closest_macro_cpp_cb): New function.
261 (lookup_name_fuzzy): New function.
262 * c-parser.c: Include gcc-rich-location.h.
263 (c_token_starts_typename): Split out case CPP_KEYWORD into...
264 (c_keyword_starts_typename): ...this new function.
265 (c_parser_declaration_or_fndef): When issuing errors about
266 missing "struct" etc, add a fixit. For other kinds of errors,
267 attempt to provide a suggestion via lookup_name_fuzzy.
268 (c_parser_parms_declarator): When looking ahead to detect typos in
269 type names, also reject CPP_KEYWORD.
270 (c_parser_parameter_declaration): When issuing errors about
271 unknown type names, attempt to provide a suggestion via
272 lookup_name_fuzzy.
273 * c-tree.h (c_keyword_starts_typename): New prototype.
274
275 2016-06-20 Joseph Myers <joseph@codesourcery.com>
276
277 PR c/71601
278 * c-typeck.c (build_conditional_expr): Return error_mark_node if
279 c_common_type returns error_mark_node.
280
281 2016-06-19 Martin Sebor <msebor@redhat.com>
282
283 PR c/69507
284 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
285 __alignof__ (expression).
286
287 2016-06-14 David Malcolm <dmalcolm@redhat.com>
288
289 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
290
291 2016-06-14 David Malcolm <dmalcolm@redhat.com>
292
293 * c-typeck.c (build_component_ref): Simplify fixit code by
294 using gcc_rich_location::add_fixit_misspelled_id.
295 (set_init_label): Likewise.
296
297 2016-06-13 David Malcolm <dmalcolm@redhat.com>
298
299 * c-parser.c (c_parser_initelt): Provide location of name for new
300 location_t param of set_init_label.
301 * c-tree.h (set_init_label): Add location_t param.
302 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
303 param and use it when issuing error messages about unrecognized
304 field names. Attempt to provide a fixit hint if appropriate,
305 otherwise update the error message to provide the type name.
306
307 2016-06-10 Thomas Schwinge <thomas@codesourcery.com>
308
309 PR c/71381
310 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
311 Loosen checking.
312
313 2016-06-08 Martin Sebor <msebor@redhat.com>
314 Jakub Jelinek <jakub@redhat.com>
315
316 PR c++/70507
317 PR c/68120
318 * c-typeck.c (convert_arguments): Don't promote last argument
319 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
320
321 2016-06-08 Marek Polacek <polacek@redhat.com>
322
323 PR c/71418
324 * c-decl.c (grokdeclarator): Check TYPE_P.
325
326 PR c/71426
327 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
328 code.
329
330 2016-06-07 David Malcolm <dmalcolm@redhat.com>
331
332 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
333 and structure element reference, capture the location of the
334 element name token and pass it to build_component_ref.
335 (c_parser_postfix_expression_after_primary): Likewise for
336 structure element dereference.
337 (c_parser_omp_variable_list): Likewise for
338 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
339 * c-tree.h (build_component_ref): Add location_t param.
340 * c-typeck.c (build_component_ref): Add location_t param
341 COMPONENT_LOC. Use it, if available, when issuing hints about
342 mispelled member names to provide a fixit replacement hint.
343
344 2016-06-06 Marek Polacek <polacek@redhat.com>
345
346 PR c/71362
347 * c-parser.c (c_parser_direct_declarator): Set location.
348
349 2016-06-06 Marek Polacek <polacek@redhat.com>
350
351 * c-typeck.c (comptypes_internal): Handle comparisons of
352 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
353 TYPE_REF_CAN_ALIAS_ALL.
354
355 2016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
356
357 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
358 arguments as addressable when async clause exists.
359
360 2016-05-30 Jakub Jelinek <jakub@redhat.com>
361
362 PR c++/71349
363 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
364 when combined with target construct.
365
366 2016-05-26 Jakub Jelinek <jakub@redhat.com>
367
368 * c-parser.c (c_parser_omp_clause_schedule): Warn if
369 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
370
371 2016-05-25 Marek Polacek <polacek@redhat.com>
372
373 PR c/71265
374 * c-decl.c (c_make_fname_decl): Don't check seen_error.
375
376 PR c/71266
377 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
378
379 2016-05-24 Cesar Philippidis <cesar@codesourcery.com>
380
381 * c-parser.c (c_parser_oacc_declare): Add support for
382 GOMP_MAP_FIRSTPRIVATE_POINTER.
383 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
384 argument with enum c_omp_region_type ort.
385 (handle_omp_array_sections): Likewise. Update call to
386 handle_omp_array_sections_1.
387 (c_finish_omp_clauses): Add specific errors and warning messages for
388 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
389 call to handle_omp_array_sections.
390
391 2016-05-24 Thomas Schwinge <thomas@codesourcery.com>
392
393 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
394
395 2016-05-24 Richard Biener <rguenther@suse.de>
396
397 PR middle-end/70434
398 PR c/69504
399 * c-typeck.c (build_array_ref): Do not complain about indexing
400 non-lvalue vectors. Adjust for function name change.
401
402 2016-05-20 Martin Sebor <msebor@redhat.com>
403
404 PR c/71115
405 * c-typeck.c (error_init): Use
406 expansion_point_location_if_in_system_header.
407 (warning_init): Same.
408
409 2016-05-19 David Malcolm <dmalcolm@redhat.com>
410
411 PR c/71171
412 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
413 in error-handling.
414 (c_parser_postfix_expression): Likewise.
415 * c-tree.h (c_expr::set_error): New method.
416 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
417 that result's range is initialized.
418
419 2016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
420
421 * c-typeck.c (parser_build_unary_op): Fix formatting.
422
423 2016-05-16 Matthew Wahab <matthew.wahab@arm.com>
424
425 * c-decl.c (grokdeclarator): Remove errmsg and use of
426 targetm.invalid_return_type.
427 (grokparms): Remove errmsg and use of
428 targetm.invalid_parameter_type.
429
430 2016-05-13 Joseph Myers <joseph@codesourcery.com>
431
432 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
433 function return type.
434
435 2016-05-12 Marek Polacek <polacek@redhat.com>
436
437 PR c/70756
438 * c-decl.c (build_compound_literal): Pass LOC down to
439 c_incomplete_type_error.
440 * c-tree.h (require_complete_type): Adjust declaration.
441 (c_incomplete_type_error): Likewise.
442 * c-typeck.c (require_complete_type): Add location parameter, pass it
443 down to c_incomplete_type_error.
444 (c_incomplete_type_error): Add location parameter, pass it down to
445 error_at.
446 (build_component_ref): Pass location down to c_incomplete_type_error.
447 (default_conversion): Pass location down to require_complete_type.
448 (build_array_ref): Likewise.
449 (build_function_call_vec): Likewise.
450 (convert_arguments): Likewise.
451 (build_unary_op): Likewise.
452 (build_c_cast): Likewise.
453 (build_modify_expr): Likewise.
454 (convert_for_assignment): Likewise.
455 (c_finish_omp_clauses): Likewise.
456
457 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
458
459 PR c/43651
460 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
461 is enabled.
462 * c-errors.c (pedwarn_c90): Return true if warned.
463 * c-tree.h (pedwarn_c90): Change return type to bool.
464 (enum c_declspec_word): Add new enumerator cdw_atomic.
465
466 2016-05-11 Marek Polacek <polacek@redhat.com>
467
468 PR c++/71024
469 * c-decl.c (diagnose_mismatched_decls): Factor out code to
470 diagnose_mismatched_attributes and call it.
471
472 2016-05-10 Marek Polacek <polacek@redhat.com>
473
474 PR c/70255
475 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
476 on a declaration following the definition.
477
478 2016-05-05 Jakub Jelinek <jakub@redhat.com>
479
480 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
481 parse it through to c_parser_c99_block_statement.
482 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
483 caller.
484
485 2016-05-04 Marek Polacek <polacek@redhat.com>
486
487 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
488 OPT_Wdangling_else.
489
490 2016-05-04 Marek Polacek <polacek@redhat.com>
491
492 PR c/48778
493 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
494 for macro expansions.
495
496 2016-05-03 Marek Polacek <polacek@redhat.com>
497
498 PR c/70859
499 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
500 check_builtin_function_arguments.
501
502 2016-05-03 Richard Biener <rguenther@suse.de>
503
504 * Make-lang.in (cc1-checksum.c): For stage-final re-use
505 the checksum from the previous stage.
506
507 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
508
509 * c-parser.c (c_parser_oacc_all_clauses): Update call to
510 c_finish_omp_clauses.
511 (c_parser_omp_all_clauses): Likewise.
512 (c_parser_oacc_cache): Likewise.
513 (c_parser_oacc_loop): Likewise.
514 (omp_split_clauses): Likewise.
515 (c_parser_omp_declare_target): Likewise.
516 (c_parser_cilk_all_clauses): Likewise.
517 (c_parser_cilk_for): Likewise.
518 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
519 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
520
521 2016-05-02 Marek Polacek <polacek@redhat.com>
522
523 PR c/70851
524 * c-decl.c (grokdeclarator): Diagnose when array's size has an
525 incomplete type.
526
527 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
528
529 PR middle-end/70626
530 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
531 OACC_LOOP_CLAUSE_MASK.
532 (c_parser_oacc_kernels_parallel): Update call to
533 c_oacc_split_loop_clauses.
534
535 2016-04-28 Andrew MacLeod <amacleod@redhat.com>
536
537 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
538 argument to build_modify_expr in two cases.
539
540 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
541
542 * c-parser.c (c_parser_postfix_expression_after_primary): Call
543 warn_for_memset instead of warning directly here.
544
545 2016-04-26 Marek Polacek <polacek@redhat.com>
546
547 PR c/67784
548 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
549 out of ...
550 (c_parser_for_statement): ... here.
551 (c_parser_if_statement): Use it.
552 (c_parser_switch_statement): Use it.
553 (c_parser_while_statement): Use it.
554
555 PR c/70791
556 * c-decl.c (pushdecl): Pass LOCUS down to warning.
557
558 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
559
560 PR c++/69363
561 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
562 instead of c_finish_cilk_clauses.
563 * c-tree.h (c_finish_omp_clauses): Add new default argument.
564 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
565 floating-point variables in the linear clause for Cilk Plus.
566
567 2016-04-18 Michael Matz <matz@suse.de>
568
569 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
570 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
571
572 2016-04-15 Marek Polacek <polacek@redhat.com>
573
574 PR c/70671
575 * c-typeck.c (build_unary_op): Pass location down to error and
576 warning call.
577
578 2016-04-15 Jakub Jelinek <jakub@redhat.com>
579
580 PR c/70436
581 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
582 where needed.
583 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
584 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
585 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
586 Adjust c_parser_pragma callers.
587 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
588 caller.
589 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
590 c_parser_statement.
591 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
592 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
593 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
594 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
595 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
596 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
597 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
598 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
599 down where needed.
600 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
601 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
602 calls.
603
604 2016-04-13 Marek Polacek <polacek@redhat.com>
605
606 PR c/70436
607 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
608 adjust callers.
609 (c_parser_statement): Likewise.
610 (c_parser_c99_block_statement): Likewise.
611 (c_parser_while_statement): Likewise.
612 (c_parser_for_statement): Likewise.
613 (c_parser_if_body): Don't set IF_P here.
614 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
615 about dangling else here.
616 * c-tree.h (c_finish_if_stmt): Adjust declaration.
617 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
618 warn about dangling else here.
619
620 2016-04-04 Marek Polacek <polacek@redhat.com>
621
622 PR c/70307
623 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
624
625 2016-03-31 Marek Polacek <polacek@redhat.com>
626
627 PR c/70297
628 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
629
630 2016-03-18 David Malcolm <dmalcolm@redhat.com>
631
632 PR c/70281
633 * c-parser.c (c_parser_postfix_expression): Set the source range
634 for uses of "__builtin_types_compatible_p".
635
636 2016-03-17 Jakub Jelinek <jakub@redhat.com>
637
638 PR c/70280
639 * c-typeck.c (composite_type): Don't count void_list_node
640 into len, if the list is terminated by void_list_node, start
641 with void_list_node instead of NULL for newargs. Stop
642 at void_list_node.
643
644 2016-03-16 Marek Polacek <polacek@redhat.com>
645
646 PR c/70093
647 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
648 nested functions returning VM types.
649
650 2016-03-09 Cesar Philippidis <cesar@codesourcery.com>
651
652 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
653 when calling c_finish_omp_clauses.
654
655 2016-03-04 Bernd Schmidt <bschmidt@redhat.com>
656
657 PR c/69824
658 * c-decl.c (get_parm_info): Don't queue implicit function declarations
659 for later.
660
661 2016-03-04 Marek Polacek <polacek@redhat.com>
662
663 PR c/69798
664 * c-parser.c (c_parser_postfix_expression): Call
665 c_parser_cast_expression rather than c_parser_postfix_expression.
666
667 2016-03-01 Jakub Jelinek <jakub@redhat.com>
668
669 PR c/69796
670 PR c/69974
671 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
672 of incomplete decls to error_mark_node.
673
674 2016-02-24 Marek Polacek <polacek@redhat.com>
675
676 PR c/69819
677 * c-decl.c (finish_decl): Don't update the copy of the type of a
678 different decl type.
679
680 2016-02-23 Jakub Jelinek <jakub@redhat.com>
681
682 PR objc/69844
683 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
684 in id_kind reclassification.
685
686 2016-02-16 Jakub Jelinek <jakub@redhat.com>
687
688 PR c/69835
689 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
690
691 2016-02-16 James Norris <jnorris@codesourcery.com>
692
693 PR c/64748
694 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
695
696 2016-02-12 Bernd Schmidt <bschmidt@redhat.com>
697
698 * c-decl.c (build_null_declspecs): Zero the entire struct.
699
700 PR c/69522
701 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
702 callers changed. If nested_p is true, use it to call
703 finish_implicit_inits.
704 * c-tree.h (finish_implicit_inits): Declare.
705 * c-typeck.c (finish_implicit_inits): New function. Move code
706 from ...
707 (push_init_level): ... here.
708 (set_designator, process_init_element): Call finish_implicit_inits.
709
710 2016-02-11 Jakub Jelinek <jakub@redhat.com>
711
712 PR c/69768
713 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
714 arguments for -Waddress warning.
715
716 2016-02-04 Jakub Jelinek <jakub@redhat.com>
717
718 PR c/69669
719 * c-decl.c (finish_enum): When honoring mode attribute,
720 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
721
722 2016-01-29 Jakub Jelinek <jakub@redhat.com>
723
724 PR debug/69518
725 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
726 all type variants, not just TYPE_MAIN_VARIANT.
727
728 2016-01-27 Jakub Jelinek <jakub@redhat.com>
729
730 PR debug/66869
731 * c-decl.c (c_write_global_declarations_1): Warn with
732 warn_unused_function if static prototype without definition
733 is not C_DECL_USED.
734
735 2016-01-27 Marek Polacek <polacek@redhat.com>
736
737 PR c/68062
738 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
739 to unsigned, if needed. Add -Wsign-compare warning.
740
741 2016-01-26 Jakub Jelinek <jakub@redhat.com>
742
743 PR tree-optimization/69483
744 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
745
746 2016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
747
748 PR c/24293
749 * c-tree.h (incomplete_record_decls): Declare.
750 * c-parser.c (incomplete_record_decls): Define.
751 (c_parser_translation_unit): Iterate through incomplete_record_decls and
752 report error if any decl has zero size.
753 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
754 or enum type to incomplete_record_decls.
755
756 2016-01-14 Tom de Vries <tom@codesourcery.com>
757
758 PR tree-optimization/68773
759 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
760 set force_output.
761
762 2016-01-14 Marek Polacek <polacek@redhat.com>
763
764 PR c/69262
765 * c-decl.c (grokdeclarator): Provide more information for invalid
766 array declarations.
767
768 2016-01-06 David Malcolm <dmalcolm@redhat.com>
769
770 * c-parser.c (c_parser_unary_expression): For dereferences, build
771 a combined location before calling build_indirect_ref, so that
772 error reports cover the full range, manually updating the c_expr
773 src_range.
774
775 2016-01-06 Marek Polacek <polacek@redhat.com>
776
777 PR sanitizer/69099
778 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
779 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
780 NULL.
781
782 2016-01-04 Jakub Jelinek <jakub@redhat.com>
783
784 Update copyright years.
785
786 2016-01-04 Marek Polacek <polacek@redhat.com>
787
788 PR c/68908
789 * c-typeck.c (build_atomic_assign): Improve commentary. Add
790 optimization to use __atomic_fetch_* built-in if possible.
791
792 2015-12-23 Thomas Schwinge <thomas@codesourcery.com>
793
794 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
795 into...
796 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
797 all users.
798
799 2015-12-22 Marek Polacek <polacek@redhat.com>
800
801 PR c/69002
802 * c-typeck.c (build_component_ref): Warn when acessing elements of
803 atomic structures or unions.
804
805 2015-12-21 David Malcolm <dmalcolm@redhat.com>
806
807 * c-typeck.c: Include "gcc-rich-location.h".
808 (build_binary_op): In the two places that call binary_op_error,
809 create a gcc_rich_location and populate it with the location of
810 the binary op and its two operands.
811
812 2015-12-16 David Malcolm <dmalcolm@redhat.com>
813
814 * c-parser.c (c_parser_statement_after_labels): When calling
815 c_finish_return, Use the return expression's location if it has
816 one, falling back to the location of the first token within it.
817 * c-typeck.c (c_finish_return): When issuing warnings about
818 the incorrect presence/absence of a return value, issue a note
819 showing the declaration of the function.
820
821 2015-12-16 David Malcolm <dmalcolm@redhat.com>
822
823 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
824 to 4.
825 (c_parser_peek_nth_token): New function.
826 (c_parser_peek_conflict_marker): New function.
827 (c_parser_error): Detect conflict markers and report them as such.
828
829 2015-12-16 David Malcolm <dmalcolm@redhat.com>
830
831 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
832 to preserve range information for the primary expression
833 in the call to c_parser_postfix_expression_after_primary.
834
835 2015-12-16 David Malcolm <dmalcolm@redhat.com>
836
837 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
838 expression location, falling back on the first token location,
839 rather than always using the latter.
840
841 2015-12-16 Marek Polacek <polacek@redhat.com>
842
843 PR c/64637
844 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
845 available.
846
847 2015-12-15 Marek Polacek <polacek@redhat.com>
848
849 PR c/68907
850 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
851 artificial decl.
852
853 2015-12-08 David Malcolm <dmalcolm@redhat.com>
854
855 * c-parser.c (c_parser_alignof_expression): Capture location of
856 closing parenthesis (if any), or of end of unary expression, and
857 use it to build a src_range for the expression.
858
859 2015-12-08 David Malcolm <dmalcolm@redhat.com>
860
861 PR c/68757
862 * c-parser.c (c_parser_get_builtin_args): Add
863 "out_close_paren_loc" param, and write back to it.
864 (c_parser_postfix_expression): Capture the closing
865 parenthesis location for RID_CHOOSE_EXPR,
866 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
867 RID_BUILTIN_SHUFFLE and use it to set the source range
868 for such expressions; within RID_BUILTIN_COMPLEX set
869 the underlying location.
870
871 2015-12-07 Marek Polacek <polacek@redhat.com>
872
873 PR c/68668
874 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
875 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
876
877 2015-12-04 Eric Botcazou <ebotcazou@adacore.com>
878
879 * c-tree.h (c_build_va_arg): Adjust prototype.
880 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
881 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
882 parameter, adjust throughout and issue an error if EXPR is a component
883 with reverse storage order.
884
885 2015-12-02 Jason Merrill <jason@redhat.com>
886
887 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
888 (c_fully_fold_internal, decl_constant_value_for_optimization):
889 Move from c-common.c.
890 * c-tree.h: Declare decl_constant_value_for_optimization.
891 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
892
893 2015-12-02 Joseph Myers <joseph@codesourcery.com>
894
895 PR c/68162
896 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
897 following link from declarator to next declarator. Track original
898 qualified type and pass it to c_build_qualified_type.
899 * c-typeck.c (c_build_qualified_type): Add arguments
900 orig_qual_type and orig_qual_indirect.
901
902 2015-12-02 Thomas Schwinge <thomas@codesourcery.com>
903
904 * c-parser.c (c_parser_omp_clause_name)
905 (c_parser_oacc_all_clauses): Alphabetical sorting.
906
907 2015-12-02 Jakub Jelinek <jakub@redhat.com>
908
909 PR c/68533
910 * c-decl.c (get_parm_info): Use b->locus instead of input_location
911 for diagnostics.
912
913 2015-12-01 Julian Brown <julian@codesourcery.com>
914 Cesar Philippidis <cesar@codesourcery.com>
915 James Norris <James_Norris@mentor.com>
916
917 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
918 (c_parser_oacc_clause_use_device): New function.
919 (c_parser_oacc_all_clauses): Add use_device support.
920 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
921 (c_parser_oacc_host_data): New function.
922 (c_parser_omp_construct): Add host_data support.
923 * c-tree.h (c_finish_oacc_host_data): Add prototype.
924 * c-typeck.c (c_finish_oacc_host_data): New function.
925 (c_finish_omp_clauses): Add use_device support.
926
927 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
928
929 PR c/67106
930 * c-decl.c: Set TYPE_PACKED in variants.
931
932 2015-11-27 Martin Liska <mliska@suse.cz>
933
934 PR c++/68312
935 * c-array-notation.c (fix_builtin_array_notation_fn):
936 Use release_vec_vec instead of vec::release.
937 (build_array_notation_expr): Likewise.
938 (fix_conditional_array_notations_1): Likewise.
939 (fix_array_notation_expr): Likewise.
940 (fix_array_notation_call_expr): Likewise.
941
942 2015-11-27 Jakub Jelinek <jakub@redhat.com>
943
944 PR c/63326
945 * c-parser.c (c_parser_compound_statement_nostart): If
946 last_label is true, use pragma_stmt instead of pragma_compound
947 as second c_parser_pragma argument.
948 (c_parser_omp_ordered, c_parser_omp_target_update,
949 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
950 false as second argument to c_parser_skip_to_pragma_eol after
951 diagnosing standalone directives used in pragma_stmt context.
952
953 2015-11-24 Ilya Verbin <ilya.verbin@intel.com>
954
955 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
956 with "if (ENABLE_OFFLOADING)".
957
958 2015-11-23 David Malcolm <dmalcolm@redhat.com>
959
960 PR objc/68438
961 * c-parser.c (c_parser_postfix_expression): Set up source ranges
962 for various Objective-C constructs: Class.name syntax,
963 @selector(), @protocol(), @encode(), and [] message syntax.
964
965 2015-11-20 David Malcolm <dmalcolm@redhat.com>
966
967 PR 62314
968 * c-typeck.c (should_suggest_deref_p): New function.
969 (build_component_ref): Special-case POINTER_TYPE when
970 generating a "not a structure of union" error message, and
971 suggest a "->" rather than a ".", providing a fix-it hint.
972
973 2015-11-19 David Malcolm <dmalcolm@redhat.com>
974
975 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
976 candidate into a new function, find_closest_identifier.
977
978 2015-11-19 Marek Polacek <polacek@redhat.com>
979
980 PR c/68412
981 * c-typeck.c (parser_build_binary_op): Properly handle
982 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
983
984 2015-11-17 David Malcolm <dmalcolm@redhat.com>
985
986 * c-parser.c (set_c_expr_source_range): Bulletproof both
987 overloaded implementations against NULL expr->value.
988 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
989 values.
990 (c_parser_unary_expression): Likewise when handling addresses of
991 labels.
992 (c_parser_postfix_expression): Likewise for statement expressions,
993 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
994 __builtin_va_arg, and for __builtin_offset_of.
995 (c_parser_postfix_expression_after_paren_type): Initialize expr's
996 src_range using the range of the braced initializer.
997 (c_parser_transaction_expression): Set src_range for "ret" to a
998 sane pair of values.
999
1000 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
1001
1002 * c-parser.c (c_finish_omp_declare_simd): Look for
1003 "simd" attribute as well. Update error message.
1004
1005 2015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1006
1007 * c-parser.c (c_parser_omp_declare_target): Adjust.
1008
1009 2015-11-14 Jakub Jelinek <jakub@redhat.com>
1010
1011 * c-typeck.c (c_finish_omp_clauses): Don't mark
1012 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
1013
1014 2015-11-14 Marek Polacek <polacek@redhat.com>
1015
1016 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
1017 * c-typeck.c: Likewise.
1018
1019 2015-11-13 David Malcolm <dmalcolm@redhat.com>
1020
1021 * c-decl.c (warn_defaults_to): Pass line_table to
1022 rich_location ctor.
1023 * c-errors.c (pedwarn_c99): Likewise.
1024 (pedwarn_c90): Likewise.
1025 * c-parser.c (set_c_expr_source_range): New functions.
1026 (c_token::get_range): New method.
1027 (c_token::get_finish): New method.
1028 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
1029 based on the range from the start of the LHS to the end of the
1030 RHS.
1031 (c_parser_conditional_expression): Likewise, based on the range
1032 from the start of the cond.value to the end of exp2.value.
1033 (c_parser_binary_expression): Call set_c_expr_source_range on
1034 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
1035 (c_parser_cast_expression): Call set_c_expr_source_range on ret
1036 based on the cast_loc through to the end of the expr.
1037 (c_parser_unary_expression): Likewise, based on the
1038 op_loc through to the end of op.
1039 (c_parser_sizeof_expression) Likewise, based on the start of the
1040 sizeof token through to either the closing paren or the end of
1041 expr.
1042 (c_parser_postfix_expression): Likewise, using the token range,
1043 or from the open paren through to the close paren for
1044 parenthesized expressions.
1045 (c_parser_postfix_expression_after_primary): Likewise, for
1046 various kinds of expression.
1047 * c-tree.h (struct c_expr): Add field "src_range".
1048 (c_expr::get_start): New method.
1049 (c_expr::get_finish): New method.
1050 (set_c_expr_source_range): New decls.
1051 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
1052 on ret for prefix unary ops.
1053 (parser_build_binary_op): Likewise, running from the start of
1054 arg1.value through to the end of arg2.value.
1055
1056 2015-11-13 Marek Polacek <polacek@redhat.com>
1057
1058 PR c/68320
1059 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
1060
1061 2015-11-13 David Malcolm <dmalcolm@redhat.com>
1062
1063 * c-typeck.c: Include spellcheck.h.
1064 (lookup_field_fuzzy_find_candidates): New function.
1065 (lookup_field_fuzzy): New function.
1066 (build_component_ref): If the field was not found, try using
1067 lookup_field_fuzzy and potentially offer a suggestion.
1068
1069 2015-11-12 James Norris <jnorris@codesourcery.com>
1070 Joseph Myers <joseph@codesourcery.com>
1071
1072 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
1073 (c_parser_omp_clause_name): Handle 'device_resident' clause.
1074 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
1075 and PRAGMA_OMP_CLAUSE_LINK.
1076 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
1077 and PRAGMA_OACC_CLAUSE_LINK.
1078 (OACC_DECLARE_CLAUSE_MASK): New definition.
1079 (c_parser_oacc_declare): New function.
1080
1081 2015-11-12 Marek Polacek <polacek@redhat.com>
1082
1083 PR c/67784
1084 * c-parser.c (c_parser_for_statement): Reclassify the token in
1085 a correct scope.
1086
1087 2015-11-11 Marek Polacek <polacek@redhat.com>
1088
1089 PR c/68107
1090 PR c++/68266
1091 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
1092 checking the size of an array.
1093
1094 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
1095
1096 * c-array-notation.c: Remove unused header files.
1097 * c-aux-info.c: Likewise.
1098 * c-convert.c: Likewise.
1099 * c-decl.c: Likewise.
1100 * c-errors.c: Likewise.
1101 * c-lang.c: Likewise.
1102 * c-objc-common.c: Likewise.
1103 * c-parser.c: Likewise.
1104 * c-typeck.c: Likewise.
1105 * gccspec.c: Likewise.
1106
1107 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
1108 Cesar Philippidis <cesar@codesourcery.com>
1109 James Norris <jnorris@codesourcery.com>
1110 Julian Brown <julian@codesourcery.com>
1111 Nathan Sidwell <nathan@codesourcery.com>
1112
1113 c/
1114 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
1115 routine arg.
1116 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
1117 (c_parser_pragma): Parse 'acc routine'.
1118 (OACC_ROUTINE_CLAUSE_MARK): Define.
1119 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
1120
1121 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
1122
1123 PR debug/67192
1124 * c-typeck.c (c_finish_loop): For unconditional loops, set the
1125 location of the backward-goto to the start of the loop body.
1126
1127 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
1128
1129 PR debug/67192
1130 * c-parser.c (c_parser_while_statement): Finish the loop before
1131 parsing ahead for misleading indentation.
1132 (c_parser_for_statement): Likewise.
1133
1134 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
1135
1136 * c-decl.c (finish_struct): If the structure has reverse storage
1137 order, rewrite the type of array fields with scalar component. Call
1138 maybe_apply_pragma_scalar_storage_order on entry.
1139 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
1140 errors on bit-fields and reverse SSO here and not...
1141 (c_mark_addressable): ...here.
1142 (output_init_element): Adjust call to initializer_constant_valid_p.
1143 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
1144
1145 2015-11-06 David Malcolm <dmalcolm@redhat.com>
1146
1147 * c-decl.c (warn_defaults_to): Update for change in signature
1148 of diagnostic_set_info.
1149 * c-errors.c (pedwarn_c99): Likewise.
1150 (pedwarn_c90): Likewise.
1151 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
1152 for textinfo::set_location.
1153
1154 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
1155 Thomas Schwinge <thomas@codesourcery.com>
1156 James Norris <jnorris@codesourcery.com>
1157
1158 * c-parser.c (c_parser_omp_clause_name): Add support for
1159 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
1160 (c_parser_omp_clause_default): Add is_oacc argument. Handle
1161 default(none) in OpenACC.
1162 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
1163 arguments.
1164 (c_parser_oacc_clause_tile): New function.
1165 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
1166 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
1167 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
1168 TILE}.
1169 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
1170 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
1171 FIRSTPRIVATE}.
1172 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
1173 (c_parser_oacc_update): Update the error message for missing clauses.
1174 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
1175 and OMP_CLAUSE_INDEPENDENT.
1176
1177 2015-11-05 Marek Polacek <polacek@redhat.com>
1178
1179 PR c/68090
1180 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
1181 deal with pre-evaluation on invalid types.
1182
1183 2015-11-05 Jakub Jelinek <jakub@redhat.com>
1184 Ilya Verbin <ilya.verbin@intel.com>
1185
1186 * c-parser.c: Include context.h and gimple-expr.h.
1187 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
1188 monotonic together with nonmonotonic.
1189 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
1190 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
1191 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
1192 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
1193 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
1194 expressions on combined target teams before the target.
1195 (c_parser_omp_declare_target): If decl has "omp declare target" or
1196 "omp declare target link" attribute, and cgraph or varpool node already
1197 exists, then set corresponding flags. Call c_finish_omp_clauses
1198 in the parenthesized extended-list syntax case.
1199 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
1200 declare target.
1201 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
1202 on OMP_CLAUSE_REDUCTION array sections.
1203 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
1204 into the constant offset, or for variable low-bound using
1205 POINTER_PLUS_EXPR. For structure element based array sections use
1206 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
1207 (c_finish_omp_clauses): Drop generic_field_head, structure
1208 elements are now always mapped even as array section bases,
1209 diagnose same var in data sharing and mapping clauses. Diagnose if
1210 linear step on declare simd is neither a constant nor a uniform
1211 parameter. Look through POINTER_PLUS_EXPR for array section
1212 reductions. Diagnose the same var or function appearing multiple
1213 times on the same directive. Fix up wording for the to clause if t
1214 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
1215 modifier on kinds other than dynamic or guided or nonmonotonic
1216 modifier together with ordered clause.
1217
1218 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
1219 Chung-Lin Tang <cltang@codesourcery.com>
1220
1221 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
1222
1223 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
1224
1225 * c-array-notation.c: Reorder #include's and remove duplicates.
1226 * c-aux-info.c: Likewise.
1227 * c-convert.c: Likewise.
1228 * c-decl.c: Likewise.
1229 * c-errors.c: Likewise.
1230 * c-lang.c: Likewise.
1231 * c-objc-common.c: Likewise.
1232 * c-parser.c: Likewise.
1233 * c-typeck.c: Likewise.
1234
1235 2015-10-26 Jim Wilson <jim.wilson@linaro.org>
1236
1237 PR debug/66068
1238 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
1239 after calling build_qualified_type.
1240
1241 2015-10-27 Cesar Philippidis <cesar@codesourcery.com>
1242 Thomas Schwinge <thomas@codesourcery.com>
1243 James Norris <jnorris@codesourcery.com>
1244 Joseph Myers <joseph@codesourcery.com>
1245 Julian Brown <julian@codesourcery.com>
1246 Bernd Schmidt <bschmidt@redhat.com>
1247
1248 * c-parser.c (c_parser_oacc_shape_clause): New.
1249 (c_parser_oacc_simple_clause): New.
1250 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
1251 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
1252
1253 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
1254 James Norris <jnorris@codesourcery.com>
1255 Cesar Philippidis <cesar@codesourcery.com>
1256
1257 PR c/64765
1258 PR c/64880
1259 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
1260 parameters, and handle these. Adjust all users.
1261 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
1262 into...
1263 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
1264 all users.
1265 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
1266 declare functions.
1267 (c_finish_omp_construct): Declare function.
1268 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
1269 Merge functions into...
1270 (c_finish_omp_construct): ... this new function.
1271
1272 2015-10-22 Richard Biener <rguenther@suse.de>
1273
1274 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
1275 before folding a MINUS_EXPR.
1276
1277 2015-10-21 Marek Polacek <polacek@redhat.com>
1278
1279 PR c/68024
1280 * c-decl.c (start_function): Warn about vararg functions without
1281 a prototype.
1282
1283 2015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
1284
1285 * c-typeck.c (build_conditional_expr): Use boolean vector
1286 type for vector comparison.
1287 (build_vec_cmp): New.
1288 (build_binary_op): Use build_vec_cmp for comparison.
1289
1290 2015-10-20 Marek Polacek <polacek@redhat.com>
1291
1292 * c-parser.c (is_cilkplus_vector_p): Don't define here.
1293
1294 2015-10-20 Marek Polacek <polacek@redhat.com>
1295
1296 PR c/67964
1297 * c-parser.c (c_parser_attributes): Break out of the loop if the
1298 token after an attribute isn't a comma.
1299
1300 2015-10-13 Jakub Jelinek <jakub@redhat.com>
1301 Aldy Hernandez <aldyh@redhat.com>
1302
1303 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
1304 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
1305 (c_parser_omp_variable_list): Handle structure elements for
1306 map, to and from clauses. Handle array sections in reduction
1307 clause. Formatting fixes.
1308 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
1309 if clause modifiers.
1310 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
1311 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
1312 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
1313 c_parser_omp_clause_is_device_ptr): New functions.
1314 (c_parser_omp_clause_ordered): Parse optional parameter.
1315 (c_parser_omp_clause_reduction): Handle array reductions.
1316 (c_parser_omp_clause_schedule): Parse optional simd modifier.
1317 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
1318 functions.
1319 (c_parser_omp_clause_linear): Parse linear clause modifiers.
1320 (c_parser_omp_clause_depend_sink): New function.
1321 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
1322 (c_parser_omp_clause_map): Parse release/delete map kinds and
1323 optional always modifier.
1324 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
1325 and c_finish_omp_clauses callers.
1326 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
1327 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
1328 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
1329 (OMP_CRITICAL_CLAUSE_MASK): Define.
1330 (c_parser_omp_critical): Parse critical clauses.
1331 (c_parser_omp_for_loop): Handle doacross loops, adjust
1332 c_finish_omp_for and c_finish_omp_clauses callers.
1333 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
1334 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
1335 (OMP_FOR_CLAUSE_MASK): Add linear clause.
1336 (c_parser_omp_for): Disallow ordered clause when combined with
1337 distribute. Disallow linear clause when combined with distribute
1338 and not combined with simd.
1339 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
1340 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
1341 parse clauses and if depend clause is found, don't parse a body.
1342 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
1343 Allow target parallel without for after it.
1344 (OMP_TASK_CLAUSE_MASK): Add priority clause.
1345 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
1346 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
1347 invalid kinds.
1348 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
1349 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
1350 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
1351 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
1352 functions.
1353 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
1354 defaultmap and is_device_ptr clauses.
1355 (c_parser_omp_target): Parse target parallel and target simd. Set
1356 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
1357 and target exit data. Diagnose invalid map kinds.
1358 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
1359 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
1360 construct.
1361 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
1362 &omp_priv.
1363 (OMP_TASKLOOP_CLAUSE_MASK): Define.
1364 (c_parser_omp_taskloop): New function.
1365 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
1366 handle PRAGMA_OMP_TASKLOOP.
1367 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
1368 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
1369 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
1370 Add IS_OMP argument, handle structure element bases, diagnose
1371 bitfields, pass IS_OMP recursively, diagnose known zero length
1372 array sections in depend clauses, handle array sections in reduction
1373 clause, diagnose negative length even for pointers.
1374 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
1375 types, pass IS_OMP down to handle_omp_array_sections_1, handle
1376 array sections in reduction clause, set
1377 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
1378 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
1379 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
1380 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
1381
1382 2015-10-06 Marek Polacek <polacek@redhat.com>
1383
1384 * c-parser.c (c_parser_statement_after_labels): Use
1385 protected_set_expr_location.
1386 (c_parser_omp_clause_num_gangs): Likewise.
1387 (c_parser_omp_clause_num_threads): Likewise.
1388 (c_parser_omp_clause_num_workers): Likewise.
1389 (c_parser_omp_clause_vector_length): Likewise.
1390 (c_parser_omp_clause_num_teams): Likewise.
1391 (c_parser_omp_clause_thread_limit): Likewise.
1392 * c-typeck.c (build_c_cast): Likewise.
1393 (c_cast_expr): Likewise.
1394
1395 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
1396
1397 * c-typeck.c (c_tree_equal): Use real_equal instead of
1398 REAL_VALUES_EQUAL.
1399
1400 2015-10-04 Jason Merrill <jason@redhat.com>
1401
1402 * c-parser.c (c_lex_one_token): Handle @synchronized.
1403 * c-decl.c (match_builtin_function_types): A declaration of a built-in
1404 can change whether the function is transaction_safe.
1405
1406 2015-10-02 Marek Polacek <polacek@redhat.com>
1407
1408 PR c/67730
1409 * c-typeck.c (convert_for_assignment): Use the expansion point
1410 location throughout.
1411
1412 2015-10-02 Marek Polacek <polacek@redhat.com>
1413
1414 PR c/64249
1415 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
1416 and pass it down to c_parser_if_statement.
1417 (c_parser_else_body): Add CHAIN parameter and pass it down to
1418 c_parser_statement_after_labels.
1419 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
1420 duplicated if-else-if conditions.
1421
1422 2015-10-01 Marek Polacek <polacek@redhat.com>
1423
1424 * c-typeck.c (convert_for_assignment): Improve commentary.
1425
1426 2015-09-30 Marek Polacek <polacek@redhat.com>
1427
1428 PR c/67730
1429 * c-typeck.c (c_finish_return): Use the expansion point location for
1430 certain "return with value" warnings.
1431
1432 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
1433
1434 * c-parser.c (pragma_lex): Add loc argument.
1435
1436 2015-09-15 Marek Polacek <polacek@redhat.com>
1437
1438 PR c/67580
1439 * c-decl.c (tag_exists_p): New function.
1440 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
1441 struct/union/enum keywords are missing.
1442 * c-tree.h (tag_exists_p): Declare.
1443
1444 2015-09-15 Marek Polacek <polacek@redhat.com>
1445
1446 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
1447 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
1448 Return NULL_TREE instead of 0.
1449 (lookup_name): Return NULL_TREE instead of 0.
1450 (lookup_name_in_scope): Likewise.
1451 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
1452 (parser_xref_tag): Use false instead of 0.
1453 (start_struct): Use true instead of 1.
1454 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
1455
1456 2015-09-14 Marek Polacek <polacek@redhat.com>
1457
1458 * c-typeck.c (set_nonincremental_init_from_string): Use
1459 HOST_WIDE_INT_M1U when shifting a negative value.
1460
1461 2015-09-09 Mark Wielaard <mjw@redhat.com>
1462
1463 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
1464 parm against NULL.
1465
1466 2015-09-10 Jakub Jelinek <jakub@redhat.com>
1467
1468 PR c/67502
1469 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
1470 into OMP_FOR_PRE_BODY rather than before the loop.
1471
1472 2015-09-09 Jakub Jelinek <jakub@redhat.com>
1473
1474 PR c/67501
1475 * c-parser.c (c_parser_oacc_all_clauses,
1476 c_parser_omp_all_clauses): Remove invalid clause from
1477 list of clauses even if parser->error is set.
1478
1479 PR c/67500
1480 * c-parser.c (c_parser_omp_clause_aligned,
1481 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
1482 test for errors.
1483 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
1484 error_mark_node.
1485
1486 PR c/67495
1487 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
1488 instead of c_parser_unary_expression. If the result is !lvalue_p,
1489 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
1490
1491 2015-09-04 Marek Polacek <polacek@redhat.com>
1492
1493 PR sanitizer/67279
1494 * c-typeck.c (build_binary_op): Don't instrument static initializers.
1495
1496 2015-09-03 Martin Sebor <msebor@redhat.com>
1497
1498 PR c/66516
1499 * c-typeck.c (convert_arguments, parser_build_unary_op,
1500 build_conditional_expr, c_cast_expr, convert_for_assignment,
1501 build_binary_op, _objc_common_truthvalue_conversion): Call
1502 reject_gcc_builtin.
1503 (c_decl_implicit): Define.
1504
1505 2015-09-02 Marek Polacek <polacek@redhat.com>
1506
1507 PR c/67432
1508 * c-parser.c (c_parser_enum_specifier): Give a better error for
1509 an empty enum.
1510
1511 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
1512
1513 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
1514
1515 2015-08-12 Marek Polacek <polacek@redhat.com>
1516
1517 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
1518 LOC to it.
1519
1520 2015-08-03 Marek Polacek <polacek@redhat.com>
1521
1522 PR c/67088
1523 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
1524 Use it.
1525 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
1526
1527 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
1528
1529 * c-parser.c (c_parser_if_body): Take token_indent_info
1530 argument. Call warn_for_misleading_indentation even when the
1531 body is a semicolon. Extract token_indent_infos corresponding
1532 to the guard, body and next tokens. Adjust call to
1533 warn_for_misleading_indentation accordingly.
1534 (c_parser_else_body): Likewise.
1535 (c_parser_if_statement): Likewise.
1536 (c_parser_while_statement): Likewise.
1537 (c_parser_for_statement): Likewise.
1538
1539 2015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
1540 Manuel López-Ibáñez <manu@gcc.gnu.org>
1541
1542 * c-decl.c (get_parm_info): Remove static var. Update warning
1543 message.
1544
1545 2015-07-27 Marek Polacek <polacek@redhat.com>
1546
1547 PR c++/66555
1548 PR c/54979
1549 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
1550
1551 2015-07-20 Marek Polacek <polacek@redhat.com>
1552
1553 PR c++/55095
1554 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
1555 (build_binary_op): Warn about left shift overflows.
1556
1557 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
1558
1559 * c-array-notation.c: Adjust includes for flags.h changes.
1560 * c-objc-common.c: Likewise.
1561
1562 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
1563
1564 * c-array-notation.c: Adjust includes.
1565 * c-aux-info.c: Likewise.
1566 * c-convert.c: Likewise.
1567 * c-decl.c: Likewise.
1568 * c-errors.c: Likewise.
1569 * c-lang.c: Likewise.
1570 * c-objc-common.c: Likewise.
1571 * c-parser.c: Likewise.
1572 * c-typeck.c: Likewise.
1573
1574 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
1575
1576 PR fortran/66605
1577 * c-decl.c (finish_function): Call do_warn_unused_parameter.
1578
1579 2015-06-29 Marek Polacek <polacek@redhat.com>
1580
1581 PR c/66322
1582 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
1583 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
1584 about -Wswitch-bool here.
1585 (do_case): Update c_add_case_label call.
1586 (c_finish_case): Update c_do_switch_warnings call.
1587
1588 2015-06-27 Marek Polacek <polacek@redhat.com>
1589
1590 * c-typeck.c: Use VECTOR_TYPE_P throughout.
1591
1592 2015-06-26 Marek Polacek <polacek@redhat.com>
1593
1594 * c-array-notation.c (fix_builtin_array_notation_fn): Use
1595 INDIRECT_REF_P.
1596 * c-typeck.c (array_to_pointer_conversion): Likewise.
1597 (build_unary_op): Likewise.
1598 (c_finish_return): Likewise.
1599
1600 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
1601
1602 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
1603 * c-parser.c: Likewise.
1604
1605 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
1606
1607 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
1608 instead of pointer_hash.
1609 (detect_field_duplicates): Likewise.
1610
1611 2015-06-25 Marek Polacek <polacek@redhat.com>
1612
1613 * c-array-notation.c: Use VAR_P throughout.
1614 * c-decl.c: Likewise.
1615 * c-objc-common.c: Likewise.
1616 * c-parser.c: Likewise.
1617 * c-typeck.c: Likewise.
1618
1619 2015-06-25 Marek Polacek <polacek@redhat.com>
1620
1621 * c-decl.c: Use is_global_var throughout.
1622 * c-parser.c: Likewise.
1623 * c-typeck.c: Likewise.
1624
1625 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
1626
1627 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
1628 * c-aux-info.c: Likewise.
1629 * c-convert.c: Likewise.
1630 * c-decl.c: Likewise.
1631 * c-errors.c: Likewise.
1632 * c-lang.c: Likewise.
1633 * c-objc-common.c: Likewise.
1634 * c-parser.c: Likewise.
1635 * c-typeck.c: Likewise.
1636
1637 2015-06-11 Jan Hubicka <hubicka@ucw.cz>
1638
1639 PR middle-end/66325
1640 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
1641 variants.
1642
1643 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
1644
1645 * c-decl.c (pop_scope): Register the main translation unit
1646 through the new debug hook.
1647
1648 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
1649
1650 * c-array-notation.c : Adjust include files.
1651 * c-aux-info.c : Likewise.
1652 * c-convert.c : Likewise.
1653 * c-decl.c : Likewise.
1654 * c-errors.c : Likewise.
1655 * c-lang.c : Likewise.
1656 * c-lang.h : Likewise.
1657 * c-objc-common.c : Likewise.
1658 * c-parser.c : Likewise.
1659 * c-typeck.c : Likewise.
1660
1661 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
1662
1663 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
1664 immediately clobber it.
1665 (c_write_global_declarations_1): Remove call to
1666 check_global_declaration_1.
1667 (c_write_global_declarations_2): Remove.
1668 (c_write_final_cleanups): Rename from c_write_global_declarations.
1669 Remove call to finalize_compilation_unit.
1670 Remove calls to debugging hooks.
1671 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
1672 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
1673 * c-tree.h: Remove c_write_global_declarations.
1674
1675 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
1676
1677 * c-array-notation.c: Adjust includes for restructured coretypes.h.
1678 * c-aux-info.c: Likewise.
1679 * c-convert.c: Likewise.
1680 * c-decl.c: Likewise.
1681 * c-errors.c: Likewise.
1682 * c-lang.c: Likewise.
1683 * c-objc-common.c: Likewise.
1684 * c-parser.c: Likewise.
1685 * c-typeck.c: Likewise.
1686
1687 2015-06-04 Marek Polacek <polacek@redhat.com>
1688
1689 PR c/66341
1690 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
1691 it is a lvalue.
1692
1693 2015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1694
1695 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
1696 Warn for empty struct.
1697 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
1698
1699 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
1700
1701 * c-decl.c (start_function): Call plugin before parsing.
1702 (finish_function): Call plugin after parsing.
1703
1704 2015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1705
1706 PR c/49551
1707 * c-decl.c (merge_decls): Merge DECL_COMMON.
1708
1709 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
1710
1711 * Make-lang.in (check_gcc_pallelize): Define.
1712
1713 2015-05-22 Marek Polacek <polacek@redhat.com>
1714
1715 PR c/47043
1716 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
1717 attributes.
1718
1719 2015-05-21 Marek Polacek <polacek@redhat.com>
1720
1721 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
1722 DECL_BUILT_IN.
1723
1724 2015-05-20 Marek Polacek <polacek@redhat.com>
1725
1726 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
1727 * c-typeck.c: Likewise.
1728
1729 2015-05-19 Marek Polacek <polacek@redhat.com>
1730
1731 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
1732
1733 2015-05-19 Jakub Jelinek <jakub@redhat.com>
1734
1735 PR middle-end/66199
1736 * c-parser.c (c_parser_omp_for_loop): Don't add
1737 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
1738 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
1739 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
1740 constructs.
1741
1742 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
1743
1744 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
1745 swaps.
1746
1747 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
1748
1749 PR fortran/44054
1750 * c-objc-common.c (c_tree_printer): Replace locus pointer with
1751 accessor function.
1752
1753 2015-05-14 Marek Polacek <polacek@redhat.com>
1754
1755 PR c/66066
1756 PR c/66127
1757 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
1758 rather than with 0.
1759
1760 2015-05-12 David Malcolm <dmalcolm@redhat.com>
1761
1762 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
1763 to add a call to warn_for_misleading_indentation.
1764 (c_parser_else_body): Likewise, adding param "else_loc".
1765 (c_parser_if_statement): Check for misleading indentation.
1766 (c_parser_while_statement): Likewise.
1767 (c_parser_for_statement): Likewise.
1768
1769 2015-05-08 Marek Polacek <polacek@redhat.com>
1770
1771 PR c/64918
1772 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
1773 (output_init_element): Likewise.
1774
1775 2015-05-07 Marek Polacek <polacek@redhat.com>
1776
1777 PR c/65179
1778 * c-typeck.c (build_binary_op): Warn when left shifting a negative
1779 value.
1780
1781 2015-04-30 Marek Polacek <polacek@redhat.com>
1782
1783 * c-typeck.c (set_init_label): Call error_at instead of error and
1784 pass LOC to it.
1785
1786 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
1787 the type of a decl.
1788
1789 * c-typeck.c (c_build_va_arg): Clarify the error message.
1790
1791 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
1792
1793 * c-parser.c (c_parser_oacc_enter_exit_data): Use
1794 OMP_STANDALONE_CLAUSES.
1795
1796 2015-04-28 Marek Polacek <polacek@redhat.com>
1797
1798 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
1799
1800 2015-04-28 Marek Polacek <polacek@redhat.com>
1801
1802 PR c/65901
1803 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
1804
1805 2015-04-25 Marek Polacek <polacek@redhat.com>
1806
1807 PR c/52085
1808 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
1809 attribute.
1810
1811 2015-04-23 Marek Polacek <polacek@redhat.com>
1812
1813 PR c/65345
1814 * c-decl.c (set_labels_context_r): New function.
1815 (store_parm_decls): Call it via walk_tree_without_duplicates.
1816 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
1817 instead of create_tmp_var. Build TARGET_EXPR instead of
1818 COMPOUND_EXPR.
1819 (build_atomic_assign): Use create_tmp_var_raw instead of
1820 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
1821
1822 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
1823
1824 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
1825 (c_parser_omp_target_update): Add missed %> to error_at ().
1826
1827 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
1828
1829 PR target/55143
1830 * c-decl.c (c_default_pointer_mode): Remove definition.
1831 * c-tree.h (c_default_pointer_mode): Remove declaration.
1832
1833 2015-03-27 Tobias Burnus <burnus@net-b.de>
1834
1835 PR c/65586
1836 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
1837 error out.
1838 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
1839 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
1840 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
1841
1842 2015-03-19 Jakub Jelinek <jakub@redhat.com>
1843
1844 * c-decl.c (c_decl_attributes): Also add "omp declare target"
1845 attribute for DECL_EXTERNAL VAR_DECLs.
1846
1847 2015-03-11 Jakub Jelinek <jakub@redhat.com>
1848
1849 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
1850 argument.
1851
1852 2015-03-10 Jakub Jelinek <jakub@redhat.com>
1853
1854 PR c/65120
1855 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
1856 before preparing arguments to warn_logical_not_parentheses.
1857
1858 2015-03-09 Jakub Jelinek <jakub@redhat.com>
1859
1860 PR c/65120
1861 * c-typeck.c (parser_build_binary_op): Don't warn for
1862 !!x == y or !b == y where b is _Bool.
1863
1864 2015-03-09 Marek Polacek <polacek@redhat.com>
1865
1866 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
1867 * c-decl.c (grokdeclarator): Likewise.
1868 * c-typeck.c (build_binary_op): Likewise.
1869
1870 2015-02-27 Marek Polacek <polacek@redhat.com>
1871
1872 PR c/65228
1873 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
1874
1875 2015-02-14 Marek Polacek <polacek@redhat.com>
1876
1877 PR c/64768
1878 * c-decl.c (grokdeclarator): Set the range of a flexible array member
1879 declared through a typedef name.
1880
1881 2015-02-13 Marek Polacek <polacek@redhat.com>
1882
1883 PR c/65050
1884 * c-decl.c (grokdeclarator): Print also the type when giving
1885 the error message about array's incomplete element type.
1886
1887 2015-02-11 Jakub Jelinek <jakub@redhat.com>
1888
1889 PR c/64824
1890 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
1891 check in the POP macro.
1892
1893 2015-02-09 Marek Polacek <polacek@redhat.com>
1894
1895 PR c/64856
1896 * c-typeck.c (process_init_element): Don't always wrap
1897 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
1898 initializing a range of elements.
1899
1900 2015-02-04 Jakub Jelinek <jakub@redhat.com>
1901
1902 PR c/64824
1903 PR c/64868
1904 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
1905
1906 2015-02-02 Bruno Loff <bruno.loff@gmail.com>
1907
1908 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
1909 processing enum declaration.
1910
1911 2015-01-29 Marek Polacek <polacek@redhat.com>
1912
1913 PR c/64709
1914 * c-typeck.c (pop_init_level): If constructor_elements has
1915 exactly one element with integer_zerop value, set constructor_zeroinit
1916 to 1. Remove braces around warning_init call.
1917
1918 2015-01-27 Jakub Jelinek <jakub@redhat.com>
1919
1920 PR c/64766
1921 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
1922 of FUNCTION_DECLs with error_mark_node.
1923
1924 2015-01-26 Jakub Jelinek <jakub@redhat.com>
1925
1926 PR c/64778
1927 * c-typeck.c (convert_arguments): Return -1 if there are
1928 error_args, even if we've diagnosed too many arguments.
1929
1930 2015-01-21 Richard Biener <rguenther@suse.de>
1931
1932 PR middle-end/64313
1933 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
1934 for builtins the user declared correctly.
1935
1936 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
1937 Bernd Schmidt <bernds@codesourcery.com>
1938 Cesar Philippidis <cesar@codesourcery.com>
1939 James Norris <jnorris@codesourcery.com>
1940 Jakub Jelinek <jakub@redhat.com>
1941 Ilmir Usmanov <i.usmanov@samsung.com>
1942
1943 * c-parser.c: Include "gomp-constants.h".
1944 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
1945 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
1946 Use OMP_CLAUSE_SET_MAP_KIND.
1947 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
1948 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
1949 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
1950 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
1951 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
1952 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
1953 "copyout", "create", "delete", "deviceptr", "gang", "host",
1954 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
1955 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
1956 "present_or_create", "pcreate", "seq", "self", "vector",
1957 "vector_length", "wait", "worker".
1958 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
1959 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
1960 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
1961 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
1962 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
1963 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
1964 (c_parser_oacc_data_clause_deviceptr)
1965 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
1966 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
1967 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
1968 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
1969 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
1970 (c_parser_oacc_parallel, c_parser_oacc_update)
1971 (c_parser_oacc_wait): New functions.
1972 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
1973 (c_finish_oacc_data): New prototypes.
1974 * c-typeck.c: Include "gomp-constants.h".
1975 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
1976 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
1977 OMP_CLAUSE_SET_MAP_KIND.
1978 (c_finish_oacc_parallel, c_finish_oacc_kernels)
1979 (c_finish_oacc_data): New functions.
1980 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
1981 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
1982 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
1983 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
1984 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
1985 GOMP_MAP_FORCE_DEVICEPTR.
1986
1987 2015-01-09 Michael Collison <michael.collison@linaro.org>
1988
1989 * c-array-notation.c: Include hash-set.h, machmode.h,
1990 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
1991 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
1992 * c-aux-info.c: Ditto.
1993 * c-convert.c: Ditto.
1994 * c-decl.c: Ditto.
1995 * c-errors.c: Ditto.
1996 * c-lang.c: Dittoxs.
1997 * c-objc-common.c: Ditto.
1998 * c-parser.c: Ditto.
1999 * c-typeck.c: Include hash-set.h, machmode.h,
2000 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2001 fold-const.h, wide-int.h, inchash.h, real.h and
2002 fixed-value.h due to flattening of tree.h.
2003
2004 2015-01-07 Marek Polacek <polacek@redhat.com>
2005
2006 PR c/64417
2007 * c-typeck.c (process_init_element): Disallow initialization of
2008 a flexible array member with a string constant if the structure
2009 is in an array.
2010
2011 2015-01-05 Jakub Jelinek <jakub@redhat.com>
2012
2013 PR sanitizer/64344
2014 * c-typeck.c (convert_for_assignment, c_finish_return): For
2015 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
2016 types also set in_late_binary_op around convert call.
2017 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
2018 to integral type casts, if not in_late_binary_op, pass c_fully_fold
2019 result on expr as last argument to ubsan_instrument_float_cast,
2020 if in_late_binary_op, don't use c_save_expr but save_expr.
2021
2022 Update copyright years.
2023
2024 2015-01-05 Marek Polacek <polacek@redhat.com>
2025
2026 PR c/64423
2027 * c-typeck.c (build_array_ref): Pass loc down to
2028 warn_array_subscript_with_type_char.
2029
2030 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
2031
2032 * c-typeck.c: New behavious for pointers to arrays with qualifiers
2033 (common-pointer-type): For pointers to arrays take qualifiers from
2034 element type.
2035 (build_conditional_expr): Add warnings for lost qualifiers.
2036 (comp-target-types): Allow pointers to arrays with different qualifiers.
2037 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
2038 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
2039 to PEDWARN_FOR_QUALIFIERS.
2040
2041 2014-12-17 Jakub Jelinek <jakub@redhat.com>
2042
2043 PR sanitizer/64289
2044 * c-convert.c: Include ubsan.h.
2045 (convert): For real -> integral casts and
2046 -fsanitize=float-cast-overflow don't call convert_to_integer, but
2047 instead instrument the float cast directly.
2048
2049 2014-11-29 Jakub Jelinek <jakub@redhat.com>
2050
2051 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
2052 c_finish_stmt_expr): Remove NULL last argument from
2053 create_tmp_var_raw and create_tmp_var calls.
2054 * c-array-notation.c (fix_builtin_array_notation_fn,
2055 build_array_notation_expr, fix_conditional_array_notations_1,
2056 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
2057
2058 2014-11-28 Marek Polacek <polacek@redhat.com>
2059
2060 PR c/63862
2061 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
2062 convert the right operand to integer type.
2063
2064 2014-11-25 Marek Polacek <polacek@redhat.com>
2065
2066 PR c/63877
2067 * c-decl.c (start_function): Disable -Wmissing-declarations warning
2068 for inline functions.
2069
2070 2014-11-21 Jakub Jelinek <jakub@redhat.com>
2071
2072 PR target/63764
2073 * c-typeck.c (build_array_ref): Adjust
2074 convert_vector_to_pointer_for_subscript caller. If it returns true,
2075 call non_lvalue_loc on the result.
2076
2077 2014-11-11 Richard Biener <rguenther@suse.de>
2078
2079 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
2080 to true.
2081
2082 2014-11-10 Andi Kleen <ak@linux.intel.com>
2083
2084 PR c/60804
2085 * c-parser.c (c_parser_statement_after_labels): Call
2086 check_no_cilk.
2087 (c_parser_if_statement): Dito.
2088 (c_parser_switch_statement): Dito.
2089 (c_parser_while_statement): Dito.
2090 (c_parser_do_statement): Dito.
2091 (c_parser_for_statement): Dito.
2092 * c-typeck.c (c_finish_loop): Dito.
2093
2094 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
2095
2096 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
2097 OPT_Wshift_count_overflow in the warnings.
2098
2099 2014-10-30 Marek Polacek <polacek@redhat.com>
2100
2101 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
2102 print the stripped version as well, if they're not the same.
2103
2104 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
2105
2106 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
2107 machine_mode.
2108
2109 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
2110
2111 * c-decl.c: Adjust include files.
2112 * c-parser.c: Ditto.
2113
2114 2014-10-27 Phil Muldoon <pmuldoon@redhat.com>
2115 Tom Tromey <tromey@redhat.com>
2116
2117 * c-tree.h (enum c_oracle_request): New.
2118 (c_binding_oracle_function): New typedef.
2119 (c_binding_oracle, c_pushtag, c_bind): Declare.
2120 * c-decl.c (c_binding_oracle): New global.
2121 (I_SYMBOL_CHECKED): New macro.
2122 (i_symbol_binding): New function.
2123 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
2124 (I_TAG_CHECKED): New macro.
2125 (i_tag_binding): New function.
2126 (I_TAG_BINDING, I_TAG_DECL): Redefine.
2127 (I_LABEL_CHECKED): New macro.
2128 (i_label_binding): New function.
2129 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
2130 (c_print_identifier): Save and restore c_binding_oracle.
2131 (c_pushtag, c_bind): New functions.
2132
2133 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
2134
2135 * c-typeck.c: Adjust include files.
2136
2137 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
2138
2139 PR c++/53061
2140 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
2141 initialization here...
2142 (c_initialize_diagnostics): ... but here. Set defaults after
2143 building pretty-printer.
2144
2145 2014-10-23 Marek Polacek <polacek@redhat.com>
2146
2147 PR c/63626
2148 * c-decl.c (pop_scope): Don't print warning in external_scope.
2149
2150 2014-10-19 Marek Polacek <polacek@redhat.com>
2151
2152 PR c/63567
2153 * c-typeck.c (output_init_element): Allow initializing objects with
2154 static storage duration with compound literals even in C99 and add
2155 pedwarn for it.
2156
2157 2014-10-17 Marek Polacek <polacek@redhat.com>
2158
2159 PR c/63567
2160 * c-typeck.c (digest_init): Allow initializing objects with static
2161 storage duration with compound literals even in C99 and add pedwarn
2162 for it.
2163
2164 2014-10-17 Marek Polacek <polacek@redhat.com>
2165
2166 PR c/63543
2167 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
2168 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
2169 error multiple times. Print the type.
2170
2171 2014-10-17 Marek Polacek <polacek@redhat.com>
2172
2173 PR c/63549
2174 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
2175 type.
2176
2177 2014-10-17 Marek Polacek <polacek@redhat.com>
2178
2179 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
2180 (start_function): Use OPT_Wimplicit_int instead of 0.
2181 (store_parm_decls_oldstyle): Likewise.
2182
2183 2014-10-17 Alan Modra <amodra@gmail.com>
2184
2185 PR middle-end/61848
2186 * c-decl.c (merge_decls): Don't merge section name or tls model
2187 to newdecl symtab node, instead merge to olddecl. Override
2188 existing olddecl section name. Set tls_model for all thread-local
2189 vars, not just OMP thread-private ones. Remove incorrect comment.
2190
2191 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
2192
2193 * c-decl.c: Adjust include files.
2194
2195 2014-10-14 DJ Delorie <dj@redhat.com>
2196
2197 * c-parser.c (c_parse_init): Add RID entries for each __intN.
2198 (c_token_starts_typename): Check all __intN, not just __int128.
2199 (c_token_starts_declspecs): Likewise.
2200 (c_parser_declspecs): Likewise.
2201 (c_parser_attribute_any_word): Likewise.
2202 (c_parser_objc_selector): Likewise.
2203 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
2204 (struct c_declspecs): Add int_n_idx field to record *which* __intN
2205 is specified.
2206 * c-decl.c (declspecs_add_type): Check for all __intN, not just
2207 __int128.
2208 (finish_declspecs): Likewise.
2209
2210 2014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
2211
2212 * c-parser.c (c_parser_all_labels): New function to replace
2213 the duplicate code.
2214 (c_parser_statement): Call the new function.
2215
2216 2014-10-09 Marek Polacek <polacek@redhat.com>
2217
2218 PR c/63480
2219 * c-typeck.c (pop_init_level): Don't warn about initializing
2220 with { }.
2221
2222 2014-10-07 Marek Polacek <polacek@redhat.com>
2223
2224 PR c/59717
2225 * c-decl.c (header_for_builtin_fn): New function.
2226 (implicitly_declare): Suggest which header to include.
2227
2228 2014-10-07 Marek Polacek <polacek@redhat.com>
2229
2230 * c-convert.c (convert): Use error_operand_p.
2231 * c-typeck.c (require_complete_type): Likewise.
2232 (really_atomic_lvalue): Likewise.
2233 (digest_init): Likewise.
2234 (handle_omp_array_sections_1): Likewise.
2235
2236 2014-10-03 Marek Polacek <polacek@redhat.com>
2237
2238 PR c/63453
2239 * c-decl.c (pop_scope): Don't warn about "inline function declared
2240 but never defined" for functions marked with gnu_inline attribute.
2241
2242 2014-09-25 Jakub Jelinek <jakub@redhat.com>
2243
2244 PR c++/63249
2245 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
2246 on low_bound and length.
2247
2248 2014-09-24 Marek Polacek <polacek@redhat.com>
2249
2250 PR c/61405
2251 PR c/53874
2252 * c-parser.c: Don't define CPP_KEYWORD.
2253 (c_parser_switch_statement): Pass original type to c_finish_case.
2254 * c-tree.h (c_finish_case): Update declaration.
2255 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
2256 conditionally to c_do_switch_warnings.
2257
2258 2014-09-03 Marek Polacek <polacek@redhat.com>
2259
2260 PR c/62024
2261 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
2262 conversions.
2263
2264 2014-09-02 Jakub Jelinek <jakub@redhat.com>
2265 Balaji V. Iyer <balaji.v.iyer@intel.com>
2266 Igor Zamyatin <igor.zamyatin@intel.com>
2267
2268 * c-parser.c (c_parser_cilk_for): New function.
2269 (c_parser_cilk_grainsize): Likewise.
2270 (c_get_temp_regvar): Likewise.
2271 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
2272 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
2273 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
2274 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
2275 case.
2276
2277 2014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
2278
2279 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
2280 with using HOST_WIDE_INT without truncation to 'int'
2281
2282 2014-08-22 Marek Polacek <polacek@redhat.com>
2283
2284 PR c++/62199
2285 * c-typeck.c (parser_build_binary_op): Adjust call to
2286 warn_logical_not_parentheses.
2287
2288 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
2289
2290 PR other/62008
2291 * c-parser.c (c_parser_array_notation): Check for correct
2292 type of an array added.
2293
2294 2014-08-19 Marek Polacek <polacek@redhat.com>
2295
2296 PR c++/62153
2297 * c-typeck.c (build_binary_op): If either operand of a comparison
2298 is a boolean expression, call maybe_warn_bool_compare.
2299
2300 2014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
2301
2302 PR c/45584
2303 * c-typeck.c (build_c_cast): Do a conversion even when the
2304 TYPE_MAIN_VARIANTs are the same.
2305
2306 2014-08-19 Marek Polacek <polacek@redhat.com>
2307
2308 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
2309 pedwarn_c99 instead of pedwarn.
2310 (grokfield): Likewise.
2311 (warn_defaults_to): New function.
2312 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
2313 Unconditionally call pedwarn_c99 instead of pedwarn.
2314 (start_function): Call warn_defaults_to instead of pedwarn_c99.
2315 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
2316 check flag_isoc11 before.
2317 * c-errors.c (pedwarn_c99): Change the return type to bool.
2318 Handle -Wc99-c11-compat.
2319 * c-parser.c (disable_extension_diagnostics): Handle
2320 warn_c99_c11_compat.
2321 (restore_extension_diagnostics): Likewise.
2322 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
2323 instead of pedwarn, don't check flag_isoc11 before.
2324 (c_parser_declspecs): Likewise.
2325 (c_parser_alignas_specifier): Likewise.
2326 (c_parser_alignof_expression): Likewise.
2327 (c_parser_generic_selection): Likewise.
2328 * c-tree.h (pedwarn_c99): Update declaration.
2329 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
2330 of pedwarn_c99.
2331
2332 2014-08-19 Marek Polacek <polacek@redhat.com>
2333
2334 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
2335 to pedwarn_c90.
2336 * c-errors.c: Include "opts.h".
2337 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
2338 * c-parser.c (disable_extension_diagnostics): Handle negative value
2339 of warn_c90_c99_compat, too.
2340 (restore_extension_diagnostics): Likewise.
2341 (c_parser_compound_statement_nostart): Pass
2342 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
2343
2344 2014-08-12 Marek Polacek <polacek@redhat.com>
2345
2346 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
2347 Add pedwarn.
2348 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
2349 Likewise.
2350 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
2351
2352 2014-08-10 Marek Polacek <polacek@redhat.com>
2353
2354 PR c/51849
2355 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
2356 Call pedwarn_c90 instead of pedwarn.
2357 (check_bitfield_type_and_width): Likewise.
2358 (declspecs_add_qual): Likewise.
2359 (declspecs_add_type): Likewise.
2360 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
2361 Adjust to only call pedwarn_c90.
2362 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
2363 pedwarn_c90 instead of pedwarn.
2364 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
2365 * c-parser.c (disable_extension_diagnostics): Handle
2366 warn_c90_c99_compat.
2367 (restore_extension_diagnostics): Likewise.
2368 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
2369 pedwarn_c90 instead of pedwarn.
2370 (c_parser_initelt): Likewise.
2371 (c_parser_postfix_expression): Likewise.
2372 (c_parser_postfix_expression_after_paren_type): Likewise.
2373 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
2374 * c-tree.h: Fix formatting.
2375 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
2376 pedwarn_c90 instead of pedwarn.
2377
2378 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
2379
2380 * c-typeck.c: Remove include of pointer-set.h.
2381
2382 2014-08-07 Marek Polacek <polacek@redhat.com>
2383
2384 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
2385
2386 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
2387
2388 * c-typeck.c: Use hash_map instead of pointer_map.
2389
2390 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
2391
2392 * c-decl.c: Use hash_set instead of pointer_set.
2393
2394 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
2395
2396 PR middle-end/61455
2397 * c-array-notation.c (expand_array_notations): Handling
2398 of DECL_EXPR added.
2399
2400 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
2401
2402 PR c++/60517
2403 * c-typeck.c (c_finish_return): Return 0 instead of the address of
2404 a local variable.
2405
2406 2014-07-30 Tom Tromey <tromey@redhat.com>
2407
2408 * c-typeck.c (struct constructor_stack) <designator_depth>: New
2409 field.
2410 (really_start_incremental_init, push_init_level): Initialize
2411 designator_depth.
2412 (pop_init_level): Set global designator_depth.
2413 (process_init_element): Check for designated_init attribute.
2414
2415 2014-07-20 Marek Polacek <polacek@redhat.com>
2416
2417 PR c/61852
2418 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
2419 (implicitly_declare): Pass location to implicit_decl_warning.
2420
2421 2014-07-14 Jakub Jelinek <jakub@redhat.com>
2422
2423 PR middle-end/61294
2424 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
2425 If non-NULL, call c_parser_check_literal_zero.
2426 (c_parser_check_literal_zero): New function.
2427 (c_parser_postfix_expression_after_primary): Adjust
2428 c_parser_expr_list caller, handle -Wmemset-transposed-args.
2429
2430 2014-07-06 Marek Polacek <polacek@redhat.com>
2431
2432 PR c/6940
2433 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
2434 * c-tree.h (C_ARRAY_PARAMETER): Define.
2435 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
2436 function parameter.
2437
2438 2014-07-02 Jan Hubicka <hubicka@ucw.cz>
2439 Chen Gang <gang.chen.5i5j@gmail.com>
2440
2441 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
2442 releasing symbol.
2443
2444 2014-07-01 Marek Polacek <polacek@redhat.com>
2445
2446 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
2447 instead of 0 to WARN_FOR_ASSIGNMENT.
2448
2449 2014-07-01 Marek Polacek <polacek@redhat.com>
2450
2451 PR c/58286
2452 * c-typeck.c (convert_for_assignment): Pass
2453 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
2454
2455 2014-06-30 Marek Polacek <polacek@redhat.com>
2456
2457 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
2458 has no_sanitize_undefined attribute.
2459
2460 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
2461
2462 PR middle-end/57541
2463 * c-array-notation.c (fix_builtin_array_notation_fn):
2464 Check for 0 arguments in builtin call. Check that bultin argument is
2465 correct.
2466 * c-parser.c (c_parser_array_notation): Check for incorrect initial
2467 index.
2468
2469 2014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
2470
2471 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
2472 qualifiers in __auto_type for atomic types.
2473 (c_parser_typeof_specifier): Discard all type qualifiers in
2474 __typeof__ for atomic types.
2475
2476 2014-06-25 Marek Polacek <polacek@redhat.com>
2477
2478 PR c/61162
2479 * c-parser.c (c_parser_statement_after_labels): Pass the location of
2480 the return expression to c_finish_return.
2481
2482 2014-06-25 Jakub Jelinek <jakub@redhat.com>
2483
2484 * c-typeck.c (c_finish_omp_clauses): Make sure
2485 OMP_CLAUSE_LINEAR_STEP has correct type.
2486
2487 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
2488
2489 * c-decl.c: Adjust.
2490
2491 2014-06-24 Jakub Jelinek <jakub@redhat.com>
2492
2493 * c-parser.c (c_parser_omp_for_loop): For
2494 #pragma omp parallel for simd move lastprivate clause from parallel
2495 to for rather than simd.
2496
2497 2014-06-23 Marek Polacek <polacek@redhat.com>
2498
2499 * c-typeck.c (parser_build_binary_op): Don't call
2500 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
2501
2502 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
2503
2504 * c-parser.c (c_parser_omp_threadprivate): Likewise.
2505 * c-decl.c (merge_decls): Likewise.
2506
2507 2014-06-09 Marek Polacek <polacek@redhat.com>
2508
2509 PR c/36446
2510 * c-typeck.c (error_init): Call inform instead of error_at.
2511 (pedwarn_init): Call inform instead of pedwarn.
2512 (warning_init): Call inform instead of warning_at.
2513
2514 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
2515
2516 * c-decl.c (merge_decls): Use set_decl_section_name.
2517 (duplicate_decls): Remove node if it exists.
2518
2519 2014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
2520
2521 PR c/53119
2522 * c-typeck.c (push_init_level, process_init_element,
2523 pop_init_level): Correct check for zero initialization, move
2524 missing brace warning to respect zero initialization.
2525
2526 2014-06-05 Marek Polacek <polacek@redhat.com>
2527
2528 PR c/56724
2529 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
2530
2531 2014-06-05 Marek Polacek <polacek@redhat.com>
2532
2533 PR c/49706
2534 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
2535 on the left hand side operand of a comparison.
2536
2537 2014-06-05 Marek Polacek <polacek@redhat.com>
2538
2539 PR c/48062
2540 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
2541 Print note only if the warning was printed.
2542
2543 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
2544
2545 PR c/58942
2546 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
2547 with a pointer.
2548
2549 2014-06-03 Marek Polacek <polacek@redhat.com>
2550
2551 PR c/60439
2552 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
2553 c_start_case.
2554 * c-tree.h (c_start_case): Update.
2555 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
2556 switch condition has boolean value.
2557
2558 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
2559
2560 * c-decl.c: Include builtins.h.
2561 * c-parser.c: Likewise.
2562
2563 2014-05-27 Marek Polacek <polacek@redhat.com>
2564
2565 PR c/56724
2566 * c-typeck.c (convert_arguments): Get location of a parameter. Change
2567 error and warning calls to error_at and warning_at. Pass location of
2568 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
2569 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
2570 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
2571
2572 2014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
2573
2574 PR c/61191
2575 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
2576 function parameters.
2577
2578 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
2579
2580 * c-decl.c (merge_decls): Preserve symtab node pointers.
2581 (duplicate_decls): Free new decl.
2582
2583 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
2584
2585 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
2586 initialization.
2587
2588 * c-parser.c (c_parser_omp_target): Return bool values.
2589
2590 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
2591
2592 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
2593 num_teams_loc variable to num_thread_limit_loc.
2594
2595 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
2596
2597 * c-array-notation.c (expand_array_notations): Use void_node
2598 instead of void_zero_node.
2599
2600 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
2601
2602 * c-decl.c (finish_struct): Adjust.
2603 (finish_enum): Likewise.
2604 (bind): Adjust.
2605 (record_inline_static): Likewise.
2606 (push_scope): Likewise.
2607 (make_label): Likewise.
2608 (lookup_label_for_goto): Likewise.
2609 (finish_struct): Likewise.
2610 (finish_enum): Likewise.
2611 (store_parm_decls): Likewise.
2612 (c_push_function_context): Likewise.
2613 * c-lang.h: Remove usage of variable_size gty attribute.
2614 * c-parser.c (c_parse_init): Adjust.
2615 (c_parse_file): Likewise.
2616
2617 2014-05-13 Marek Polacek <polacek@redhat.com>
2618
2619 PR c/61162
2620 * c-typeck.c (convert_for_assignment): Pass location to
2621 WARN_FOR_ASSIGNMENT instead of input_location.
2622
2623 2014-05-10 Marek Polacek <polacek@redhat.com>
2624
2625 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
2626 maybe_warn_string_init.
2627 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
2628 maybe_warn_string_init.
2629 * c-tree.h (maybe_warn_string_init): Update declaration.
2630 * c-typeck.c (maybe_warn_string_init): Add location parameter.
2631 Call pedwarn_init with loc instead of with input_location.
2632 (digest_init): Pass init_loc to maybe_warn_string_init.
2633 (pop_init_level): Call pedwarn_init with loc instead of with
2634 input_location.
2635 (set_init_index): Likewise.
2636 (process_init_element): Likewise.
2637
2638 2014-05-09 Marek Polacek <polacek@redhat.com>
2639
2640 PR c/61096
2641 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
2642 (c_parser_initelt): Pass location to set_init_label. Pass array index
2643 location to set_init_index.
2644 * c-tree.h (push_init_level): Update declaration.
2645 (pop_init_level): Likewise.
2646 (set_init_index): Likewise.
2647 (set_init_label): Likewise.
2648 * c-typeck.c (error_init): Add location parameter. Call error_at
2649 instead of error.
2650 (digest_init): Pass init_loc to error_init.
2651 (really_start_incremental_init):
2652 (push_init_level): Add location parameter. Pass loc to pop_init_level
2653 and error_init.
2654 (pop_init_level): Likewise.
2655 (set_designator): Add location parameter. Pass loc to pop_init_level,
2656 push_init_level, and error_init.
2657 (set_init_index): Add location parameter. Pass loc to error_init and
2658 set_designator.
2659 (set_init_label): Likewise.
2660 (output_init_element): Pass loc to error_init.
2661 (process_init_element): Pass loc to error_init, pop_init_level,
2662 pedwarn_init, and push_init_level.
2663
2664 2014-05-09 Marek Polacek <polacek@redhat.com>
2665
2666 PR c/50459
2667 * c-parser.c (c_parser_attributes): Parse the arguments as an
2668 expression-list if the attribute takes identifier.
2669
2670 2014-05-08 Marek Polacek <polacek@redhat.com>
2671
2672 PR c/61053
2673 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
2674 TYPE_ALIGN_UNIT.
2675
2676 2014-05-08 Marek Polacek <polacek@redhat.com>
2677
2678 PR c/61077
2679 * c-decl.c (start_function): Warn for _Atomic-qualified return type
2680 of main.
2681
2682 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
2683 Mike Stump <mikestump@comcast.net>
2684 Richard Sandiford <rdsandiford@googlemail.com>
2685
2686 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
2687 (finish_enum): Use wide-int interfaces.
2688 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
2689 * c-typeck.c (build_c_cast): Likewise.
2690 (set_nonincremental_init_from_string): Likewise.
2691 (c_tree_equal): Likewise.
2692
2693 2014-05-02 Marek Polacek <polacek@redhat.com>
2694
2695 PR c/25801
2696 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
2697 Return size_one_node when the type is not complete.
2698 (pointer_diff): Remove comment.
2699 (build_unary_op): Improve error messages.
2700
2701 2014-05-02 Marek Polacek <polacek@redhat.com>
2702
2703 * c-typeck.c (c_finish_return): Separate warning_at calls.
2704
2705 2014-05-02 Marek Polacek <polacek@redhat.com>
2706
2707 * c-tree.h (error_init): Remove declaration.
2708 (pedwarn_init): Likewise.
2709 * c-typeck.c (error_init): Make static and move above.
2710 (pedwarn_init): Likewise.
2711 (warning_init): Move above.
2712 (maybe_warn_string_init): Likewise.
2713
2714 2014-05-01 Jeff Law <law@redhat.com>
2715
2716 Revert:
2717
2718 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2719 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
2720 avoid goto.
2721
2722 2014-05-02 Marek Polacek <polacek@redhat.com>
2723
2724 PR c/60784
2725 * c-typeck.c (push_init_level): Set constructor_designated to
2726 p->designated for structures.
2727
2728 2014-05-01 Marek Polacek <polacek@redhat.com>
2729
2730 PR c/60915
2731 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
2732 function-definition has an attribute after the declarator.
2733
2734 2014-05-01 Marek Polacek <polacek@redhat.com>
2735
2736 PR c/60257
2737 * c-typeck.c (warning_init): Add location_t parameter. Call
2738 warning_at instead of warning.
2739 (push_init_level): Pass input_location to warning_init.
2740 (add_pending_init): Add location_t parameter. Pass loc to
2741 warning_init.
2742 (set_nonincremental_init): Pass input_location to add_pending_init.
2743 (set_nonincremental_init_from_string): Likewise.
2744 (output_init_element): Pass loc to warning_init and to
2745 add_pending_init.
2746
2747 2014-05-01 Marek Polacek <polacek@redhat.com>
2748
2749 PR c/43395
2750 * c-typeck.c (c_finish_return): Distinguish between label and variable
2751 when warning about returning local address.
2752
2753 2014-05-01 Marek Polacek <polacek@redhat.com>
2754
2755 PR c/29467
2756 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
2757 in C89 mode.
2758
2759 2014-05-01 Marek Polacek <polacek@redhat.com>
2760
2761 PR c/43245
2762 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
2763 instead of 0 to WARN_FOR_QUALIFIERS.
2764
2765 2014-05-01 Marek Polacek <polacek@redhat.com>
2766
2767 PR c/56989
2768 * c-typeck.c (default_conversion): Use better location for
2769 error call.
2770
2771 2014-04-30 Marek Polacek <polacek@redhat.com>
2772
2773 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
2774 also when SANITIZE_FLOAT_DIVIDE is on.
2775
2776 2014-04-30 Marek Polacek <polacek@redhat.com>
2777
2778 PR c/60139
2779 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
2780 and pedwarn_init. Use loc insted of input_location.
2781
2782 2014-04-30 Marek Polacek <polacek@redhat.com>
2783
2784 PR c/60351
2785 * c-typeck.c (build_binary_op): Use location when warning about
2786 shift count.
2787
2788 2014-04-25 Marek Polacek <polacek@redhat.com>
2789
2790 PR c/18079
2791 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
2792 always_inline/noinline and hot/cold attributes.
2793
2794 2014-04-25 Marek Polacek <polacek@redhat.com>
2795
2796 PR c/60114
2797 * c-parser.c (c_parser_initelt): Pass input_location to
2798 process_init_element.
2799 (c_parser_initval): Pass loc to process_init_element.
2800 * c-tree.h (process_init_element): Adjust declaration.
2801 * c-typeck.c (push_init_level): Pass input_location to
2802 process_init_element.
2803 (pop_init_level): Likewise.
2804 (set_designator): Likewise.
2805 (output_init_element): Add location_t parameter. Pass loc to
2806 digest_init.
2807 (output_pending_init_elements): Pass input_location to
2808 output_init_element.
2809 (process_init_element): Add location_t parameter. Pass loc to
2810 output_init_element.
2811
2812 2014-04-24 Jakub Jelinek <jakub@redhat.com>
2813
2814 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
2815 atomic-clause, allow comma in between atomic-clause and
2816 seq_cst.
2817
2818 2014-04-22 Jakub Jelinek <jakub@redhat.com>
2819
2820 PR c/59073
2821 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
2822 fails, don't set OM_PARALLEL_COMBINED and return NULL.
2823
2824 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
2825
2826 PR middle-end/60469
2827 * c-array-notation.c (fix_builtin_array_notation_fn): Use
2828 create_tmp_var instead build_decl for creating temps.
2829 (build_array_notation_expr): Likewise.
2830 (fix_conditional_array_notations_1): Likewise.
2831 (fix_array_notation_expr): Likewise.
2832 (fix_array_notation_call_expr): Likewise.
2833
2834 2014-03-28 Jakub Jelinek <jakub@redhat.com>
2835
2836 PR c++/60689
2837 * c-tree.h (c_build_function_call_vec): New prototype.
2838 * c-typeck.c (build_function_call_vec): Don't call
2839 resolve_overloaded_builtin here.
2840 (c_build_function_call_vec): New wrapper function around
2841 build_function_call_vec. Call resolve_overloaded_builtin here.
2842 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
2843 Call c_build_function_call_vec instead of build_function_call_vec.
2844 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2845 * c-decl.c (finish_decl): Likewise.
2846
2847 2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
2848
2849 PR c/55383
2850 * c-typeck.c: Use correct format string in cast-qual warning
2851
2852 2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
2853
2854 * c-decl.c (c_decl_attributes): Use
2855 lang_hooks.types.omp_mappable_type.
2856 * c-typeck.c (c_finish_omp_clauses): Likewise.
2857
2858 2014-03-06 Marek Polacek <polacek@redhat.com>
2859
2860 PR c/60197
2861 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
2862 of checking tree code.
2863
2864 2014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2865
2866 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
2867 (c_parser_parameter_declaration): Likewise.
2868
2869 2014-02-19 Marek Polacek <polacek@redhat.com>
2870
2871 PR c/60195
2872 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
2873 Call mark_exp_read on exp.value.
2874 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
2875 TREE_ADDRESSABLE on old instead of val.
2876 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
2877
2878 2014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2879
2880 * c-parser.c (c_parser_get_builtin_args): Replace calls to
2881 C_EXPR_APPEND by vec_safe_push.
2882 * c-tree.h (C_EXPR_APPEND): Remove.
2883
2884 2014-01-31 Marek Polacek <polacek@redhat.com>
2885
2886 PR c/59963
2887 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
2888 build_function_call_vec.
2889 (build_function_call): Likewise.
2890 (build_atomic_assign): Likewise.
2891 (build_function_call_vec): Add arg_loc parameter. Use it.
2892 (convert_arguments): Likewise.
2893 (convert_for_assignment): Rename rhs_loc to expr_loc.
2894 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
2895 (c_parser_objc_keywordexpr): Likewise.
2896 (c_parser_postfix_expression_after_primary): Call
2897 build_function_call_vec with expr_loc rather than op_loc.
2898 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
2899 build_function_call_vec.
2900 (c_parser_expr_list): Add locations parameter. Fill it with locations
2901 of function arguments.
2902 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
2903
2904 2014-01-30 Marek Polacek <polacek@redhat.com>
2905
2906 PR c/59940
2907 * c-typeck.c (build_function_call_vec): Use loc parameter.
2908 (convert_arguments): Add location parameter. Use it.
2909 (ep_convert_and_check): Likewise.
2910 (build_atomic_assign): Adjust convert_for_assignment call.
2911 (build_modify_expr): Likewise.
2912 (digest_init): Likewise.
2913 (c_finish_return): Likewise.
2914 (build_conditional_expr): Adjust ep_convert_and_check calls.
2915 (convert_for_assignment): Add rhs_loc parameter. Use it.
2916 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
2917 calls.
2918
2919 2014-01-30 Richard Biener <rguenther@suse.de>
2920
2921 PR c/59905
2922 * c-typeck.c (build_function_call_vec): Do not replace calls
2923 to a function via an incompatible type with a runtime abort.
2924
2925 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
2926
2927 * c-parser.c (c_parser_declaration_or_fndef): Replaced
2928 flag_enable_cilkplus with flag_cilkplus.
2929 (c_parser_direct_declarator_inner): Likewise.
2930 (c_parser_attribute_any_word): Likewise.
2931 (c_parser_attributes): Likewise.
2932 (c_parser_compound_statement): Likewise.
2933 (c_parser_statement_after_labels): Likewise.
2934 (c_parser_if_statement): Likewise.
2935 (c_parser_switch_statement): Likewise.
2936 (c_parser_do_statement): Likewise.
2937 (c_parser_for_statement): Likewise.
2938 (c_parser_unary_expression): Likewise.
2939 (c_parser_postfix_expression): Likewise.
2940 (c_parser_postfix_expression_after_primary): Likewise.
2941 (c_parser_postfix_expression_after_primary): Likewise.
2942 (c_parser_omp_clause_name): Likewise.
2943 (c_finish_omp_declare_simd): Likewise.
2944 (c_parser_cilk_verify_simd): Likewise.
2945 * c-typeck.c (build_array_ref): Likewise.
2946 (build_function_call_vec): Likewise.
2947 (convert_arguments): Likewise.
2948 (build_compound_expr): Likewise.
2949 (c_finish_return): Likewise.
2950 (c_finish_if_stmt): Likewise.
2951 (c_finish_loop): Likewise.
2952 (build_binary_op): Likewise.
2953
2954 2014-01-23 Marek Polacek <polacek@redhat.com>
2955
2956 PR c/59846
2957 * c-typeck.c (parser_build_binary_op): Use location instead of
2958 input_location.
2959 (build_binary_op): Pass location to shorten_compare.
2960
2961 2014-01-23 Marek Polacek <polacek@redhat.com>
2962
2963 PR c/58346
2964 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
2965 an empty aggregate.
2966
2967 2014-01-23 Marek Polacek <polacek@redhat.com>
2968
2969 PR c/59871
2970 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
2971 of a comma expression.
2972 (emit_side_effect_warnings): Likewise.
2973
2974 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
2975
2976 PR c/59825
2977 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
2978 function to use walk_tree and moved a lot of its functionality to
2979 expand_array_notations.
2980 (expand_array_notations): New function.
2981
2982 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
2983
2984 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
2985 attribute an attribute without value.
2986
2987 2014-01-23 Jakub Jelinek <jakub@redhat.com>
2988
2989 PR middle-end/58809
2990 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
2991 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
2992
2993 2014-01-22 Marek Polacek <polacek@redhat.com>
2994
2995 PR c/59891
2996 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
2997 of remove_c_maybe_const_expr on op1 and op2.
2998
2999 2014-01-15 Jakub Jelinek <jakub@redhat.com>
3000
3001 PR c/58943
3002 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
3003 effects, preevaluate rhs using SAVE_EXPR first.
3004
3005 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
3006
3007 PR c++/59631
3008 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
3009 statements with if-elseif statements.
3010
3011 2014-01-06 Marek Polacek <polacek@redhat.com>
3012
3013 PR c/57773
3014 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
3015 defined bit-field types only in ISO C.
3016
3017 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3018
3019 Update copyright years
3020
3021 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3022
3023 * c-array-notation.c: Use the standard form for the copyright notice.
3024
3025 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
3026
3027 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
3028 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
3029 field in parser is not empty. If not-empty, call the function
3030 c_parser_finish_omp_declare_simd.
3031 (c_parser_cilk_clause_vectorlength): Modified function to be shared
3032 between SIMD-enabled functions and #pragma simd. Added new parameter.
3033 (c_parser_cilk_all_clauses): Modified the usage of the function
3034 c_parser_cilk_clause_vectorlength as mentioned above.
3035 (c_parser_cilk_simd_fn_vector_attrs): New function.
3036 (c_finish_cilk_simd_fn_tokens): Likewise.
3037 (is_cilkplus_vector_p): Likewise.
3038 (c_parser_omp_clause_name): Added checking for "vectorlength,"
3039 "nomask," and "mask" strings in clause name.
3040 (c_parser_omp_all_clauses): Added 3 new case statements:
3041 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
3042 PRAGMA_CILK_CLAUSE_NOMASK.
3043 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
3044 check for vector attribute and if so call the function
3045 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
3046 called the function c_finish_cilk_simd_fn_tokens.
3047 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
3048 parser field is non-empty. If so, parse them as you would parse
3049 the omp declare simd pragma.
3050 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
3051 Added a check when step is a parameter and flag it as error.
3052 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
3053 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
3054 pragma_omp_clause.
3055
3056 2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
3057
3058 * c-parser.c (c_parser_omp_parallel): Fix description.
3059
3060 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
3061
3062 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
3063 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
3064 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
3065 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
3066
3067 2013-12-04 Joseph Myers <joseph@codesourcery.com>
3068
3069 PR c/52023
3070 * c-parser.c (c_parser_alignas_specifier): Use
3071 c_sizeof_or_alignof_type instead of c_alignof.
3072 (c_parser_alignof_expression): Likewise, with min_alignof
3073 parameter depending on alignof spelling used.
3074
3075 2013-12-04 Marek Polacek <polacek@redhat.com>
3076
3077 PR c/54113
3078 * c-decl.c (start_function): Don't warn for missing prototype for
3079 inline functions.
3080
3081 2013-12-03 Marek Polacek <polacek@redhat.com>
3082
3083 PR c/59351
3084 * c-decl.c (build_compound_literal): Allow compound literals with
3085 empty initial value.
3086
3087 2013-12-02 Joseph Myers <joseph@codesourcery.com>
3088
3089 PR c/58235
3090 * c-typeck.c (build_modify_expr): Diagnose assignment to
3091 expression with array type.
3092
3093 2013-11-29 Joseph Myers <joseph@codesourcery.com>
3094
3095 PR c/42262
3096 * c-typeck.c (process_init_element): Do not treat a string as
3097 initializing a whole array when used with a designator for an
3098 individual element.
3099
3100 2013-11-29 Joseph Myers <joseph@codesourcery.com>
3101
3102 PR c/57574
3103 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
3104 an inline function following a static declaration.
3105
3106 2013-11-28 Jakub Jelinek <jakub@redhat.com>
3107
3108 PR c/59310
3109 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
3110 to p_name before calling c_parser_omp_teams instead of after.
3111 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
3112 argument. Remove unused p_name variable.
3113
3114 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
3115 Jakub Jelinek <jakub@redhat.com>
3116
3117 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
3118 external_scope is NULL.
3119
3120 2013-11-27 Tom de Vries <tom@codesourcery.com>
3121 Marc Glisse <marc.glisse@inria.fr>
3122
3123 PR c++/59032
3124 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
3125
3126 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
3127
3128 * c-typeck.c: Add required include files from gimple.h.
3129
3130 2013-11-22 David Malcolm <dmalcolm@redhat.com>
3131
3132 * c-decl.c (define_label, shadow_tag_warned)
3133 (check_bitfield_type_and_width, grokdeclarator, grokparms,
3134 store_parm_decls_newstyle, store_parm_decls_oldstyle)
3135 (declspecs_add_type): Remove use of in_system_header macro.
3136 * c-parser.c (c_parser_unary_expression): Likewise.
3137 * c-typeck.c (store_init_value, process_init_element)
3138 (c_start_case): Likewise.
3139
3140 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
3141 macro.
3142
3143 * c-parser.c (c_parser_set_source_position_from_token): Remove
3144 reference to in_system_header from comment.
3145
3146 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3147
3148 * c-decl.c (grokdeclarator): Update comment to refer to
3149 tree_to_[su]hwi rather than tree_low_cst.
3150
3151 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3152
3153 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
3154 tree_to_uhwi throughout.
3155
3156 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3157
3158 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
3159 throughout.
3160
3161 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3162
3163 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
3164 throughout.
3165
3166 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
3167
3168 * c-parser.c (c_parser_cilk_simd): New.
3169 (c_parser_cilk_verify_simd): New.
3170 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
3171 (c_parser_omp_for_loop): Add case for NE_EXPR.
3172 Set c_break_label for CILK_SIMD.
3173 (c_parser_cilk_clause_vectorlength): New.
3174 (c_parser_cilk_clause_linear): New.
3175 (c_parser_cilk_clause_name): New.
3176 (c_parser_cilk_all_clauses): New.
3177 * c-typeck.c (build_unary_op): Pass location argument to
3178 readonly_error.
3179 (build_modify_expr): Same.
3180 (build_asm_expr): Same.
3181 (c_finish_bc_stmt): Error on break/continue in loops.
3182
3183 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
3184
3185 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
3186
3187 2013-11-14 Diego Novillo <dnovillo@google.com>
3188
3189 * c-decl.c: Include print-tree.h.
3190 Include stor-layout.h.
3191 Include varasm.h.
3192 Include attribs.h.
3193 Include stringpool.h.
3194 * c-lang.c: Include fold-const.h.
3195 * c-parser.c: Include stringpool.h.
3196 Include attribs.h.
3197 Include stor-layout.h.
3198 Include varasm.h.
3199 Include trans-mem.h.
3200 * c-typeck.c: Include stor-layout.h.
3201 Include trans-mem.h.
3202 Include varasm.h.
3203 Include stmt.h.
3204
3205 2013-11-13 Joseph Myers <joseph@codesourcery.com>
3206
3207 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
3208 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
3209 __auto_type.
3210 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
3211 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
3212 RID_AUTO_TYPE.
3213 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
3214 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
3215 (c_parser_declarator, c_parser_direct_declarator_inner)
3216 (c_parser_parameter_declaration, c_parser_type_name): All callers
3217 changed.
3218 (c_parser_declaration_or_fndef): Handle declarations with type
3219 determined from the initializer.
3220
3221 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
3222
3223 * c-typeck.c: Include gimplify.h.
3224
3225 2013-11-12 Joseph Myers <joseph@codesourcery.com>
3226
3227 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
3228 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
3229 comment.
3230 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
3231 or _Thread_local as appropriate in diagnostics.
3232 (build_null_declspecs): Initialize ret->thread_gnu_p.
3233 (declspecs_add_scspec): Handle either __thread or _Thread_local
3234 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
3235 pedantic. Do not disallow _Thread_local extern and _Thread_local
3236 static.
3237
3238 2013-11-07 Joseph Myers <joseph@codesourcery.com>
3239 Andrew MacLeod <amacleod@redhat.com>
3240
3241 * c-aux-info.c (gen_type): Handle atomic qualifier.
3242 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
3243 qualifiers when compating types.
3244 (shadow_tag_warned): Handle atomic_p in declspecs.
3245 (quals_from_declspecs): Likewise.
3246 (start_decl): Use c_type_promotes_to when promoting argument
3247 types.
3248 (grokdeclarator): Handle _Atomic.
3249 (get_parm_info): Diagnose any qualifier on "void" as only
3250 parameter.
3251 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
3252 comparing types. Use c_type_promotes_to when promoting argument
3253 types.
3254 (finish_function): Use c_type_promotes_to when promoting argument
3255 types.
3256 (build_null_declspecs): Handle atomic_p in declspecs.
3257 (declspecs_add_qual): Handle RID_ATOMIC.
3258 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
3259 (c_token_starts_declspecs): Handle RID_ATOMIC.
3260 (c_parser_declspecs): Handle atomic type specifiers and
3261 qualifiers.
3262 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
3263 from types of expressions with atomic type.
3264 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
3265 (c_parser_attribute_any_word): Handle RID_ATOMIC.
3266 (c_parser_initializer, c_parser_initelt, c_parser_initval)
3267 (c_parser_statement_after_labels, c_parser_switch_statement)
3268 (c_parser_for_statement, c_parser_expr_no_commas)
3269 (c_parser_conditional_expression, c_parser_binary_expression)
3270 (c_parser_cast_expression, c_parser_unary_expression)
3271 (c_parser_postfix_expression)
3272 (c_parser_postfix_expression_after_primary, c_parser_expression):
3273 Use convert_lvalue_to_rvalue.
3274 (c_parser_expression_conv, c_parser_expr_list): Document
3275 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
3276 (c_parser_objc_synchronized_statement): Use
3277 convert_lvalue_to_rvalue.
3278 (c_parser_objc_selector): Handle RID_ATOMIC.
3279 (c_parser_objc_receiver, c_parser_array_notation): Use
3280 convert_lvalue_to_rvalue.
3281 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
3282 _Atomic (type-name).
3283 (struct c_declspecs): Add atomic_p field.
3284 (convert_lvalue_to_rvalue): Declare.
3285 * c-typeck.c (c_type_promotes_to): Promote atomic types to
3286 corresponding atomic types.
3287 (qualify_type): Don't add _Atomic qualifiers from second argument.
3288 (comp_target_types): Do not allow _Atomic mismatches.
3289 (type_lists_compatible_p): Do not remove atomic qualifiers when
3290 comparing types.
3291 (really_atomic_lvalue, convert_lvalue_to_rvalue)
3292 (build_atomic_assign): New functions.
3293 (build_unary_op): Use build_atomic_assign for atomic increment and
3294 decrement.
3295 (build_conditional_expr): Do not treat _Atomic void as a qualified
3296 version of void.
3297 (build_modify_expr): Use build_atomic_assign for atomic LHS.
3298 (find_anonymous_field_with_type, convert_to_anonymous_field)
3299 (convert_for_assignment): Do not remove atomic qualifiers when
3300 comparing types.
3301 (digest_init): Do not accept initialization of arrays of atomic
3302 elements by string constants.
3303 (build_asm_expr): Use convert_lvalue_to_rvalue.
3304 (build_binary_op): Do not treat _Atomic void as a qualified
3305 version of void.
3306
3307 2013-11-06 DJ Delorie <dj@redhat.com>
3308
3309 * c-decl.c (locate_old_decl): If a previous conflicting decl is
3310 both explicit and builtin, print the location of the explicit one.
3311
3312 2013-11-05 Tobias Burnus <burnus@net-b.de>
3313
3314 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
3315 c_parser_omp_distribute, c_parser_omp_teams,
3316 c_parser_omp_target, c_parser_omp_declare): Handle
3317 -fopenmp-simd.
3318
3319 2013-11-03 Marek Polacek <polacek@redhat.com>
3320
3321 * c-decl.c (grokdeclarator): Add VLA instrumentation.
3322
3323 2013-11-01 Jakub Jelinek <jakub@redhat.com>
3324
3325 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
3326 check_dup_generic at the end, unless remove is true.
3327 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
3328 remove = true;.
3329 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
3330
3331 2013-10-31 Jakub Jelinek <jakub@redhat.com>
3332
3333 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
3334 with decl that is not pointer nor array.
3335
3336 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
3337
3338 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
3339 a spawning function is found.
3340 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
3341 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
3342 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
3343 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
3344 case.
3345 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
3346 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
3347 expr.
3348 (c_finish_return): Added a check to reject _Cilk_spawn in return
3349 expression.
3350 (build_cilk_spawn): New function.
3351 (build_cilk_sync): Likewise.
3352 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
3353
3354 2013-10-27 Tobias Burnus <burnus@net-b.de>
3355
3356 PR other/33426
3357 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
3358 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
3359 (c_parser_statement_after_labels): Update calls.
3360
3361 2013-10-24 Tobias Burnus <burnus@net-b.de>
3362
3363 PR other/33426
3364 * c-parser.c (c_parser_pragma, c_parser_for_statement):
3365 Handle PRAGMA_IVDEP.
3366 (c_parser_statement_after_labels): Update call.
3367
3368 2013-10-24 Marek Polacek <polacek@redhat.com>
3369
3370 * c-parser.c (c_parser_struct_declaration): Add a comment.
3371 (c_parser_declarator): Don't allow _Alignas here.
3372
3373 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
3374
3375 * c-parser.c: Include omp-low.h.
3376 * c-typeck.c: Likewise.
3377
3378 2013-10-17 Marek Polacek <polacek@redhat.com>
3379
3380 PR c/58267
3381 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
3382 Document syntax of the array-declarator.
3383 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
3384 are not permitted.
3385 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
3386 (c_parser_struct_declaration): Likewise.
3387 (c_parser_declarator): Likewise.
3388 (c_parser_direct_declarator_inner): Likewise.
3389 (c_parser_parameter_declaration): Likewise.
3390 (c_parser_type_name): Likewise.
3391
3392 2013-10-11 Jakub Jelinek <jakub@redhat.com>
3393
3394 * c-lang.h (current_omp_declare_target_attribute): New extern
3395 decl.
3396 * c-parser.c: Include c-lang.h.
3397 (struct c_parser): Change tokens to c_token *.
3398 Add tokens_buf field. Change tokens_avail type to unsigned int.
3399 (c_parser_consume_token): If parser->tokens isn't
3400 &parser->tokens_buf[0], increment parser->tokens.
3401 (c_parser_consume_pragma): Likewise.
3402 (enum pragma_context): Add pragma_struct and pragma_param.
3403 (c_parser_external_declaration): Adjust
3404 c_parser_declaration_or_fndef caller.
3405 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
3406 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
3407 Adjust recursive call.
3408 (c_parser_struct_or_union_specifier): Use pragma_struct instead
3409 of pragma_external.
3410 (c_parser_parameter_declaration): Use pragma_param instead of
3411 pragma_external.
3412 (c_parser_compound_statement_nostart, c_parser_label,
3413 c_parser_for_statement): Adjust
3414 c_parser_declaration_or_fndef callers.
3415 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
3416 it through to c_parser_conditional_expression.
3417 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
3418 pass it through to c_parser_binary_expression. Adjust recursive
3419 call.
3420 (c_parser_binary_expression): Remove prec argument, add
3421 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
3422 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
3423 binop matches it, use build2 instead of parser_build_binary_op.
3424 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
3425 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
3426 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
3427 Handle pragma_struct and pragma_param the same as pragma_external.
3428 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
3429 (c_parser_omp_variable_list): Parse array sections for
3430 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
3431 (c_parser_omp_clause_collapse): Fully fold collapse expression.
3432 (c_parser_omp_clause_reduction): Handle user defined reductions.
3433 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
3434 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
3435 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
3436 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
3437 c_parser_omp_clause_depend, c_parser_omp_clause_map,
3438 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
3439 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
3440 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
3441 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
3442 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
3443 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
3444 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
3445 (c_parser_omp_for_loop): Add CODE argument, pass it through
3446 to c_finish_omp_for. Change last argument to cclauses,
3447 and adjust uses to grab parallel clauses from the array of all
3448 the split clauses. Adjust c_parser_binary_expression,
3449 c_parser_declaration_or_fndef and c_finish_omp_for callers.
3450 (omp_split_clauses): New function.
3451 (c_parser_omp_simd): New function.
3452 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
3453 Allow the function to be called also when parsing combined constructs,
3454 and call c_parser_omp_simd when parsing for simd.
3455 (c_parser_omp_sections_scope): If section-sequence doesn't start with
3456 #pragma omp section, require exactly one structured-block instead of
3457 sequence of statements.
3458 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
3459 Allow the function to be called also when parsing combined constructs.
3460 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
3461 Allow the function to be called also when parsing combined
3462 constructs.
3463 (c_parser_omp_taskgroup, c_parser_omp_cancel,
3464 c_parser_omp_cancellation_point, c_parser_omp_distribute,
3465 c_parser_omp_teams, c_parser_omp_target_data,
3466 c_parser_omp_target_update, c_parser_omp_target,
3467 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
3468 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
3469 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
3470 (c_parser_omp_construct): Add p_name and mask vars. Handle
3471 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
3472 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
3473 and c_parser_omp_sections callers.
3474 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
3475 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
3476 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
3477 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
3478 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
3479 OMP_CLAUSE_DEPEND.
3480 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
3481 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
3482 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
3483 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
3484 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
3485 * c-typeck.c: Include tree-inline.h.
3486 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
3487 handle_omp_array_sections_1, handle_omp_array_sections,
3488 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
3489 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
3490 user defined reductions.
3491 (c_tree_equal): New function.
3492 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
3493 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
3494 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
3495 c_check_omp_declare_reduction_r): New prototypes.
3496 * c-decl.c (current_omp_declare_target_attribute): New variable.
3497 (c_decl_attributes): New function.
3498 (start_decl, start_function): Use it instead of decl_attributes.
3499 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
3500 c_omp_reduction_decl, c_omp_reduction_lookup,
3501 c_check_omp_declare_reduction_r): New functions.
3502
3503 2013-09-25 Tom Tromey <tromey@redhat.com>
3504
3505 * Make-lang.in (c/gccspec.o): Remove.
3506 (CFLAGS-c/gccspec.o): New variable.
3507 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
3508 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
3509 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
3510
3511 2013-09-25 Tom Tromey <tromey@redhat.com>
3512
3513 * Make-lang.in (c/gccspec.o): Don't use subshell.
3514
3515 2013-09-18 Marek Polacek <polacek@redhat.com>
3516
3517 PR sanitize/58443
3518 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
3519 Remove unnecessary check.
3520
3521 2013-09-18 Marek Polacek <polacek@redhat.com>
3522
3523 PR sanitizer/58411
3524 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
3525 no_sanitize_undefined attribute.
3526
3527 2013-09-13 Kai Tietz <ktietz@redhat.com>
3528
3529 PR target/57848
3530 * c-decl.c (c_builtin_function_ext_scope): Remove
3531 wrong assumption that it is never called on prexisting
3532 symbol.
3533
3534 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
3535
3536 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
3537
3538 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
3539
3540 * c-objc-common.c (c_tree_printer): Tidy.
3541
3542 2013-08-30 Marek Polacek <polacek@redhat.com>
3543
3544 * c-typeck.c (build_binary_op): Add division by zero and shift
3545 instrumentation.
3546
3547 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
3548 Joseph Myers <joseph@codesourcery.com>
3549
3550 PR c/35649
3551 * c-typeck.c (c_common_type): Prefer double_type_node over
3552 other REAL_TYPE types with the same precision.
3553 (convert_arguments): Likewise.
3554
3555 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
3556
3557 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
3558 (c_initialize_diagnostics): Call a destructor for the early printer.
3559
3560 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
3561
3562 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
3563 printer initialization.
3564
3565 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
3566
3567 PR c/57490
3568 * c-array-notation.c (fix_conditional_array_notations_1): Added a
3569 check for truth values.
3570 (expand_array_notation_exprs): Added truth values case. Removed an
3571 unwanted else. Added for-loop to walk through subtrees in default
3572 case.
3573
3574 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
3575
3576 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
3577
3578 2013-07-23 Joseph Myers <joseph@codesourcery.com>
3579
3580 * c-parser.c (struct c_generic_association): Fix typo.
3581
3582 2013-07-23 Tom Tromey <tromey@redhat.com>
3583 Joseph Myers <joseph@codesourcery.com>
3584
3585 * c-parser.c (struct c_generic_association): New.
3586 (c_generic_association_d): New typedef.
3587 (c_parser_generic_selection): New function.
3588 (c_parser_postfix_expression): Handle RID_GENERIC.
3589
3590 2013-07-13 Jason Merrill <jason@redhat.com>
3591
3592 PR c++/57793
3593 * c-decl.c (finish_struct): Check for too-large class.
3594
3595 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
3596
3597 PR c/57821
3598 * c-typeck.c (set_init_index): When folding, check for index overflow.
3599
3600 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
3601
3602 * c-parser.c (c_parser_array_notation): Removed rejection of array
3603 notations in an array of function pointers.
3604
3605 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
3606
3607 * c-array-notation.c (make_triplet_val_inv): New function.
3608 (create_cmp_incr): Likewise.
3609 (create_array_refs): Likewise.
3610 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
3611 Also modularized common parts between functions and called the function.
3612 (build_array_notation_expr): Likewise.
3613 (fix_conditional_array_notations_1): Likewise.
3614 (fix_array_notation_expr): Likewise.
3615 (fix_array_notation_call_expr): Likewise.
3616
3617 2013-06-18 Marek Polacek <polacek@redhat.com>
3618
3619 PR c/57630
3620 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
3621
3622 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
3623
3624 * c-array-notation.c (build_array_notation_expr): Reject array notation
3625 mismatch between LHS and RHS even inside a call_expr. Also, removed
3626 a couple while statements that were dead code.
3627
3628 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
3629
3630 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
3631 excessive precision expressions in function parameters. Also removed
3632 couple unwanted while statements.
3633
3634 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
3635
3636 * c-array-notation.c (expand_array_notation_exprs): Added
3637 ARRAY_NOTATION_REF case.
3638
3639 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
3640
3641 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
3642 function to c-family/array-notation-common.c.
3643 (is_cilkplus_reduce_builtin): Likewise.
3644 (find_rank): Likewise.
3645 (extract_array_notation_exprs): Likewise.
3646 (replace_array_notations): Likewise.
3647 (find_inv_trees): Likewise.
3648 (replace_inv_trees): Likewise.
3649 (contains_array_notation_expr): Likewise.
3650 (find_correct_array_notation_type): Likewise.
3651 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
3652 (struct inv_list): Moved this to c-family/array-notation-common.c.
3653 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
3654
3655 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
3656
3657 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
3658 reduction functions outside the for-loop. Added a check if the fundecl
3659 is non-NULL. Finally, removed an unwanted if-statement, and made the
3660 body unconditional.
3661
3662 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
3663
3664 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
3665 condition of the if-statement matches the rank of else-block and then-
3666 block when array notations are used.
3667 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
3668 expression after the entire function body is parsed.
3669 (c_parser_expr_no_commas): Delayed creating array notation expressions
3670 to the end of function parsing.
3671 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
3672 whole if-statement instead of just the condition.
3673 (expand_array_notation_exprs): Added MODIFY_EXPR case.
3674
3675 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
3676
3677 PR c/57474
3678 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
3679 array to NULL_TREE if they are unused. Also added a check for the
3680 field to be NULL before its fields are used in future.
3681
3682 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3683
3684 PR bootstrap/57450
3685 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
3686 (build_array_notation_expr): Likewise.
3687
3688 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
3689
3690 * c-typeck.c (build_array_ref): Added a check to see if array's
3691 index is greater than one. If true, then emit an error.
3692 (build_function_call_vec): Exclude error reporting and checking
3693 for builtin array-notation functions.
3694 (convert_arguments): Likewise.
3695 (c_finish_return): Added a check for array notations as a return
3696 expression. If true, then emit an error.
3697 (c_finish_loop): Added a check for array notations in a loop
3698 condition. If true then emit an error.
3699 (lvalue_p): Added a ARRAY_NOTATION_REF case.
3700 (build_binary_op): Added a check for array notation expr inside
3701 op1 and op0. If present, we call another function to find correct
3702 type.
3703 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
3704 * c-parser.c (c_parser_compound_statement): Check if array
3705 notation code is used in tree, if so, then transform them into
3706 appropriate C code.
3707 (c_parser_expr_no_commas): Check if array notation is used in LHS
3708 or RHS, if so, then build array notation expression instead of
3709 regular modify.
3710 (c_parser_postfix_expression_after_primary): Added a check for
3711 colon(s) after square braces, if so then handle it like an array
3712 notation. Also, break up array notations in unary op if found.
3713 (c_parser_direct_declarator_inner): Added a check for array
3714 notation.
3715 (c_parser_compound_statement): Added a check for array notation in
3716 a stmt. If one is present, then expand array notation expr.
3717 (c_parser_if_statement): Likewise.
3718 (c_parser_switch_statement): Added a check for array notations in
3719 a switch statement's condition. If true, then output an error.
3720 (c_parser_while_statement): Similarly, but for a while.
3721 (c_parser_do_statement): Similarly, but for a do-while.
3722 (c_parser_for_statement): Similarly, but for a for-loop.
3723 (c_parser_unary_expression): Check if array notation is used in a
3724 pre-increment or pre-decrement expression. If true, then expand
3725 them.
3726 (c_parser_array_notation): New function.
3727 * c-array-notation.c: New file.
3728 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
3729
3730 2013-05-23 Mike Stump <mikestump@comcast.net>
3731
3732 * c-typeck.c (convert_for_assignment): Handle references to memory
3733 spaces better.
3734
3735 2013-05-16 Jason Merrill <jason@redhat.com>
3736
3737 * Make-lang.in (cc1$(exeext)): Use link mutex.
3738
3739 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
3740
3741 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
3742 to simply use OPT_Wpointer_arith.
3743 (build_unary_op): Likewise.
3744
3745 2013-04-03 Jakub Jelinek <jakub@redhat.com>
3746
3747 PR c/19449
3748 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
3749 argument. If set, or it temporarily for parsing of the first
3750 argument into force_folding_builtin_constant_p.
3751 (c_parser_postfix_expression): Adjust callers.
3752
3753 2013-03-21 Richard Biener <rguenther@suse.de>
3754
3755 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
3756 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
3757
3758 2013-02-12 Marek Polacek <polacek@redhat.com>
3759
3760 PR c/44938
3761 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
3762 origtypes to NULL.
3763
3764 2013-01-24 Jakub Jelinek <jakub@redhat.com>
3765
3766 PR c/56078
3767 * c-typeck.c (set_nonincremental_init_from_string): If
3768 constructor_max_index is NULL, treat it as if tree_int_cst_lt
3769 returned false.
3770 (process_init_element): Likewise.
3771
3772 2012-12-20 Jakub Jelinek <jakub@redhat.com>
3773
3774 PR c++/55619
3775 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
3776 argument, don't call default_function_array_conversion
3777 nor c_fully_fold here.
3778 (c_parser_asm_statement): Adjust callers.
3779 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
3780 and outputs here, and call default_function_array_conversion
3781 on inputs that don't need to be addressable.
3782
3783 2012-12-18 Jakub Jelinek <jakub@redhat.com>
3784
3785 PR c/39464
3786 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
3787 warning require that both c_common_unsigned_type as well as
3788 c_common_signed_type is the same for both mvl and mvr types.
3789
3790 2012-11-16 Diego Novillo <dnovillo@google.com>
3791
3792 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
3793
3794 * c-common.c: Use new vec API in vec.h.
3795 * c-common.h: Likewise.
3796 * c-gimplify.c: Likewise.
3797 * c-pragma.c: Likewise.
3798 * c-pretty-print.c: Likewise.
3799 * c-pretty-print.h: Likewise.
3800 * c-semantics.c: Likewise.
3801 * c-decl.c: Likewise.
3802 * c-parser.c: Likewise.
3803 * c-tree.h: Likewise.
3804 * c-typeck.c: Likewise.
3805
3806 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
3807
3808 PR c++/54930
3809 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
3810
3811 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3812
3813 PR c/53066
3814 * c-decl.c (warn_if_shadowing): Do not warn if a variable
3815 shadows a function, unless the variable is a function or a
3816 pointer-to-function.
3817
3818 2012-10-12 Jakub Jelinek <jakub@redhat.com>
3819
3820 PR c/54381
3821 * c-parser.c (struct c_tree_loc_pair): Removed.
3822 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
3823 add location_t * and tree * arguments, fill in array of 3
3824 sizeof_arg trees and corresponding locs.
3825 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
3826 c_parser_expr_list callers.
3827 (c_parser_postfix_expression_after_primary): Likewise. Pass
3828 array of 3 sizeof_arg trees and locs (corresponding to first
3829 3 arguments) to sizeof_pointer_memaccess_warning.
3830
3831 2012-10-09 Lawrence Crowl <crowl@google.com>
3832
3833 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
3834 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
3835 hash table.
3836
3837 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
3838
3839 PR c++/54194
3840 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
3841 call.
3842
3843 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
3844
3845 PR c++/54427
3846 * c-typeck.c: Include c-common.h.
3847 (enum stv_conv): Moved to c-common.h.
3848 (scalar_to_vector): Moved to c-common.c.
3849 (build_binary_op): Adapt to scalar_to_vector's new prototype.
3850 * Make-lang.in: c-typeck.c depends on c-common.h.
3851
3852 2012-10-04 Arnaud Charlet <charlet@adacore.com>
3853
3854 * c-decl.c (c_write_global_declarations): Fix handling of
3855 -fdump-ada-spec*.
3856
3857 2012-09-30 Sharad Singhai <singhai@google.com>
3858
3859 * c-decl.c (c_write_global_declarations): Use a different method
3860 to determine if the dump has ben initialized.
3861
3862 2012-09-14 Joseph Myers <joseph@codesourcery.com>
3863
3864 PR c/54552
3865 * c-typeck.c (c_cast_expr): When casting to a type requiring
3866 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
3867 c_fully_fold first.
3868
3869 2012-09-14 Joseph Myers <joseph@codesourcery.com>
3870
3871 PR c/54103
3872 * c-typeck.c (build_unary_op): Pass original argument of
3873 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
3874 any C_MAYBE_CONST_EXPR, if it has integer operands.
3875 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
3876 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
3877 to c_objc_common_truthvalue_conversion, then remove any
3878 C_MAYBE_CONST_EXPR, if they have integer operands. Use
3879 c_objc_common_truthvalue_conversion not
3880 c_common_truthvalue_conversion.
3881 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
3882 call note_integer_operands for arguments with integer operands
3883 that are not integer constants.
3884
3885 2012-09-13 Jakub Jelinek <jakub@redhat.com>
3886
3887 PR c/54559
3888 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
3889 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
3890
3891 2012-08-31 Jakub Jelinek <jakub@redhat.com>
3892
3893 PR c/54428
3894 * c-convert.c (convert): Don't call fold_convert_loc if
3895 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
3896 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
3897 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
3898
3899 2012-08-24 Jakub Jelinek <jakub@redhat.com>
3900
3901 PR c/54355
3902 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
3903 for nested and empty_ok arguments in the call to
3904 c_parser_declaration_or_fndef.
3905
3906 2012-08-17 Jakub Jelinek <jakub@redhat.com>
3907
3908 * c-tree.h (c_last_sizeof_arg): Declare.
3909 * c-parser.c (struct c_tree_loc_pair): New type.
3910 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
3911 non-NULL.
3912 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
3913 (c_parser_postfix_expression_after_primary): Likewise. Call
3914 sizeof_pointer_memaccess_warning if needed.
3915 (sizeof_ptr_memacc_comptypes): New function.
3916 * c-typeck.c (c_last_sizeof_arg): New global variable.
3917 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
3918
3919 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
3920
3921 * c-lang.h (lang_decl): Add variable_size GTY option.
3922
3923 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
3924
3925 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
3926 * Make-lang.in: Fix dependencies.
3927
3928 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
3929
3930 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
3931 and add language Makefile hooks.
3932 * config-lang.in: New file.
3933 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
3934 add the required "normal" config-lang.in rules.
3935 * c-lang.h: Moved from gcc/ to here.
3936 * c-tree.h: Likewise.
3937 * c-objc-common.c: Likewise.
3938 * c-objc-common.h: Likewise.
3939 * c-typeck.c: Likewise.
3940 * c-convert.c: Likewise.
3941 * c-lang.c: Likewise.
3942 * c-aux-info.c: Likewise.
3943 * c-errors.c: Likewise.
3944 * gccspec.c: Likewise.
3945 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
3946 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
3947 \f
3948 Copyright (C) 2012-2016 Free Software Foundation, Inc.
3949
3950 Copying and distribution of this file, with or without modification,
3951 are permitted in any medium without royalty provided the copyright
3952 notice and this notice are preserved.