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