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