]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
re PR rtl-optimization/83363 (wrong code at -O2 -fno-forward-propagate)
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
96a95ac1
AO
12017-12-12 Alexandre Oliva <aoliva@redhat.com>
2
3 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
4 * c-parser.c (add_debug_begin_stmt): New.
5 (c_parser_declaration_or_fndef): Call it.
6 (c_parser_compound_statement_nostart): Likewise.
7 (c_parser_statement_after_labels): Likewise.
8 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
9
4b2b493f
JM
102017-12-07 Joseph Myers <joseph@codesourcery.com>
11
12 * c-decl.c (build_compound_literal): Add parameter alignas_align
13 and set alignment of decl if nonzero.
14 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
15 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
16 qualifier.
17 (c_parser_struct_declaration): Update syntax comment.
18 (c_parser_type_name): Add alignas_ok argument and pass it to
19 c_parser_declspecs.
20 (c_parser_cast_expression): Pass true to c_parser_type_name and
21 give error if a cast used an _Alignas specifier.
22 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
23 give error if sizeof (type-name) used an _Alignas specifier.
24 (c_parser_alignof_expression): Pass true to c_parser_type_name and
25 give error if _Alignof (type-name) used an _Alignas specifier.
26 (c_parser_postfix_expression_after_paren_type): Check specified
27 alignment for a compound literal and pass it to
28 build_compound_literal.
29 * c-parser.h (c_parser_type_name): Update prototype.
30 * c-tree.h (build_compound_literal): Update prototype.
31
5d9ae53d
MS
322017-12-07 Martin Sebor <msebor@redhat.com>
33
34 PR c/81544
35 * c-decl.c (c_decl_attributes): Look up existing declaration and
36 pass it to decl_attributes.
37
c79144f8
DM
382017-12-06 David Malcolm <dmalcolm@redhat.com>
39
40 PR c/83236
41 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
42 reserved for use by the implementation.
43
613bc14f
DM
442017-12-06 David Malcolm <dmalcolm@redhat.com>
45
46 * c-decl.c: Include "c-family/c-spellcheck.h".
47
05abad4c
ML
482017-12-05 Martin Liska <mliska@suse.cz>
49 Jakub Jelinek <jakub@redhat.com>
50
51 * c-typeck.c (pointer_diff): Add new argument and instrument
52 pointer subtraction.
53 (build_binary_op): Similar for pointer comparison.
54
cc6534d4
JJ
552017-12-01 Jakub Jelinek <jakub@redhat.com>
56
65791f42
JJ
57 PR c/79153
58 * c-parser.c: Include tree-iterator.h.
59 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
60 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
61 on it.
62
cc6534d4
JJ
63 PR c/83222
64 * c-tree.h (decl_constant_value_1): Declare.
65 * c-typeck.c (decl_constant_value_1): New function.
66 (decl_constant_value): Use it.
67 * c-fold.c (c_fully_fold_internal): If in_init, use
68 decl_constant_value_1 instead of decl_constant_value.
69
5de73c05
JJ
702017-11-30 Jakub Jelinek <jakub@redhat.com>
71
72 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
73
058f0b9e
JJ
742017-11-28 Jakub Jelinek <jakub@redhat.com>
75
76 PR sanitizer/81275
77 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
78 c_switch_covers_all_cases_p returns true.
79
5e9d6aa4
JK
802017-11-28 Julia Koval <julia.koval@intel.com>
81 Sebastian Peryt <sebastian.peryt@intel.com>
82
83 * Make-lang.in (c/c-array-notation.o): Remove.
84 * c-array-notation.c: Delete.
85 * c-decl.c: Remove cilkplus condition.
86 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
87 c_parser_cilk_verify_simd, c_parser_array_notation,
88 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
89 c_parser_cilk_simd_fn_vector_attrs,
90 c_finish_cilk_simd_fn_tokens): Delete.
91 (c_parser_declaration_or_fndef): Remove cilkplus condition.
92 (c_parser_direct_declarator_inner): Ditto.
93 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
94 (c_parser_attributes, c_parser_compound_statement,
95 c_parser_statement_after_labels, c_parser_if_statement,
96 c_parser_switch_statement, c_parser_while_statement,
97 c_parser_do_statement, c_parser_for_statement,
98 c_parser_unary_expression, c_parser_postfix_expression,
99 c_parser_postfix_expression_after_primary,
100 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
101 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
102 support.
103 * c-typeck.c (build_array_ref, build_function_call_vec,
104 convert_arguments,
105 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
106 c_finish_loop, build_binary_op): Remove cilkplus support.
107
9e851845
JJ
1082017-11-28 Jakub Jelinek <jakub@redhat.com>
109
110 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
111 of build3.
112
8c7dbea9
BK
1132017-11-14 Boris Kolpackov <boris@codesynthesis.com>
114
115 * Make-lang.in (c.install-plugin): Install backend import library.
116
41521dee
JJ
1172017-11-23 Jakub Jelinek <jakub@redhat.com>
118
119 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
120 pragma_stmt context.
121
ac9effed
EB
1222017-11-23 Mike Stump <mikestump@comcast.net>
123 Eric Botcazou <ebotcazou@adacore.com>
124
125 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
126 ANNOTATE_EXPR.
127 (c_parser_do_statement): Likewise.
128 (c_parser_for_statement): Likewise.
129
ce95abc4
DM
1302017-11-22 David Malcolm <dmalcolm@redhat.com>
131
132 PR c++/62170
133 * c-objc-common.c (c_tree_printer): Convert penultimate param from
134 bool to bool *. Within '%T' handling, if showing an "aka", use
135 "quoted" param to add appropriate quoting.
136
974aedcc
MP
1372017-11-22 Marek Polacek <polacek@redhat.com>
138
139 PR c++/60336
140 PR middle-end/67239
141 PR target/68355
142 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
143
d4300cc6
DM
1442017-11-21 David Malcolm <dmalcolm@redhat.com>
145
146 PR c/83056
147 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
148 earlier failed lookups.
149
1af4ebf5
MG
1502017-11-21 Marc Glisse <marc.glisse@inria.fr>
151
152 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
153 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
154
26edace6
DM
1552017-11-20 David Malcolm <dmalcolm@redhat.com>
156
157 PR c/81404
158 * c-decl.c: Include "c-family/known-headers.h".
159 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
160 to known-headers.cc.
161 (class suggest_missing_header): Move to known-header.h.
162 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
163 than get_c_name_hint.
164
b1212255
DM
1652017-11-20 David Malcolm <dmalcolm@redhat.com>
166
167 * c-decl.c (get_c_name_hint): New function.
168 (class suggest_missing_header): New class.
169 (lookup_name_fuzzy): Call get_c_name_hint and use it to
170 suggest missing headers to the user.
171
6c7a259b
DM
1722017-11-20 David Malcolm <dmalcolm@redhat.com>
173
174 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
175 Include "c-family/name-hint.h"
176 (implicit_decl_warning): Convert "hint" from
177 const char * to name_hint. Pass location to
178 lookup_name_fuzzy. Suppress any deferred diagnostic if the
179 warning was not printed.
180 (undeclared_variable): Likewise for "guessed_id".
181 (lookup_name_fuzzy): Convert return type from const char *
182 to name_hint. Add location_t param.
183 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
184 Include "c-family/name-hint.h"
185 (c_parser_declaration_or_fndef): Convert "hint" from
186 const char * to name_hint. Pass location to lookup_name_fuzzy.
187 (c_parser_parameter_declaration): Likewise.
188
f9c59f7e
JJ
1892017-11-19 Jakub Jelinek <jakub@redhat.com>
190
191 PR c/66618
192 PR c/69960
193 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
194 where needed.
195 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
196 handle_omp_array_sections): Likewise.
197 (digest_init): Don't call decl_constant_value_for_optimization.
198 * c-tree.h (decl_constant_value_for_optimization): Removed.
199 * c-fold.c (c_fold_array_ref): New function.
200 (c_fully_fold_internal): Add LVAL argument, propagate it through
201 recursive calls. For VAR_P call decl_constant_value and
202 unshare if not LVAL and either optimizing or IN_INIT. Remove
203 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
204 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
205 (c_fully_fold): Add LVAL argument, pass it through to
206 c_fully_fold_internal.
207 (decl_constant_value_for_optimization): Removed.
208
3ca0dc60
JM
2092017-11-15 Joseph Myers <joseph@codesourcery.com>
210
211 PR c/81156
212 * c-parser.c (check_tgmath_function): New function.
213 (enum tgmath_parm_kind): New enum.
214 (c_parser_postfix_expression): Handle __builtin_tgmath.
215
64a5912c
DM
2162017-10-31 David Malcolm <dmalcolm@redhat.com>
217
218 * c-decl.c (implicit_decl_warning): Update for renaming of
219 pedwarn_at_rich_loc and warning_at_rich_loc.
220 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
221 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
222 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
223 (c_parser_struct_or_union_specifier): Likewise for renaming of
224 pedwarn_at_rich_loc.
225 (c_parser_parameter_declaration): Likewise for renaming of
226 error_at_rich_loc.
227 * c-typeck.c (build_component_ref): Likewise.
228 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
229 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
230 (set_init_label): Likewise for renaming of error_at_rich_loc.
231
c1136864
RB
2322017-10-30 Richard Biener <rguenther@suse.de>
233
234 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
235 stmts.
236
ee5fd23a
MM
2372017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
238
239 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
240 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
241
1a59ccf2
DM
2422017-10-25 David Malcolm <dmalcolm@redhat.com>
243
244 PR c/7356
245 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
246 semicolons.
247
bc1a75dd
JJ
2482017-10-25 Jakub Jelinek <jakub@redhat.com>
249
250 PR libstdc++/81706
251 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
252 newdecl to corresponding __builtin_ if any.
253
ff1ff960
PC
2542017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
255
256 PR c++/82466
257 * c-decl.c (diagnose_mismatched_decls): Use
258 OPT_Wbuiltin_declaration_mismatch.
259
62e1c678
DM
2602017-10-12 David Malcolm <dmalcolm@redhat.com>
261
262 * c-parser.c (c_parser_require): Add "type_is_unique" param and
263 use it to guard calls to maybe_suggest_missing_token_insertion.
264 (c_parser_parms_list_declarator): Override default value of new
265 "type_is_unique" param to c_parser_require.
266 (c_parser_asm_statement): Likewise.
267 * c-parser.h (c_parser_require): Add "type_is_unique" param,
268 defaulting to true.
269
a92f6726
NS
2702017-10-11 Nathan Sidwell <nathan@acm.org>
271
272 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
273
8e6cdc90
RS
2742017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
275
276 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
277 operating on trees as wide_ints.
278 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
279 (c_tree_equal): Likewise.
280
8139a48e
DM
2812017-10-04 David Malcolm <dmalcolm@redhat.com>
282
283 * c-decl.c (push_parm_decl): Store c_parm's location into the
284 PARAM_DECL.
285 (build_c_parm): Add "loc" param and store it within the c_parm.
286 * c-parser.c (struct c_parser): Add "last_token_location" field.
287 (c_parser_consume_token): Store location of the token into the
288 new field.
289 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
290 when handling a FUNCTION_DECL, if it doesn't already have them.
291 (c_parser_parameter_declaration): Generate a location for the
292 parameter, and pass it to the call to build_c_parm.
293 * c-tree.h (struct c_parm): Add field "loc".
294 (build_c_parm): Add location_t param.
295 * c-typeck.c (get_fndecl_argument_location): New function.
296 (inform_for_arg): New function.
297 (convert_for_assignment): Use inform_for_arg when dealing with
298 ic_argpass.
299
2a389958
JJ
3002017-09-29 Jakub Jelinek <jakub@redhat.com>
301
7d386d45
JJ
302 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
303 width is non-NULL.
304 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
305 don't SET_DECL_C_BIT_FIELD here.
306
2a389958
JJ
307 PR c/82340
308 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
309 instead of trying to set just TREE_READONLY manually.
310
ebc6a85e
TV
3112017-09-16 Tom de Vries <tom@codesourcery.com>
312
313 PR c/81875
314 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
315 cond itself.
316
bb75facd
JM
3172017-09-15 Joseph Myers <joseph@codesourcery.com>
318
319 PR c/82071
320 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
321 for C11.
322 (build_conditional_expr): For C11, generate result with excess
323 precision when one argument is an integer and the other is of a
324 type using excess precision.
325
1d933576
BE
3262017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
327
328 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
329
267bbb6f
MP
3302017-09-13 Marek Polacek <polacek@redhat.com>
331
332 PR c/82167
333 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
334 than expr.original_type.
335
6836632e
NS
3362017-09-12 Nathan Sidwell <nathan@acm.org>
337
338 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
339 resort_sorted_fields): Moved from c-family/c-common.c.
340 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
341
e035be33
JM
3422017-09-01 Joseph Myers <joseph@codesourcery.com>
343
344 PR c/82071
345 * c-typeck.c (build_atomic_assign): Handle argument with excess
346 precision. Ensure any EXCESS_PRECISION_EXPR is present in
347 argument passed to build_binary_op and convert_for_assignment but
348 not for call to c_fully_fold.
349 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
350 Ensure build_binary_op is called with argument with original
351 semantic type. Avoid calling c_fully_fold with an
352 EXCESS_PRECISION_EXPR from build_binary_op.
353
d2e05fcb
JJ
3542017-09-01 Jakub Jelinek <jakub@redhat.com>
355
356 PR c/81887
357 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
358
b397965c
RS
3592017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
360 Alan Hayward <alan.hayward@arm.com>
361 David Sherwood <david.sherwood@arm.com>
362
363 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
364 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
365 m1 and m2 to the signed equivalent of a fixed-point
366 SCALAR_TYPE_MODE.
367
14e18d71
DM
3682017-08-24 David Malcolm <dmalcolm@redhat.com>
369
370 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
371 than CAN_HAVE_LOCATION_P when determining whether to use the
372 location_t value within "value".
373
7f204c0f
DM
3742017-08-21 David Malcolm <dmalcolm@redhat.com>
375
376 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
377 rather than peeking the location of the first token.
378 * c-tree.h (c_expr::get_location): New method.
379
2f687306
DM
3802017-08-21 David Malcolm <dmalcolm@redhat.com>
381
382 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
383 to check_function_arguments.
384
3e7b80d7
MP
3852017-08-18 Marek Polacek <polacek@redhat.com>
386
387 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
388 commentary.
389
00aa1fa2
L
3902017-08-18 H.J. Lu <hongjiu.lu@intel.com>
391
392 PR c/53037
393 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
394 (check_bitfield_type_and_width): Don't allow bit-field with
395 warn_if_not_aligned type.
396
da67acb9
MS
3972017-08-14 Martin Sebor <msebor@redhat.com>
398
399 PR c/81117
400 * c-objc-common.c (c_objc_common_init): Handle 'G'.
401
bb85aa74
MP
4022017-08-11 Marek Polacek <polacek@redhat.com>
403
404 PR c/81795
405 * c-decl.c (pushtag): Only print inform if the warning was printed.
406 (grokdeclarator): Likewise.
407
32129a17
DM
4082017-08-10 David Malcolm <dmalcolm@redhat.com>
409
410 * c-parser.c (c_parser_error): Rename to...
411 (c_parser_error_richloc): ...this, making static, and adding
412 "richloc" parameter, passing it to the c_parse_error call,
413 rather than calling c_parser_set_source_position_from_token.
414 (c_parser_error): Reintroduce, reimplementing in terms of the
415 above, converting return type from void to bool.
416 (class token_pair): New class.
417 (struct matching_paren_traits): New struct.
418 (matching_parens): New typedef.
419 (struct matching_brace_traits): New struct.
420 (matching_braces): New typedef.
421 (get_matching_symbol): New function.
422 (c_parser_require): Add param MATCHING_LOCATION, using it to
423 highlight matching "opening" tokens for missing "closing" tokens.
424 (c_parser_skip_until_found): Likewise.
425 (c_parser_static_assert_declaration_no_semi): Convert explicit
426 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
427 class matching_parens, so that the pertinent open parenthesis is
428 highlighted when there are problems locating the close
429 parenthesis.
430 (c_parser_struct_or_union_specifier): Likewise.
431 (c_parser_typeof_specifier): Likewise.
432 (c_parser_alignas_specifier): Likewise.
433 (c_parser_simple_asm_expr): Likewise.
434 (c_parser_braced_init): Likewise, for matching_braces.
435 (c_parser_paren_condition): Likewise, for matching_parens.
436 (c_parser_switch_statement): Likewise.
437 (c_parser_for_statement): Likewise.
438 (c_parser_asm_statement): Likewise.
439 (c_parser_asm_operands): Likewise.
440 (c_parser_cast_expression): Likewise.
441 (c_parser_sizeof_expression): Likewise.
442 (c_parser_alignof_expression): Likewise.
443 (c_parser_generic_selection): Likewise.
444 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
445 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
446 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
447 In case CPP_OPEN_PAREN, pass loc_open_paren to the
448 c_parser_skip_until_found call.
449 (c_parser_objc_class_definition): Use class matching_parens as
450 above.
451 (c_parser_objc_method_decl): Likewise.
452 (c_parser_objc_try_catch_finally_statement): Likewise.
453 (c_parser_objc_synchronized_statement): Likewise.
454 (c_parser_objc_at_property_declaration): Likewise.
455 (c_parser_oacc_wait_list): Likewise.
456 (c_parser_omp_var_list_parens): Likewise.
457 (c_parser_omp_clause_collapse): Likewise.
458 (c_parser_omp_clause_default): Likewise.
459 (c_parser_omp_clause_if): Likewise.
460 (c_parser_omp_clause_num_threads): Likewise.
461 (c_parser_omp_clause_num_tasks): Likewise.
462 (c_parser_omp_clause_grainsize): Likewise.
463 (c_parser_omp_clause_priority): Likewise.
464 (c_parser_omp_clause_hint): Likewise.
465 (c_parser_omp_clause_defaultmap): Likewise.
466 (c_parser_oacc_single_int_clause): Likewise.
467 (c_parser_omp_clause_ordered): Likewise.
468 (c_parser_omp_clause_reduction): Likewise.
469 (c_parser_omp_clause_schedule): Likewise.
470 (c_parser_omp_clause_num_teams): Likewise.
471 (c_parser_omp_clause_thread_limit): Likewise.
472 (c_parser_omp_clause_aligned): Likewise.
473 (c_parser_omp_clause_linear): Likewise.
474 (c_parser_omp_clause_safelen): Likewise.
475 (c_parser_omp_clause_simdlen): Likewise.
476 (c_parser_omp_clause_depend): Likewise.
477 (c_parser_omp_clause_map): Likewise.
478 (c_parser_omp_clause_device): Likewise.
479 (c_parser_omp_clause_dist_schedule): Likewise.
480 (c_parser_omp_clause_proc_bind): Likewise.
481 (c_parser_omp_clause_uniform): Likewise.
482 (c_parser_omp_for_loop): Likewise.
483 (c_parser_cilk_clause_vectorlength): Likewise.
484 (c_parser_cilk_clause_linear): Likewise.
485 (c_parser_transaction_expression): Likewise.
486 * c-parser.h (c_parser_require): Add param matching_location with
487 default UNKNOWN_LOCATION.
488 (c_parser_error): Convert return type from void to bool.
489 (c_parser_skip_until_found): Add param matching_location with
490 default UNKNOWN_LOCATION.
491
30af3a2b
MP
4922017-08-09 Marek Polacek <polacek@redhat.com>
493
494 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
495 * c-tree.h (build_external_ref): Update declaration.
496 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
497 (build_external_ref): Change the type of a parameter to bool.
498 (parser_build_binary_op): Use true/false instead of 1/0.
499 (pointer_diff): Likewise.
500 (build_modify_expr): Likewise.
501 (set_designator): Change the type of a parameter to bool.
502 (set_init_index): Use true/false instead of 1/0.
503 (set_init_label): Likewise.
504 (output_init_element): Change the type of a parameter to bool.
505 (output_pending_init_elements): Use true/false instead of 1/0.
506 (process_init_element): Likewise.
507 (build_binary_op): Change the type of a parameter to bool.
508
296c53ac
MP
5092017-08-09 Marek Polacek <polacek@redhat.com>
510
511 PR c/81233
512 * c-typeck.c (pedwarn_init): Make the function take a variable list.
513 Call emit_diagnostic_valist instead of pedwarn.
514 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
515 Print the relevant types in diagnostics.
516
a32c8316
MP
5172017-08-09 Marek Polacek <polacek@redhat.com>
518
519 PR c/81417
520 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
521 build_conditional_expr.
522 * c-parser.c (c_parser_conditional_expression): Create locations for
523 EXP1 and EXP2 from their source ranges. Pass the locations down to
524 build_conditional_expr.
525 * c-tree.h (build_conditional_expr): Update declaration.
526 * c-typeck.c (build_conditional_expr): Add location_t parameters.
527 For -Wsign-compare, also print the types.
528
314e6352
ML
5292017-08-08 Martin Liska <mliska@suse.cz>
530
531 * c-convert.c: Include header files.
532 * c-typeck.c: Likewise.
533
577eec56
ML
5342017-08-07 Martin Liska <mliska@suse.cz>
535
536 * c-parser.c (c_parser_attributes): Canonicalize name of an
537 attribute.
538
f7b6353a
MP
5392017-08-02 Marek Polacek <polacek@redhat.com>
540
541 PR c/81289
542 * c-parser.c (c_parser_unary_expression): Use set_error.
543
8a6eab34
MP
544 PR c/81448
545 PR c/81306
546 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
547 warnings. Avoid walking MACRO_MAP_LOCATIONS.
548
7fef86d3
JH
5492017-07-31 Jan Hubicka <hubicka@ucw.cz>
550 Martin Liska <mliska@suse.cz>
551
552 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 553 statement.
7fef86d3 554
f34ebeb2
ML
5552017-07-31 Martin Liska <mliska@suse.cz>
556
557 PR sanitize/81530
558 * c-convert.c (convert): Guard condition with flag_sanitize_p
559 also with current_function_decl non-null equality.
560 * c-decl.c (grokdeclarator): Likewise.
561 * c-typeck.c (build_binary_op): Likewise.
562
8595f67b
MP
5632017-07-25 Marek Polacek <polacek@redhat.com>
564
565 * c-decl.c (grokfield): Remove local variable.
566
d49718d6
MP
5672017-07-25 Marek Polacek <polacek@redhat.com>
568
569 PR c/81364
570 * c-parser.c (c_parser_else_body): Don't warn about multistatement
571 macro expansion if the body is in { }.
572 (c_parser_while_statement): Likewise.
573 (c_parser_for_statement): Likewise.
574
ff22eb12
NS
5752017-07-18 Nathan Sidwell <nathan@acm.org>
576
577 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
578
eea77d1f
DM
5792017-07-14 David Malcolm <dmalcolm@redhat.com>
580
581 * c-decl.c (implicitly_declare): When suggesting a missing
582 #include, provide a fix-it hint.
583
b6f43128
DM
5842017-07-06 David Malcolm <dmalcolm@redhat.com>
585
586 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
587 and call that instead.
588 * c-tree.h (selftest::run_c_tests): New decl.
589
3e2becc4
MP
5902017-06-26 Marek Polacek <polacek@redhat.com>
591
592 PR c/80116
593 * c-parser.c (c_parser_if_body): Set the location of the
594 body of the conditional after parsing all the labels. Call
595 warn_for_multistatement_macros.
596 (c_parser_else_body): Likewise.
597 (c_parser_switch_statement): Likewise.
598 (c_parser_while_statement): Likewise.
599 (c_parser_for_statement): Likewise.
600 (c_parser_statement): Add a default argument. Save the location
601 after labels have been parsed.
602 (c_parser_c99_block_statement): Likewise.
603
343ae898
RB
6042017-06-19 Richard Biener <rguenther@suse.de>
605
606 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
607 negated _Literals to parse _Literal (int) -1.
608
45b2222a
ML
6092017-06-13 Martin Liska <mliska@suse.cz>
610
611 PR sanitize/78204
612 * c-convert.c (convert): Use sanitize_flags_p.
613 * c-decl.c (grokdeclarator): Likewise.
614 * c-typeck.c (convert_for_assignment): Likewise.
615 (c_finish_return): Likewise.
616 (build_binary_op): Likewise.
617
8ab7005b
JJ
6182017-06-08 Jakub Jelinek <jakub@redhat.com>
619
620 PR c/81006
621 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
622 to sizetype before size_binop.
623
363dc72c
JJ
6242017-06-07 Jakub Jelinek <jakub@redhat.com>
625
626 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
627 of TDI_generic.
628
dc949728
MP
6292017-06-06 Marek Polacek <polacek@redhat.com>
630
631 PR c/79983
632 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
633 ref.
634 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
635
40ffd95f
BE
6362017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
637
638 * c-parser.c (c_parser_binary_expression): Implement the
639 -Wsizeof_pointer_div warning.
640 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
641 from a parenthesized expression.
642 (c_parser_expr_list): Use c_last_sizeof_loc.
643 * c-tree.h (c_last_sizeof_loc): New external.
644 * c-typeck.c (c_last_sizeof_loc): New variable.
645 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
646
9fc5e7a4
MM
6472017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
648
649 PR testsuite/80580
650 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
651
f012c8ef
DM
6522017-05-30 David Malcolm <dmalcolm@redhat.com>
653
654 * c-objc-common.c (c_tree_printer): Gain bool and const char **
655 parameters.
656
3cd211af
MS
6572017-05-24 Martin Sebor <msebor@redhat.com>
658
659 PR c/80731
660 * c-fold.c (c_fully_fold_internal): Adjust.
661 * c-typeck.c (parser_build_unary_op): Adjust.
662
fd71a9a2
TS
6632017-05-23 Thomas Schwinge <thomas@codesourcery.com>
664
665 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
666 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
667 "VECTOR_LENGTH".
668
92fa0f9e
MP
6692017-05-23 Marek Polacek <polacek@redhat.com>
670
671 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
672 quotes.
673
d11c168a
JJ
6742017-05-22 Jakub Jelinek <jakub@redhat.com>
675
676 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
677 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
678 it returned invariant. Call tree_invariant_p unconditionally
679 afterwards to decide whether to return expr or op0.
680
58aca9d9
NS
6812017-05-22 Nathan Sidwell <nathan@acm.org>
682
683 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
684
7fd549d2
TS
6852017-05-19 Thomas Schwinge <thomas@codesourcery.com>
686
687 * c-parser.c (c_parser_omp_clause_default): Handle
688 "OMP_CLAUSE_DEFAULT_PRESENT".
689
6ecd2339
BE
6902017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
691
692 * config-lang.in (gtfiles): Add c-family/c-format.c.
693
8a57ecff
NS
6942017-05-18 Nathan Sidwell <nathan@acm.org>
695
696 * c-decl.c (pushdecl_top_level): Delete unused function.
697
6574d78e
MP
6982017-05-18 Marek Polacek <polacek@redhat.com>
699
700 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
701 (check_earlier_gotos): Likewise.
702 (define_label): Likewise.
703 (pending_xref_error): Likewise.
704 (smallest_type_quals_location): Likewise.
705 (grokdeclarator): Likewise.
706 (grokparms): Likewise.
707 (identifier_global_value): Likewise.
708 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
709 (find_init_member): Likewise.
710
e3455240
MP
7112017-05-18 Marek Polacek <polacek@redhat.com>
712
713 * c-decl.c (start_decl): Use false/true instead of 0/1.
714 (grokdeclarator): Likewise.
715 (finish_struct): Likewise.
716 (start_function): Change the return type to bool. Use false/true
717 instead of 0/1.
718 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
719 * c-tree.h (start_function): Update.
720 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
721 (set_designator): Change the return type to bool. Use false/true
722 instead of 0/1.
723
3fa8871b
MP
7242017-05-17 Marek Polacek <polacek@redhat.com>
725
726 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
727 * c-typeck.c: Likewise.
728
142473df
MP
7292017-05-17 Marek Polacek <polacek@redhat.com>
730
731 PR sanitizer/80659
732 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
733 DECL_IGNORED_P even for non-static compound literals.
734
1a817418
ML
7352017-05-17 Martin Liska <mliska@suse.cz>
736
737 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
738 use it instead of int type.
739
b2fa0a8b
MP
7402017-05-17 Marek Polacek <polacek@redhat.com>
741
742 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
743 call c_fully_fold.
744 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
745 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
746 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
747 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
748 save_expr.
749 (c_parser_conditional_expression): Likewise.
750 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
751 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
752 (process_init_element): Likewise.
753 (build_binary_op): Likewise.
754 (handle_omp_array_sections_1): Likewise.
755
1e47f02b
TS
7562017-05-12 Thomas Schwinge <thomas@codesourcery.com>
757
758 * c-parser.c (c_parser_omp_clause_num_gangs)
759 (c_parser_omp_clause_num_workers)
760 (c_parser_omp_clause_vector_length): Merge functions into...
761 (c_parser_oacc_single_int_clause): ... this new function. Adjust
762 all users.
763
c24e924f
NS
7642017-05-11 Nathan Sidwell <nathan@acm.org>
765
766 * gimple-parser.c: Don't #include tree-dump.h.
767
c587104e
MM
7682017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
769
770 PR testsuite/80580
771 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
772
67ac9a9d
MM
7732017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
774
775 PR testsuite/80580
776 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
777 incorrect __MEM syntax.
778
ac4eb40f
MM
7792017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
780
781 PR testsuite/80580
782 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
783 type of unary '*'.
784
641da50a
NS
7852017-05-09 Nathan Sidwell <nathan@acm.org>
786
787 * c-tree.h (pushdecl): Declare.
788
56d35585
DM
7892017-05-05 David Malcolm <dmalcolm@redhat.com>
790
791 * c-decl.c (warn_defaults_to): Replace report_diagnostic
792 with diagnostic_report_diagnostic.
793 * c-errors.c (pedwarn_c99): Likewise.
794 (pedwarn_c90): Likewise.
795
815d9cc6
XR
7962017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
797
798 PR c++/80038
799 * c-gimplify.c (c_gimplify_expr): Remove calls to
800 cilk_gimplifY_call_params_in_spawned_fn.
801
1c4ea66f
DM
8022017-04-25 David Malcolm <dmalcolm@redhat.com>
803
804 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
805 hint for removing extra semicolon.
806
666f7903
JJ
8072017-04-21 Jakub Jelinek <jakub@redhat.com>
808
809 PR c/80468
810 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
811 enabled, set specs->type to integer_type_node.
812
5764ee3c
JW
8132017-04-03 Jonathan Wakely <jwakely@redhat.com>
814
815 * c-array-notation.c: Fix typo in comment.
816
10fa8dfb
MP
8172017-03-29 Marek Polacek <polacek@redhat.com>
818
819 PR c/79730
820 * c-decl.c (finish_decl): Check VAR_P.
821
a9e4a1a5
JJ
8222017-03-27 Jakub Jelinek <jakub@redhat.com>
823
824 PR middle-end/80162
825 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
826 * c-typeck.c (c_mark_addressable): Likewise. Look through
827 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
828 to ARRAY_TYPE.
829 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
830
ee3ff394
MP
8312017-03-23 Marek Polacek <polacek@redhat.com>
832
833 * c-tree.h: Remove a C_RID_YYCODE reference.
834
4d1b8e70
JJ
8352017-03-21 Jakub Jelinek <jakub@redhat.com>
836
837 PR c/80097
838 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
839 optional COMPOUND_EXPR with ubsan instrumentation.
840
31dc71a8
MP
8412017-03-17 Marek Polacek <polacek@redhat.com>
842
843 * c-parser.c: Add C11 references.
844
d579c385
MP
8452017-03-15 Marek Polacek <polacek@redhat.com>
846
847 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
848
85059a38
MP
8492017-03-11 Marek Polacek <polacek@redhat.com>
850
851 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
852
2f6f187a
DM
8532017-03-10 David Malcolm <dmalcolm@redhat.com>
854
855 PR translation/79848
856 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
857 "%qs".
858 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
859
36618428
MP
8602017-03-09 Marek Polacek <polacek@redhat.com>
861
862 PR sanitizer/79757
863 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
864 parameter declarations with initializers.
865
01e5af5a
JJ
8662017-03-09 Jakub Jelinek <jakub@redhat.com>
867
868 PR c/79969
869 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
870 TYPE_STUB_DECL.
871
a71dbc63
JJ
8722017-03-07 Jakub Jelinek <jakub@redhat.com>
873
874 PR c/79834
875 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
876 for "may only be used in compound statements" diagnostics, change it
877 such that the same translatable string is used for all pragmas. For
878 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
879 diagnostics.
880 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
881 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
882 "may only be used in compound statements" diagnostics, such that the
883 same translatable string is used for all pragmas.
884
1ff4bae6
MP
8852017-03-04 Marek Polacek <polacek@redhat.com>
886
887 PR c/79847
888 * c-decl.c (implicit_decl_warning): Add missing space.
889
7f5a7d78
MP
8902017-03-03 Marek Polacek <polacek@redhat.com>
891
892 PR c/79758
893 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
894 current_function_prototype_arg_types is error_mark_node. Fix
895 formatting. Use TREE_VALUE instead of TREE_TYPE.
896
883c8f06
JJ
8972017-03-03 Jakub Jelinek <jakub@redhat.com>
898
79c9b7a8
JJ
899 PR c/79837
900 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
901 %<min%> or %<max%> in the diagnostics, instead mention identifier.
902 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
903 diagnostics.
904
883c8f06
JJ
905 PR c/79836
906 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
907 instead of %<_Generic>.
908 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
909 (c_parser_omp_target_exit_data): Use %<release%> instead of
910 %<release>.
911
324ff1a0
JJ
9122017-02-28 Jakub Jelinek <jakub@redhat.com>
913
914 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
915 instead of just cond ? "..." : "...".
916 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
917 for "enter"/"exit" keyword.
918 (c_finish_oacc_routine): Don't use %s to supply portions of the
919 message.
920
4227c9ad
JJ
9212017-02-24 Jakub Jelinek <jakub@redhat.com>
922
923 PR c++/79588
924 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
925 handle -Wrestrict here.
926 * c-typeck.c (build_function_call_vec): Adjust
927 check_function_arguments caller.
928
5d972e66
RB
9292017-02-23 Richard Biener <rguenther@suse.de>
930
931 PR c/79684
932 * gimple-parser.c (c_parser_gimple_statement): Use set_error
933 to initialize c_exprs to return.
934 (c_parser_gimple_binary_expression): Likewise.
935 (c_parser_gimple_unary_expression): Likewise.
936 (c_parser_gimple_postfix_expression): Likewise.
937
61ac5ebe
MP
9382017-02-22 Marek Polacek <polacek@redhat.com>
939
940 PR c/79662
941 * c-typeck.c (convert_arguments): Handle error_mark_node.
942
41d1b0b1
PK
9432017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
944
945 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
946 value of c_parser_parse_ssa_name against error_mark_node and emit
947 error if ssa name is anonymous and written as default definition.
948
eab1f169
PK
9492017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
950
951 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
952 FMA_EXPR.
953
bcac0b4d
JJ
9542017-02-16 Jakub Jelinek <jakub@redhat.com>
955
956 PR c++/79512
957 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
958 ignore #pragma omp target even when not followed by identifier.
959
1be33173
PK
9602017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
961
962 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
963 (c_parser_gimple_unary_expression): Likewise.
964
aa326bfb
JJ
9652017-02-13 Jakub Jelinek <jakub@redhat.com>
966
967 * c-parser.c (c_parser_oacc_declare): Add missing space in
968 diagnostics.
969
8a398bc5
PK
9702017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
971
972 PR c/79478
973 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
974 set_c_expr_source_range when parsing ssa-name.
975
3dcde5ef
PG
9762017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
977 Richard Biener <rguenther@suse.de>
978
979 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
980 building IL when arguments are error_mark_node.
981 (c_parser_gimple_unary_expression): Likewise.
982 (c_parser_gimple_if_stmt): Likewise.
983 (c_parser_gimple_switch_stmt): Likewise.
984 (c_parser_gimple_return_stmt): Likewise.
985 (c_parser_parse_ssa_name): When name lookup fails do not build
986 an SSA name. Use undeclared rather than not declared in error
987 reporting.
988
192b048b
MP
9892017-02-09 Marek Polacek <polacek@redhat.com>
990
991 PR c/79428
992 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
993 instead of c_parser_skip_until_found.
994
56f71478
JJ
9952017-02-09 Jakub Jelinek <jakub@redhat.com>
996
997 PR c/79431
998 * c-parser.c (c_parser_omp_declare_target): Don't invoke
999 symtab_node::get on automatic variables.
1000
02889d23
CLT
10012016-02-09 Nathan Sidwell <nathan@codesourcery.com>
1002 Chung-Lin Tang <cltang@codesourcery.com>
1003
1004 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
1005 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
1006 semantic checking.
1007 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
1008
7af4b20d
RB
10092017-02-07 Richard Biener <rguenther@suse.de>
1010
1011 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
1012 (c_parser_gimple_postfix_expression_after_primary):
1013 Do not use c_build_function_call_vec to avoid folding and promotion.
1014 Simplify.
1015
e5e391d6
MO
10162017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
1017
1018 PR lto/79061
1019 * c-decl.c (pop_scope): Pass main_input_filename to
1020 build_translation_unit_decl.
1021
c2e84327
DM
10222017-01-24 David Malcolm <dmalcolm@redhat.com>
1023
1024 * c-parser.c: Include "read-rtl-function.h" and
1025 "run-rtl-passes.h".
1026 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
1027 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
1028 production. Update for renaming of field "gimple_pass" to
1029 "gimple_or_rtl_pass". If __RTL was seen, call
1030 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
1031 to an auto_timevar, to cope with early exit.
1032 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
1033 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
1034 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
1035 Handle RID_RTL.
1036 (c_parser_parse_rtl_body): New function.
1037 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
1038 (struct c_declspecs): Rename field "gimple_pass" to
1039 "gimple_or_rtl_pass". Add field "rtl_p".
1040 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
1041 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
1042 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
1043 (c_parser_gimple_or_rtl_pass_list): ...this.
1044
2ebd93e1
MP
10452017-01-20 Marek Polacek <polacek@redhat.com>
1046
1047 PR c/64279
1048 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
1049
b1c95bb5
RB
10502017-01-13 Richard Biener <rguenther@suse.de>
1051
1052 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
1053 nops.
1054
25329913
RB
10552017-01-13 Richard Biener <rguenther@suse.de>
1056
1057 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1058 _Literal ( type-name ) number.
1059
6bb4ea5c
RB
10602017-01-12 Richard Biener <rguenther@suse.de>
1061
1062 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1063 __MEM.
1064
6b5b4e9c
JJ
10652017-01-11 Jakub Jelinek <jakub@redhat.com>
1066
1067 PR c++/72813
1068 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
1069 PCH file.
1070
e3252775
RB
10712017-01-11 Richard Biener <rguenther@suse.de>
1072
1073 PR bootstrap/79052
1074 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
1075 returns on parse errors.
1076
a9342885
MP
10772017-01-04 Marek Polacek <polacek@redhat.com>
1078
1079 PR c++/64767
1080 * c-parser.c (c_parser_postfix_expression): Mark zero character
1081 constants by setting original_type in c_expr.
1082 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
1083 with a zero character constant.
1084 (char_type_p): New function.
1085
5dd9a9d0
DM
10862017-01-04 David Malcolm <dmalcolm@redhat.com>
1087
1088 * c-parser.c (c_parser_declaration_or_fndef): Create a
1089 rich_location at init_loc and parse it to start_init.
1090 (last_init_list_comma): New global.
1091 (c_parser_braced_init): Update last_init_list_comma when parsing
1092 commas. Pass it to pop_init_level. Pass location of closing
1093 brace to pop_init_level.
1094 (c_parser_postfix_expression_after_paren_type): Create a
1095 rich_location at type_loc and parse it to start_init.
1096 (c_parser_omp_declare_reduction): Likewise for loc.
1097 * c-tree.h (start_init): Add rich_location * param.
1098 (pop_init_level): Add location_t param.
1099 * c-typeck.c (struct initializer_stack): Add field
1100 "missing_brace_richloc".
1101 (start_init): Add richloc param, use it to initialize
1102 the stack node's missing_brace_richloc.
1103 (last_init_list_comma): New decl.
1104 (finish_implicit_inits): Pass last_init_list_comma to
1105 pop_init_level.
1106 (push_init_level): When finding missing open braces, add fix-it
1107 hints to the richloc.
1108 (pop_init_level): Add "insert_before" param and pass it
1109 when calling pop_init_level. Add fixits about missing
1110 close braces to any richloc. Use the richloc for the
1111 -Wmissing-braces warning.
1112 (set_designator): Pass last_init_list_comma to pop_init_level.
1113 (process_init_element): Likewise.
1114
cbe34bb5
JJ
11152017-01-01 Jakub Jelinek <jakub@redhat.com>
1116
1117 Update copyright years.
1118
d17680f3
JJ
11192016-12-21 Jakub Jelinek <jakub@redhat.com>
1120
0dba7960
JJ
1121 PR bootstrap/78817
1122 * c-typeck.c (build_function_call_vec): If check_function_arguments
1123 returns true, set TREE_NO_WARNING on CALL_EXPR.
1124
d17680f3
JJ
1125 PR c/77767
1126 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
1127 to *expr instead of overwriting it.
1128
aa90531e
RB
11292016-12-20 Richard Biener <rguenther@suse.de>
1130
1131 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
1132 error recovery.
1133 (c_parser_gimple_statement): Only build assigns for non-error
1134 stmts.
1135 (c_parser_gimple_postfix_expression_after): Improve error recovery.
1136
629b3d75
MJ
11372016-12-14 Martin Jambor <mjambor@suse.cz>
1138
1139 * c-parser.c: Include omp-general.h and omp-offload.h instead of
1140 omp-low.h.
1141 (c_finish_oacc_routine): Adjusted call to
1142 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
1143 to use their new names.
1144 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
1145 use its new name.
1146 (c_parser_oacc_update): Likewise.
1147 (c_parser_omp_simd): Likewise.
1148 (c_parser_omp_target_update): Likewise.
1149 * c-typeck.c: Include omp-general.h instead of omp-low.h.
1150 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
1151 name.
1152 (c_finish_omp_cancellation_point): Likewise.
1153 * gimple-parser.c: Do not include omp-low.h
1154
c5af52eb
CP
11552016-12-02 Cesar Philippidis <cesar@codesourcery.com>
1156 James Norris <jnorris@codesourcery.com>
1157
1158 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
1159 EXIT_DATA,WAIT} are not used in compound statements.
1160 (c_parser_oacc_enter_exit_data): Update diagnostics.
1161
48330c93
BE
11622016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
1163
1164 PR c++/71973
1165 * c-decl.c (diagnose_mismatched_decls): Use
1166 OPT_Wbuiltin_declaration_mismatch here too.
1167
899ca90e 11682016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
1169 Alan Hayward <alan.hayward@arm.com>
1170 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
1171
1172 * c-decl.c (merge_decls): Use SET_DECL_MODE.
1173 (make_label, finish_struct): Likewise.
1174
1ee62b92 11752016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 1176 Richard Biener <rguenther@suse.de>
22b15758 1177
8e745a17
JJ
1178 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
1179 * config-lang.in (gtfiles): Add c/c-parser.h.
1180 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
1181 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
1182 * c-parser.c (enum c_id_kind, struct c_token,
1183 c_parser_next_token_is, c_parser_next_token_is_not,
1184 c_parser_next_token_is_keyword,
1185 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
1186 Split out to ...
1187 * c-parser.h: ... new header.
1188 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 1189 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
1190 c_token_starts_typename, c_parser_next_token_starts_declspecs,
1191 c_parser_next_tokens_start_declaration, c_parser_consume_token,
1192 c_parser_error, c_parser_require, c_parser_skip_until_found,
1193 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1194 c_parser_type_name): Export.
1195 (c_parser_tokens_buf): New function.
1196 (c_parser_error): Likewise.
1197 (c_parser_set_error): Likewise.
1198 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
1199 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
1200 via c_parser_parse_gimple_body.
8e745a17
JJ
1201 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
1202 c_token_starts_typename, c_parser_next_token_starts_declspecs,
1203 c_parser_next_tokens_start_declaration, c_parser_consume_token,
1204 c_parser_error, c_parser_require, c_parser_skip_until_found,
1205 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1206 c_parser_type_name): Declare.
1ee62b92
PG
1207 (struct c_parser): Declare forward.
1208 (c_parser_tokens_buf): Declare.
8e745a17
JJ
1209 (c_parser_error): Likewise.
1210 (c_parser_set_error): Likewise.
1211 * gimple-parser.c: New file.
1212 * gimple-parser.h: Likewise.
1ee62b92 1213
22b15758
UB
12142016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1215
1216 PR c/35503
1217 * c-parser.c (c_parser_postfix_expression_after_primary): Call
1218 warn_for_restrict.
1219
84ff4775
LCW
12202016-09-11 Le-Chun Wu <lcwu@google.com>
1221 Mark Wielaard <mjw@redhat.com>
1222
1223 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
1224 to the given -Wshadow= variant.
1225
4d0cdd0c
TP
12262016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
1227
1228 * c-typeck.c: Include memmodel.h.
1229
1202f33e
JJ
12302016-10-13 Jakub Jelinek <jakub@redhat.com>
1231
1232 PR target/77957
1233 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
1234 instead of lhd_return_null_tree_v.
1235
8a14afd0
BS
12362016-10-07 Bernd Schmidt <bschmidt@redhat.com>
1237
1238 PR c++/69733
1239 * c-decl.c (smallest_type_quals_location): New static function.
1240 (grokdeclarator): Try to find the correct location for an ignored
1241 qualifier.
1242
81fea426
MP
12432016-09-26 Marek Polacek <polacek@redhat.com>
1244
1245 PR c/7652
1246 * c-decl.c (pop_scope): Add gcc_fallthrough.
1247
12482016-09-26 Marek Polacek <polacek@redhat.com>
1249
1250 PR c/7652
1251 * c-parser.c (struct c_token): Add flags field.
1252 (c_lex_one_token): Pass it to c_lex_with_flags.
1253 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
1254 into IFN_FALLTHROUGH.
1255 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
1256 attribute fallthrough after a case label or default label.
1257 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
1258
9a2300e9
MP
12592016-09-24 Marek Polacek <polacek@redhat.com>
1260
1261 PR c/77490
1262 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
1263 have boolean value. Warn about ++/-- on booleans.
1264
7de76362
JJ
12652016-09-23 Jakub Jelinek <jakub@redhat.com>
1266
1267 * c-parser.c (incomplete_record_decls): Remove unnecessary
1268 = vNULL initialization of file scope vec.
1269
5b73d2ab
MP
12702016-09-16 Marek Polacek <polacek@redhat.com>
1271
1272 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
1273
e51fbec3
MP
12742016-09-14 Marek Polacek <polacek@redhat.com>
1275
1276 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
1277 (fix_array_notation_expr): Likewise.
1278 * c-decl.c (finish_decl): Likewise.
1279 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1280 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
1281 (function_to_pointer_conversion): Use false instead of 0.
1282 (convert_lvalue_to_rvalue): Likewise.
1283 (parser_build_unary_op): Likewise.
1284 (build_atomic_assign): Likewise.
1285 (build_unary_op): Change nonconvert parameter type to bool, use
1286 true/false instead of 1/0.
1287 (build_binary_op): Use true instead of 1.
1288
254830ba
DM
12892016-09-13 David Malcolm <dmalcolm@redhat.com>
1290
1291 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
1292 of add_fixit_insert to add_fixit_insert_before.
1293
4c13ba17
MP
12942016-09-13 Marek Polacek <polacek@redhat.com>
1295
1296 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
1297 it.
1298
54dcdb88
BE
12992016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
1300
1301 PR c++/77496
1302 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
1303 COMPOUND_EXPR to warn_for_omitted_condop.
1304
e5106e27
DM
13052016-09-07 David Malcolm <dmalcolm@redhat.com>
1306
1307 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
1308 c_get_substring_location for this new langhook.
1309
9dc5773f
JJ
13102016-09-02 Jakub Jelinek <jakub@redhat.com>
1311
1312 PR c/65467
1313 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
1314 flag_openmp.
1315 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
1316 instead of mark_exp_read on low_bound/length expression.
1317 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
1318 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
1319 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
1320 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
1321 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
1322 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
1323 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
1324 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
1325 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
1326 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
1327 instead of mark_expr_read.
1328 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
1329 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
1330 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
1331 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
1332 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
1333 array section bases outside of depend clause, for depend clause
1334 use convert_lvalue_to_rvalue on the base.
1335 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
1336 linear, aligned, map, to and from clauses.
1337 (c_omp_clause_copy_ctor): New function.
1338
295844f6
MP
13392016-09-01 Marek Polacek <polacek@redhat.com>
1340
1341 PR c/7652
1342 * c-typeck.c (composite_type): Add FALLTHRU comment.
1343
089af25c
DM
13442016-08-31 David Malcolm <dmalcolm@redhat.com>
1345
1346 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
1347 to the insertion fixits for "struct", "union", and "enum".
1348
f9087798
DM
13492016-08-30 David Malcolm <dmalcolm@redhat.com>
1350
1351 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
1352 rather than add_fixit_misspelled_id.
1353 (undeclared_variable): Likewise.
1354 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
1355 now-redundant "here" params from add_fixit_insert method calls.
1356 (c_parser_parameter_declaration): Likewise.
1357 * c-typeck.c (build_component_ref): Remove now-redundant range
1358 param from add_fixit_replace method calls.
1359
ebef225f
MP
13602016-08-25 Marek Polacek <polacek@redhat.com>
1361
1362 * c-typeck.c (parser_build_binary_op): Pass LHS to
1363 warn_logical_not_parentheses.
1364
fe377a48
MP
13652016-08-25 Marek Polacek <polacek@redhat.com>
1366
1367 PR c/77323
1368 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
1369 or _FloatN or _FloatNx is not supported.
1370 (finish_declspecs): Set type to integer_type_node when _FloatN or
1371 _FloatNx is not supported.
1372
c65699ef
JM
13732016-08-19 Joseph Myers <joseph@codesourcery.com>
1374
1375 PR c/32187
1376 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
1377 (struct c_declspecs): Add field floatn_nx_idx.
1378 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
1379 and _FloatNx type specifiers.
1380 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
1381 (c_parser_declspecs, c_parser_attribute_any_word)
1382 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
1383 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
1384 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
1385 narrower than double.
1386
2f1364c2
JJ
13872016-08-12 Jakub Jelinek <jakub@redhat.com>
1388 Martin Liska <mliska@suse.cz>
1389
1390 PR c/67410
1391 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
1392 % to determine val element to change. Assert that
1393 wchar_bytes * charwidth fits into val array.
1394
191816a3
MP
13952016-08-12 Marek Polacek <polacek@redhat.com>
1396
1397 PR c/7652
1398 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
1399 (c_parser_postfix_expression): Likewise.
1400 * c-typeck.c (build_unary_op): Adjust fall through comment.
1401 (c_mark_addressable): Likewise.
1402
b95a64bb
JJ
14032016-08-11 Jakub Jelinek <jakub@redhat.com>
1404
1405 PR c/72816
1406 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
1407 array member through typedef, for orig_qual_indirect == 0 clear
1408 orig_qual_type.
1409
895aa8e1
DM
14102016-08-08 David Malcolm <dmalcolm@redhat.com>
1411
1412 PR c/64955
1413 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
1414 this up to selftest::run_c_tests.
1415 (selftest::run_c_tests): New function.
1416
0b212d8c
TS
14172016-08-04 Thomas Schwinge <thomas@codesourcery.com>
1418
ae9281fc
TS
1419 * c-parser.c (struct oacc_routine_data): Add error_seen and
1420 fndecl_seen members.
1421 (c_finish_oacc_routine): Use these.
1422 (c_parser_declaration_or_fndef): Adjust.
1423 (c_parser_oacc_routine): Likewise. Support more C language
1424 constructs, and improve diagnostics. Move pragma context
1425 checking...
1426 (c_parser_pragma): ... here.
1427
0b212d8c
TS
1428 * c-parser.c (struct oacc_routine_data): New.
1429 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
1430 Simplify code.
1431 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
1432 declare target" attribute.
1433
76e2c821
JB
14342016-08-01 Jan Beulich <jbeulich@suse.com>
1435
1436 * c-fold.c (c_fully_fold_internal): Also emit shift count
1437 warnings for vector types.
1438 * c-typeck.c (build_binary_op): Likewise.
1439
f618a472
MP
14402016-07-29 Marek Polacek <polacek@redhat.com>
1441
1442 PR c/71742
1443 * c-decl.c (finish_struct): Rephrase an error message.
1444
efd0786f
MP
1445 PR c/71853
1446 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
1447 to error node for invalid code.
1448
e00dceaf
MP
1449 PR c/71573
1450 * c-decl.c (implicitly_declare): Return decl early not only for
1451 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
1452
673a107a
JJ
14532016-07-29 Jakub Jelinek <jakub@redhat.com>
1454
1455 PR c/71969
1456 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
1457 on GNU extern inline functions.
1458
a5b5c8b6
MP
14592016-07-29 Marek Polacek <polacek@redhat.com>
1460
1461 PR c/71583
1462 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
1463 check expr.value.
1464
e3fe09c1
UB
14652016-07-22 Uros Bizjak <ubizjak@gmail.com>
1466
1467 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
1468
7c8f7eaa
DM
14692016-07-20 David Malcolm <dmalcolm@redhat.com>
1470
1471 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
1472 spellcheck-tree.h
1473 (best_macro_match): Likewise, converting from a typedef to a
1474 subclass.
1475 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
1476 (lookup_name_fuzzy): Update for change of best_macro_match to a
1477 subclass with a ctor that calls cpp_forall_identifiers.
1478
de6a69ee
DM
14792016-07-20 David Malcolm <dmalcolm@redhat.com>
1480
1481 * c-decl.c (implicit_decl_warning): Update for conversion of
1482 return type of lookup_name_fuzzy to const char *.
1483 (undeclared_variable): Likewise.
1484 (lookup_name_fuzzy): Convert return type from tree to
1485 const char *.
1486 * c-parser.c (c_parser_declaration_or_fndef): Update for
1487 conversion of return type of lookup_name_fuzzy to const char *.
1488 (c_parser_parameter_declaration): Likewise.
1489
b1c9c068
CP
14902016-07-15 Cesar Philippidis <cesar@codesourcery.com>
1491
1492 * c-parser.c (c_parser_oacc_declare): Don't scan for
1493 GOMP_MAP_POINTER.
1494 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
1495 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
1496 zero-length subarrays.
1497
ddbbcb19
JJ
14982016-07-15 Jakub Jelinek <jakub@redhat.com>
1499
1500 PR c/71858
1501 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
1502 instead of FUZZY_LOOKUP_NAME.
1503 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
1504 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
1505
dd36b877
JJ
15062016-07-14 Jakub Jelinek <jakub@redhat.com>
1507
1508 PR c/71858
1509 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
1510
8c681247
TS
15112016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1512
1513 * c-parser.c (c_parser_generic_selection): Make type of variable
1514 auto_vec.
1515 (c_parser_omp_declare_simd): Likewise.
1516
bf4fa671
TS
15172016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1518
1519 * c-decl.c (struct c_struct_parse_info): Change member types
1520 from vec to auto_vec.
1521 (start_struct): Adjust.
1522 (finish_struct): Likewise.
1523
557e8c49
JJ
15242016-07-02 Jakub Jelinek <jakub@redhat.com>
1525
1526 PR c/71719
1527 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
1528
54d19c3b
TS
15292016-06-29 Thomas Schwinge <thomas@codesourcery.com>
1530
1531 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
1532 Move pragma context checking into...
1533 (c_parser_omp_cancellation_point): ... here, and improve
1534 diagnostic messages.
1535 * c-typeck.c (c_finish_omp_cancel)
1536 (c_finish_omp_cancellation_point): Improve diagnostic messages.
1537
152ef731
JJ
15382016-06-29 Jakub Jelinek <jakub@redhat.com>
1539
1540 PR c/71685
1541 * c-typeck.c (c_build_qualified_type): Don't clear
1542 C_TYPE_INCOMPLETE_VARS for the main variant.
1543
15442016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
1545
1546 PR c/71552
1547 * c-typeck.c (output_init_element): Diagnose incompatible types
1548 before non-constant initializers.
1549
e9ac1f86
JJ
15502016-06-28 Jakub Jelinek <jakub@redhat.com>
1551
1552 * Make-lang.in: Don't cat ../stage_current if it does not exist.
1553
277d7ee0
AK
15542016-06-23 Andi Kleen <ak@linux.intel.com>
1555
1556 * Make-lang.in: Add support for autofdo.
1557
1a4f11c8
DM
15582016-06-22 David Malcolm <dmalcolm@redhat.com>
1559
1560 PR c/70339
1561 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
1562 (implicit_decl_warning): When issuing warnings for implicit
1563 declarations, attempt to provide a suggestion via
1564 lookup_name_fuzzy.
1565 (undeclared_variable): Likewise when issuing errors.
1566 (lookup_name_in_scope): Likewise.
1567 (struct edit_distance_traits<cpp_hashnode *>): New struct.
1568 (best_macro_match): New typedef.
1569 (find_closest_macro_cpp_cb): New function.
1570 (lookup_name_fuzzy): New function.
1571 * c-parser.c: Include gcc-rich-location.h.
1572 (c_token_starts_typename): Split out case CPP_KEYWORD into...
1573 (c_keyword_starts_typename): ...this new function.
1574 (c_parser_declaration_or_fndef): When issuing errors about
1575 missing "struct" etc, add a fixit. For other kinds of errors,
1576 attempt to provide a suggestion via lookup_name_fuzzy.
1577 (c_parser_parms_declarator): When looking ahead to detect typos in
1578 type names, also reject CPP_KEYWORD.
1579 (c_parser_parameter_declaration): When issuing errors about
1580 unknown type names, attempt to provide a suggestion via
1581 lookup_name_fuzzy.
1582 * c-tree.h (c_keyword_starts_typename): New prototype.
1583
5a578671
JM
15842016-06-20 Joseph Myers <joseph@codesourcery.com>
1585
1586 PR c/71601
1587 * c-typeck.c (build_conditional_expr): Return error_mark_node if
1588 c_common_type returns error_mark_node.
1589
3f8257db 15902016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
1591
1592 PR c/69507
1593 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
1594 __alignof__ (expression).
1595
6a3f203c
DM
15962016-06-14 David Malcolm <dmalcolm@redhat.com>
1597
1598 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
1599
264757fb
DM
16002016-06-14 David Malcolm <dmalcolm@redhat.com>
1601
1602 * c-typeck.c (build_component_ref): Simplify fixit code by
1603 using gcc_rich_location::add_fixit_misspelled_id.
1604 (set_init_label): Likewise.
1605
f7e4f2e3
DM
16062016-06-13 David Malcolm <dmalcolm@redhat.com>
1607
1608 * c-parser.c (c_parser_initelt): Provide location of name for new
1609 location_t param of set_init_label.
1610 * c-tree.h (set_init_label): Add location_t param.
1611 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
1612 param and use it when issuing error messages about unrecognized
1613 field names. Attempt to provide a fixit hint if appropriate,
1614 otherwise update the error message to provide the type name.
1615
4b1ffdb1
TS
16162016-06-10 Thomas Schwinge <thomas@codesourcery.com>
1617
1618 PR c/71381
1619 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
1620 Loosen checking.
1621
44a845ca
MS
16222016-06-08 Martin Sebor <msebor@redhat.com>
1623 Jakub Jelinek <jakub@redhat.com>
1624
1625 PR c++/70507
1626 PR c/68120
1627 * c-typeck.c (convert_arguments): Don't promote last argument
1628 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
1629
92a5f2ba
MP
16302016-06-08 Marek Polacek <polacek@redhat.com>
1631
1632 PR c/71418
1633 * c-decl.c (grokdeclarator): Check TYPE_P.
1634
08203f73
MP
1635 PR c/71426
1636 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
1637 code.
1638
6ffd47b7
DM
16392016-06-07 David Malcolm <dmalcolm@redhat.com>
1640
1641 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
1642 and structure element reference, capture the location of the
1643 element name token and pass it to build_component_ref.
1644 (c_parser_postfix_expression_after_primary): Likewise for
1645 structure element dereference.
1646 (c_parser_omp_variable_list): Likewise for
1647 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
1648 * c-tree.h (build_component_ref): Add location_t param.
1649 * c-typeck.c (build_component_ref): Add location_t param
1650 COMPONENT_LOC. Use it, if available, when issuing hints about
1651 mispelled member names to provide a fixit replacement hint.
1652
1f40cff3
MP
16532016-06-06 Marek Polacek <polacek@redhat.com>
1654
1655 PR c/71362
1656 * c-parser.c (c_parser_direct_declarator): Set location.
1657
5545a907
MP
16582016-06-06 Marek Polacek <polacek@redhat.com>
1659
1660 * c-typeck.c (comptypes_internal): Handle comparisons of
1661 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
1662 TYPE_REF_CAN_ALIAS_ALL.
1663
b605f663
CLT
16642016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
1665
1666 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
1667 arguments as addressable when async clause exists.
1668
00631022
JJ
16692016-05-30 Jakub Jelinek <jakub@redhat.com>
1670
1671 PR c++/71349
1672 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
1673 when combined with target construct.
1674
7211a097
JJ
16752016-05-26 Jakub Jelinek <jakub@redhat.com>
1676
1677 * c-parser.c (c_parser_omp_clause_schedule): Warn if
1678 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
1679
95efe6b6
MP
16802016-05-25 Marek Polacek <polacek@redhat.com>
1681
1682 PR c/71265
1683 * c-decl.c (c_make_fname_decl): Don't check seen_error.
1684
a23faf7a
MP
1685 PR c/71266
1686 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
1687
e46c7770
CP
16882016-05-24 Cesar Philippidis <cesar@codesourcery.com>
1689
1690 * c-parser.c (c_parser_oacc_declare): Add support for
1691 GOMP_MAP_FIRSTPRIVATE_POINTER.
1692 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
1693 argument with enum c_omp_region_type ort.
1694 (handle_omp_array_sections): Likewise. Update call to
1695 handle_omp_array_sections_1.
1696 (c_finish_omp_clauses): Add specific errors and warning messages for
1697 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
1698 call to handle_omp_array_sections.
1699
a04e69c0
TS
17002016-05-24 Thomas Schwinge <thomas@codesourcery.com>
1701
1702 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
1703
f17a223d
RB
17042016-05-24 Richard Biener <rguenther@suse.de>
1705
1706 PR middle-end/70434
1707 PR c/69504
1708 * c-typeck.c (build_array_ref): Do not complain about indexing
1709 non-lvalue vectors. Adjust for function name change.
1710
79063edd
MS
17112016-05-20 Martin Sebor <msebor@redhat.com>
1712
1713 PR c/71115
1714 * c-typeck.c (error_init): Use
1715 expansion_point_location_if_in_system_header.
1716 (warning_init): Same.
1717
8a40fef3
DM
17182016-05-19 David Malcolm <dmalcolm@redhat.com>
1719
1720 PR c/71171
1721 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
1722 in error-handling.
1723 (c_parser_postfix_expression): Likewise.
1724 * c-tree.h (c_expr::set_error): New method.
1725 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
1726 that result's range is initialized.
1727
e9892350
JG
17282016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
1729
1730 * c-typeck.c (parser_build_unary_op): Fix formatting.
1731
8fad45f5
MW
17322016-05-16 Matthew Wahab <matthew.wahab@arm.com>
1733
1734 * c-decl.c (grokdeclarator): Remove errmsg and use of
1735 targetm.invalid_return_type.
1736 (grokparms): Remove errmsg and use of
1737 targetm.invalid_parameter_type.
1738
aa4b467b
JM
17392016-05-13 Joseph Myers <joseph@codesourcery.com>
1740
1741 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
1742 function return type.
1743
4f2e1536
MP
17442016-05-12 Marek Polacek <polacek@redhat.com>
1745
1746 PR c/70756
1747 * c-decl.c (build_compound_literal): Pass LOC down to
1748 c_incomplete_type_error.
1749 * c-tree.h (require_complete_type): Adjust declaration.
1750 (c_incomplete_type_error): Likewise.
1751 * c-typeck.c (require_complete_type): Add location parameter, pass it
1752 down to c_incomplete_type_error.
1753 (c_incomplete_type_error): Add location parameter, pass it down to
1754 error_at.
1755 (build_component_ref): Pass location down to c_incomplete_type_error.
1756 (default_conversion): Pass location down to require_complete_type.
1757 (build_array_ref): Likewise.
1758 (build_function_call_vec): Likewise.
1759 (convert_arguments): Likewise.
1760 (build_unary_op): Likewise.
1761 (build_c_cast): Likewise.
1762 (build_modify_expr): Likewise.
1763 (convert_for_assignment): Likewise.
1764 (c_finish_omp_clauses): Likewise.
1765
d6e83a8d
MM
17662016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1767
1768 PR c/43651
1769 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
1770 is enabled.
1771 * c-errors.c (pedwarn_c90): Return true if warned.
1772 * c-tree.h (pedwarn_c90): Change return type to bool.
1773 (enum c_declspec_word): Add new enumerator cdw_atomic.
1774
5c3a10fb
MP
17752016-05-11 Marek Polacek <polacek@redhat.com>
1776
1777 PR c++/71024
1778 * c-decl.c (diagnose_mismatched_decls): Factor out code to
1779 diagnose_mismatched_attributes and call it.
1780
cf68d92c
MP
17812016-05-10 Marek Polacek <polacek@redhat.com>
1782
1783 PR c/70255
1784 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
1785 on a declaration following the definition.
1786
351f85c5
JJ
17872016-05-05 Jakub Jelinek <jakub@redhat.com>
1788
1789 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
1790 parse it through to c_parser_c99_block_statement.
1791 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
1792 caller.
1793
deef7113
MP
17942016-05-04 Marek Polacek <polacek@redhat.com>
1795
1796 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
1797 OPT_Wdangling_else.
1798
de55efd5
MP
17992016-05-04 Marek Polacek <polacek@redhat.com>
1800
1801 PR c/48778
1802 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
1803 for macro expansions.
1804
79ce98bc
MP
18052016-05-03 Marek Polacek <polacek@redhat.com>
1806
1807 PR c/70859
1808 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
1809 check_builtin_function_arguments.
1810
fb2647aa
RB
18112016-05-03 Richard Biener <rguenther@suse.de>
1812
1813 * Make-lang.in (cc1-checksum.c): For stage-final re-use
1814 the checksum from the previous stage.
1815
77886428
CP
18162016-05-02 Cesar Philippidis <cesar@codesourcery.com>
1817
1818 * c-parser.c (c_parser_oacc_all_clauses): Update call to
1819 c_finish_omp_clauses.
1820 (c_parser_omp_all_clauses): Likewise.
1821 (c_parser_oacc_cache): Likewise.
1822 (c_parser_oacc_loop): Likewise.
1823 (omp_split_clauses): Likewise.
1824 (c_parser_omp_declare_target): Likewise.
1825 (c_parser_cilk_all_clauses): Likewise.
1826 (c_parser_cilk_for): Likewise.
1827 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
1828 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
1829
7176a4a0
MP
18302016-05-02 Marek Polacek <polacek@redhat.com>
1831
1832 PR c/70851
1833 * c-decl.c (grokdeclarator): Diagnose when array's size has an
1834 incomplete type.
1835
e7ff0319
CP
18362016-04-29 Cesar Philippidis <cesar@codesourcery.com>
1837
1838 PR middle-end/70626
1839 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
1840 OACC_LOOP_CLAUSE_MASK.
1841 (c_parser_oacc_kernels_parallel): Update call to
1842 c_oacc_split_loop_clauses.
1843
9f405ce1
AM
18442016-04-28 Andrew MacLeod <amacleod@redhat.com>
1845
1846 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
1847 argument to build_modify_expr in two cases.
1848
c1e1f433
BS
18492016-04-27 Bernd Schmidt <bschmidt@redhat.com>
1850
1851 * c-parser.c (c_parser_postfix_expression_after_primary): Call
1852 warn_for_memset instead of warning directly here.
1853
2448a956
MP
18542016-04-26 Marek Polacek <polacek@redhat.com>
1855
1856 PR c/67784
1857 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
1858 out of ...
1859 (c_parser_for_statement): ... here.
1860 (c_parser_if_statement): Use it.
1861 (c_parser_switch_statement): Use it.
1862 (c_parser_while_statement): Use it.
1863
b02a5e26
MP
1864 PR c/70791
1865 * c-decl.c (pushdecl): Pass LOCUS down to warning.
1866
477d4906
IV
18672016-04-20 Ilya Verbin <ilya.verbin@intel.com>
1868
1869 PR c++/69363
1870 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
1871 instead of c_finish_cilk_clauses.
1872 * c-tree.h (c_finish_omp_clauses): Add new default argument.
1873 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
1874 floating-point variables in the linear clause for Cilk Plus.
1875
fe37c7af
MM
18762016-04-18 Michael Matz <matz@suse.de>
1877
1878 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
1879 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
1880
949505a9
MP
18812016-04-15 Marek Polacek <polacek@redhat.com>
1882
1883 PR c/70671
1884 * c-typeck.c (build_unary_op): Pass location down to error and
1885 warning call.
1886
dda1bf61
JJ
18872016-04-15 Jakub Jelinek <jakub@redhat.com>
1888
1889 PR c/70436
1890 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
1891 where needed.
1892 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
1893 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
1894 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
1895 Adjust c_parser_pragma callers.
1896 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
1897 caller.
1898 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
1899 c_parser_statement.
1900 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
1901 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
1902 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
1903 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
1904 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
1905 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
1906 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
1907 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
1908 down where needed.
1909 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
1910 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
1911 calls.
1912
99cd9857
MP
19132016-04-13 Marek Polacek <polacek@redhat.com>
1914
1915 PR c/70436
1916 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
1917 adjust callers.
1918 (c_parser_statement): Likewise.
1919 (c_parser_c99_block_statement): Likewise.
1920 (c_parser_while_statement): Likewise.
1921 (c_parser_for_statement): Likewise.
1922 (c_parser_if_body): Don't set IF_P here.
1923 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
1924 about dangling else here.
1925 * c-tree.h (c_finish_if_stmt): Adjust declaration.
1926 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
1927 warn about dangling else here.
1928
f13355da
MP
19292016-04-04 Marek Polacek <polacek@redhat.com>
1930
1931 PR c/70307
1932 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
1933
5fde6a45
MP
19342016-03-31 Marek Polacek <polacek@redhat.com>
1935
1936 PR c/70297
1937 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
1938
4bbf545b
DM
19392016-03-18 David Malcolm <dmalcolm@redhat.com>
1940
1941 PR c/70281
1942 * c-parser.c (c_parser_postfix_expression): Set the source range
1943 for uses of "__builtin_types_compatible_p".
1944
fcc2b74f
JJ
19452016-03-17 Jakub Jelinek <jakub@redhat.com>
1946
1947 PR c/70280
1948 * c-typeck.c (composite_type): Don't count void_list_node
1949 into len, if the list is terminated by void_list_node, start
1950 with void_list_node instead of NULL for newargs. Stop
1951 at void_list_node.
1952
ab4c578f
MP
19532016-03-16 Marek Polacek <polacek@redhat.com>
1954
1955 PR c/70093
1956 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
1957 nested functions returning VM types.
1958
96b3c82d
CP
19592016-03-09 Cesar Philippidis <cesar@codesourcery.com>
1960
1961 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
1962 when calling c_finish_omp_clauses.
1963
29b9828f
BS
19642016-03-04 Bernd Schmidt <bschmidt@redhat.com>
1965
1966 PR c/69824
1967 * c-decl.c (get_parm_info): Don't queue implicit function declarations
1968 for later.
1969
7ff6ca38
MP
19702016-03-04 Marek Polacek <polacek@redhat.com>
1971
1972 PR c/69798
1973 * c-parser.c (c_parser_postfix_expression): Call
1974 c_parser_cast_expression rather than c_parser_postfix_expression.
1975
686e2237
JJ
19762016-03-01 Jakub Jelinek <jakub@redhat.com>
1977
1978 PR c/69796
1979 PR c/69974
1980 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
1981 of incomplete decls to error_mark_node.
1982
0b05329b
MP
19832016-02-24 Marek Polacek <polacek@redhat.com>
1984
1985 PR c/69819
1986 * c-decl.c (finish_decl): Don't update the copy of the type of a
1987 different decl type.
1988
067fbd8b
JJ
19892016-02-23 Jakub Jelinek <jakub@redhat.com>
1990
1991 PR objc/69844
1992 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
1993 in id_kind reclassification.
1994
bf14eba2
JJ
19952016-02-16 Jakub Jelinek <jakub@redhat.com>
1996
1997 PR c/69835
1998 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
1999
ba539195
JN
20002016-02-16 James Norris <jnorris@codesourcery.com>
2001
2002 PR c/64748
2003 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
2004
16595a1f
BS
20052016-02-12 Bernd Schmidt <bschmidt@redhat.com>
2006
f48dfe98
BS
2007 * c-decl.c (build_null_declspecs): Zero the entire struct.
2008
16595a1f
BS
2009 PR c/69522
2010 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
2011 callers changed. If nested_p is true, use it to call
2012 finish_implicit_inits.
2013 * c-tree.h (finish_implicit_inits): Declare.
2014 * c-typeck.c (finish_implicit_inits): New function. Move code
2015 from ...
2016 (push_init_level): ... here.
2017 (set_designator, process_init_element): Call finish_implicit_inits.
2018
66756373
JJ
20192016-02-11 Jakub Jelinek <jakub@redhat.com>
2020
2021 PR c/69768
2022 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
2023 arguments for -Waddress warning.
2024
1066e9b5
JJ
20252016-02-04 Jakub Jelinek <jakub@redhat.com>
2026
2027 PR c/69669
2028 * c-decl.c (finish_enum): When honoring mode attribute,
2029 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
2030
3a5d2ba4
JJ
20312016-01-29 Jakub Jelinek <jakub@redhat.com>
2032
2033 PR debug/69518
2034 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
2035 all type variants, not just TYPE_MAIN_VARIANT.
2036
cbdd8ae0
JJ
20372016-01-27 Jakub Jelinek <jakub@redhat.com>
2038
2039 PR debug/66869
2040 * c-decl.c (c_write_global_declarations_1): Warn with
2041 warn_unused_function if static prototype without definition
2042 is not C_DECL_USED.
2043
fa74a4bc
MP
20442016-01-27 Marek Polacek <polacek@redhat.com>
2045
2046 PR c/68062
2047 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
2048 to unsigned, if needed. Add -Wsign-compare warning.
2049
13f92e8d
JJ
20502016-01-26 Jakub Jelinek <jakub@redhat.com>
2051
2052 PR tree-optimization/69483
2053 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
2054
cd8e73dc 20552016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
2056
2057 PR c/24293
2058 * c-tree.h (incomplete_record_decls): Declare.
2059 * c-parser.c (incomplete_record_decls): Define.
2060 (c_parser_translation_unit): Iterate through incomplete_record_decls and
2061 report error if any decl has zero size.
2062 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
2063 or enum type to incomplete_record_decls.
2064
e6d6ec9e
TV
20652016-01-14 Tom de Vries <tom@codesourcery.com>
2066
2067 PR tree-optimization/68773
2068 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
2069 set force_output.
2070
00083992
MP
20712016-01-14 Marek Polacek <polacek@redhat.com>
2072
2073 PR c/69262
2074 * c-decl.c (grokdeclarator): Provide more information for invalid
2075 array declarations.
2076
7443cf13
DM
20772016-01-06 David Malcolm <dmalcolm@redhat.com>
2078
2079 * c-parser.c (c_parser_unary_expression): For dereferences, build
2080 a combined location before calling build_indirect_ref, so that
2081 error reports cover the full range, manually updating the c_expr
2082 src_range.
2083
6b131d5b
MP
20842016-01-06 Marek Polacek <polacek@redhat.com>
2085
2086 PR sanitizer/69099
2087 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
2088 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
2089 NULL.
2090
818ab71a
JJ
20912016-01-04 Jakub Jelinek <jakub@redhat.com>
2092
2093 Update copyright years.
2094
2fe0a208
MP
20952016-01-04 Marek Polacek <polacek@redhat.com>
2096
2097 PR c/68908
2098 * c-typeck.c (build_atomic_assign): Improve commentary. Add
2099 optimization to use __atomic_fetch_* built-in if possible.
2100
c7b48c8a
TS
21012015-12-23 Thomas Schwinge <thomas@codesourcery.com>
2102
2103 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
2104 into...
2105 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
2106 all users.
2107
fda5652f
MP
21082015-12-22 Marek Polacek <polacek@redhat.com>
2109
2110 PR c/69002
2111 * c-typeck.c (build_component_ref): Warn when acessing elements of
2112 atomic structures or unions.
2113
745e411d
DM
21142015-12-21 David Malcolm <dmalcolm@redhat.com>
2115
2116 * c-typeck.c: Include "gcc-rich-location.h".
2117 (build_binary_op): In the two places that call binary_op_error,
2118 create a gcc_rich_location and populate it with the location of
2119 the binary op and its two operands.
2120
94c40e19
DM
21212015-12-16 David Malcolm <dmalcolm@redhat.com>
2122
2123 * c-parser.c (c_parser_statement_after_labels): When calling
2124 c_finish_return, Use the return expression's location if it has
2125 one, falling back to the location of the first token within it.
2126 * c-typeck.c (c_finish_return): When issuing warnings about
2127 the incorrect presence/absence of a return value, issue a note
2128 showing the declaration of the function.
2129
de67c4c3
DM
21302015-12-16 David Malcolm <dmalcolm@redhat.com>
2131
2132 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
2133 to 4.
2134 (c_parser_peek_nth_token): New function.
2135 (c_parser_peek_conflict_marker): New function.
2136 (c_parser_error): Detect conflict markers and report them as such.
2137
a10704e1
DM
21382015-12-16 David Malcolm <dmalcolm@redhat.com>
2139
2140 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
2141 to preserve range information for the primary expression
2142 in the call to c_parser_postfix_expression_after_primary.
2143
8062bca6
DM
21442015-12-16 David Malcolm <dmalcolm@redhat.com>
2145
2146 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
2147 expression location, falling back on the first token location,
2148 rather than always using the latter.
2149
d06f8b75
MP
21502015-12-16 Marek Polacek <polacek@redhat.com>
2151
2152 PR c/64637
2153 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
2154 available.
2155
2994fb91
MP
21562015-12-15 Marek Polacek <polacek@redhat.com>
2157
2158 PR c/68907
2159 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
2160 artificial decl.
2161
a1b93f8d
DM
21622015-12-08 David Malcolm <dmalcolm@redhat.com>
2163
2164 * c-parser.c (c_parser_alignof_expression): Capture location of
2165 closing parenthesis (if any), or of end of unary expression, and
2166 use it to build a src_range for the expression.
2167
46c6e1e2
DM
21682015-12-08 David Malcolm <dmalcolm@redhat.com>
2169
2170 PR c/68757
2171 * c-parser.c (c_parser_get_builtin_args): Add
2172 "out_close_paren_loc" param, and write back to it.
2173 (c_parser_postfix_expression): Capture the closing
2174 parenthesis location for RID_CHOOSE_EXPR,
2175 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
2176 RID_BUILTIN_SHUFFLE and use it to set the source range
2177 for such expressions; within RID_BUILTIN_COMPLEX set
2178 the underlying location.
2179
66189108
MP
21802015-12-07 Marek Polacek <polacek@redhat.com>
2181
2182 PR c/68668
2183 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
2184 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
2185
f187980b
EB
21862015-12-04 Eric Botcazou <ebotcazou@adacore.com>
2187
2188 * c-tree.h (c_build_va_arg): Adjust prototype.
2189 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
2190 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
2191 parameter, adjust throughout and issue an error if EXPR is a component
2192 with reverse storage order.
2193
4250754e
JM
21942015-12-02 Jason Merrill <jason@redhat.com>
2195
2196 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
2197 (c_fully_fold_internal, decl_constant_value_for_optimization):
2198 Move from c-common.c.
2199 * c-tree.h: Declare decl_constant_value_for_optimization.
2200 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
2201
e9e32ee6
JM
22022015-12-02 Joseph Myers <joseph@codesourcery.com>
2203
2204 PR c/68162
2205 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
2206 following link from declarator to next declarator. Track original
2207 qualified type and pass it to c_build_qualified_type.
2208 * c-typeck.c (c_build_qualified_type): Add arguments
2209 orig_qual_type and orig_qual_indirect.
2210
ff7a55bf
TS
22112015-12-02 Thomas Schwinge <thomas@codesourcery.com>
2212
2213 * c-parser.c (c_parser_omp_clause_name)
2214 (c_parser_oacc_all_clauses): Alphabetical sorting.
2215
657e4e47
JJ
22162015-12-02 Jakub Jelinek <jakub@redhat.com>
2217
2218 PR c/68533
2219 * c-decl.c (get_parm_info): Use b->locus instead of input_location
2220 for diagnostics.
2221
37d5ad46
JB
22222015-12-01 Julian Brown <julian@codesourcery.com>
2223 Cesar Philippidis <cesar@codesourcery.com>
2224 James Norris <James_Norris@mentor.com>
2225
2226 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
2227 (c_parser_oacc_clause_use_device): New function.
2228 (c_parser_oacc_all_clauses): Add use_device support.
2229 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
2230 (c_parser_oacc_host_data): New function.
2231 (c_parser_omp_construct): Add host_data support.
2232 * c-tree.h (c_finish_oacc_host_data): Add prototype.
2233 * c-typeck.c (c_finish_oacc_host_data): New function.
2234 (c_finish_omp_clauses): Add use_device support.
2235
a4850ce9
JH
22362015-11-29 Jan Hubicka <hubicka@ucw.cz>
2237
2238 PR c/67106
2239 * c-decl.c: Set TYPE_PACKED in variants.
2240
b58d3df2
ML
22412015-11-27 Martin Liska <mliska@suse.cz>
2242
2243 PR c++/68312
2244 * c-array-notation.c (fix_builtin_array_notation_fn):
2245 Use release_vec_vec instead of vec::release.
2246 (build_array_notation_expr): Likewise.
2247 (fix_conditional_array_notations_1): Likewise.
2248 (fix_array_notation_expr): Likewise.
2249 (fix_array_notation_call_expr): Likewise.
2250
aec17bfe
JJ
22512015-11-27 Jakub Jelinek <jakub@redhat.com>
2252
2253 PR c/63326
2254 * c-parser.c (c_parser_compound_statement_nostart): If
2255 last_label is true, use pragma_stmt instead of pragma_compound
2256 as second c_parser_pragma argument.
2257 (c_parser_omp_ordered, c_parser_omp_target_update,
2258 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
2259 false as second argument to c_parser_skip_to_pragma_eol after
2260 diagnosing standalone directives used in pragma_stmt context.
2261
688c4de0
IV
22622015-11-24 Ilya Verbin <ilya.verbin@intel.com>
2263
2264 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
2265 with "if (ENABLE_OFFLOADING)".
2266
cbd03aee
DM
22672015-11-23 David Malcolm <dmalcolm@redhat.com>
2268
2269 PR objc/68438
2270 * c-parser.c (c_parser_postfix_expression): Set up source ranges
2271 for various Objective-C constructs: Class.name syntax,
2272 @selector(), @protocol(), @encode(), and [] message syntax.
2273
a87a86e1
DM
22742015-11-20 David Malcolm <dmalcolm@redhat.com>
2275
2276 PR 62314
2277 * c-typeck.c (should_suggest_deref_p): New function.
2278 (build_component_ref): Special-case POINTER_TYPE when
2279 generating a "not a structure of union" error message, and
2280 suggest a "->" rather than a ".", providing a fix-it hint.
2281
8ece8dfb
DM
22822015-11-19 David Malcolm <dmalcolm@redhat.com>
2283
2284 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
2285 candidate into a new function, find_closest_identifier.
2286
433068cc
MP
22872015-11-19 Marek Polacek <polacek@redhat.com>
2288
2289 PR c/68412
2290 * c-typeck.c (parser_build_binary_op): Properly handle
2291 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
2292
bef08b71
DM
22932015-11-17 David Malcolm <dmalcolm@redhat.com>
2294
2295 * c-parser.c (set_c_expr_source_range): Bulletproof both
2296 overloaded implementations against NULL expr->value.
2297 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
2298 values.
2299 (c_parser_unary_expression): Likewise when handling addresses of
2300 labels.
2301 (c_parser_postfix_expression): Likewise for statement expressions,
2302 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
2303 __builtin_va_arg, and for __builtin_offset_of.
2304 (c_parser_postfix_expression_after_paren_type): Initialize expr's
2305 src_range using the range of the braced initializer.
2306 (c_parser_transaction_expression): Set src_range for "ret" to a
2307 sane pair of values.
2308
fff77217
KY
23092015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
2310
2311 * c-parser.c (c_finish_omp_declare_simd): Look for
2312 "simd" attribute as well. Update error message.
2313
1d899da2
TS
23142015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2315
2316 * c-parser.c (c_parser_omp_declare_target): Adjust.
2317
e4606348
JJ
23182015-11-14 Jakub Jelinek <jakub@redhat.com>
2319
2320 * c-typeck.c (c_finish_omp_clauses): Don't mark
2321 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
2322
3e636daf
MP
23232015-11-14 Marek Polacek <polacek@redhat.com>
2324
2325 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
2326 * c-typeck.c: Likewise.
2327
ebedc9a3
DM
23282015-11-13 David Malcolm <dmalcolm@redhat.com>
2329
2330 * c-decl.c (warn_defaults_to): Pass line_table to
2331 rich_location ctor.
2332 * c-errors.c (pedwarn_c99): Likewise.
2333 (pedwarn_c90): Likewise.
2334 * c-parser.c (set_c_expr_source_range): New functions.
2335 (c_token::get_range): New method.
2336 (c_token::get_finish): New method.
2337 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
2338 based on the range from the start of the LHS to the end of the
2339 RHS.
2340 (c_parser_conditional_expression): Likewise, based on the range
2341 from the start of the cond.value to the end of exp2.value.
2342 (c_parser_binary_expression): Call set_c_expr_source_range on
2343 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
2344 (c_parser_cast_expression): Call set_c_expr_source_range on ret
2345 based on the cast_loc through to the end of the expr.
2346 (c_parser_unary_expression): Likewise, based on the
2347 op_loc through to the end of op.
2348 (c_parser_sizeof_expression) Likewise, based on the start of the
2349 sizeof token through to either the closing paren or the end of
2350 expr.
2351 (c_parser_postfix_expression): Likewise, using the token range,
2352 or from the open paren through to the close paren for
2353 parenthesized expressions.
2354 (c_parser_postfix_expression_after_primary): Likewise, for
2355 various kinds of expression.
2356 * c-tree.h (struct c_expr): Add field "src_range".
2357 (c_expr::get_start): New method.
2358 (c_expr::get_finish): New method.
2359 (set_c_expr_source_range): New decls.
2360 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
2361 on ret for prefix unary ops.
2362 (parser_build_binary_op): Likewise, running from the start of
2363 arg1.value through to the end of arg2.value.
2364
ec8b536f
MP
23652015-11-13 Marek Polacek <polacek@redhat.com>
2366
2367 PR c/68320
2368 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
2369
277fe616
DM
23702015-11-13 David Malcolm <dmalcolm@redhat.com>
2371
2372 * c-typeck.c: Include spellcheck.h.
2373 (lookup_field_fuzzy_find_candidates): New function.
2374 (lookup_field_fuzzy): New function.
2375 (build_component_ref): If the field was not found, try using
2376 lookup_field_fuzzy and potentially offer a suggestion.
2377
6e232ba4
JN
23782015-11-12 James Norris <jnorris@codesourcery.com>
2379 Joseph Myers <joseph@codesourcery.com>
2380
2381 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
2382 (c_parser_omp_clause_name): Handle 'device_resident' clause.
2383 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
2384 and PRAGMA_OMP_CLAUSE_LINK.
2385 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
2386 and PRAGMA_OACC_CLAUSE_LINK.
2387 (OACC_DECLARE_CLAUSE_MASK): New definition.
2388 (c_parser_oacc_declare): New function.
2389
9be4f715
MP
23902015-11-12 Marek Polacek <polacek@redhat.com>
2391
2392 PR c/67784
2393 * c-parser.c (c_parser_for_statement): Reclassify the token in
2394 a correct scope.
2395
e78bede6
MP
23962015-11-11 Marek Polacek <polacek@redhat.com>
2397
2398 PR c/68107
2399 PR c++/68266
2400 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
2401 checking the size of an array.
2402
69f293c9
AM
24032015-11-11 Andrew MacLeod <amacleod@redhat.com>
2404
2405 * c-array-notation.c: Remove unused header files.
2406 * c-aux-info.c: Likewise.
2407 * c-convert.c: Likewise.
2408 * c-decl.c: Likewise.
2409 * c-errors.c: Likewise.
2410 * c-lang.c: Likewise.
2411 * c-objc-common.c: Likewise.
2412 * c-parser.c: Likewise.
2413 * c-typeck.c: Likewise.
2414 * gccspec.c: Likewise.
2415
3a40d81d
NS
24162015-11-09 Thomas Schwinge <thomas@codesourcery.com>
2417 Cesar Philippidis <cesar@codesourcery.com>
2418 James Norris <jnorris@codesourcery.com>
2419 Julian Brown <julian@codesourcery.com>
2420 Nathan Sidwell <nathan@codesourcery.com>
2421
2422 c/
2423 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
2424 routine arg.
2425 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
2426 (c_parser_pragma): Parse 'acc routine'.
2427 (OACC_ROUTINE_CLAUSE_MARK): Define.
2428 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
2429
fc402eec
AA
24302015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
2431
2432 PR debug/67192
2433 * c-typeck.c (c_finish_loop): For unconditional loops, set the
2434 location of the backward-goto to the start of the loop body.
2435
f6b0b3db
AA
24362015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
2437
2438 PR debug/67192
2439 * c-parser.c (c_parser_while_statement): Finish the loop before
2440 parsing ahead for misleading indentation.
2441 (c_parser_for_statement): Likewise.
2442
ee45a32d
EB
24432015-11-08 Eric Botcazou <ebotcazou@adacore.com>
2444
2445 * c-decl.c (finish_struct): If the structure has reverse storage
2446 order, rewrite the type of array fields with scalar component. Call
2447 maybe_apply_pragma_scalar_storage_order on entry.
2448 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
2449 errors on bit-fields and reverse SSO here and not...
2450 (c_mark_addressable): ...here.
2451 (output_init_element): Adjust call to initializer_constant_valid_p.
2452 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
2453
8a645150
DM
24542015-11-06 David Malcolm <dmalcolm@redhat.com>
2455
2456 * c-decl.c (warn_defaults_to): Update for change in signature
2457 of diagnostic_set_info.
2458 * c-errors.c (pedwarn_c99): Likewise.
2459 (pedwarn_c90): Likewise.
2460 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
2461 for textinfo::set_location.
2462
7a5e4956
CP
24632015-11-05 Cesar Philippidis <cesar@codesourcery.com>
2464 Thomas Schwinge <thomas@codesourcery.com>
2465 James Norris <jnorris@codesourcery.com>
2466
2467 * c-parser.c (c_parser_omp_clause_name): Add support for
2468 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
2469 (c_parser_omp_clause_default): Add is_oacc argument. Handle
2470 default(none) in OpenACC.
2471 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
2472 arguments.
2473 (c_parser_oacc_clause_tile): New function.
2474 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
2475 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
2476 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
2477 TILE}.
2478 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
2479 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
2480 FIRSTPRIVATE}.
2481 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
2482 (c_parser_oacc_update): Update the error message for missing clauses.
2483 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
2484 and OMP_CLAUSE_INDEPENDENT.
2485
bfcfbfa0
MP
24862015-11-05 Marek Polacek <polacek@redhat.com>
2487
2488 PR c/68090
2489 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
2490 deal with pre-evaluation on invalid types.
2491
e01d41e5
JJ
24922015-11-05 Jakub Jelinek <jakub@redhat.com>
2493 Ilya Verbin <ilya.verbin@intel.com>
2494
2495 * c-parser.c: Include context.h and gimple-expr.h.
2496 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
2497 monotonic together with nonmonotonic.
2498 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
2499 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
2500 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
2501 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
2502 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
2503 expressions on combined target teams before the target.
2504 (c_parser_omp_declare_target): If decl has "omp declare target" or
2505 "omp declare target link" attribute, and cgraph or varpool node already
2506 exists, then set corresponding flags. Call c_finish_omp_clauses
2507 in the parenthesized extended-list syntax case.
2508 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
2509 declare target.
2510 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
2511 on OMP_CLAUSE_REDUCTION array sections.
2512 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
2513 into the constant offset, or for variable low-bound using
2514 POINTER_PLUS_EXPR. For structure element based array sections use
2515 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
2516 (c_finish_omp_clauses): Drop generic_field_head, structure
2517 elements are now always mapped even as array section bases,
2518 diagnose same var in data sharing and mapping clauses. Diagnose if
2519 linear step on declare simd is neither a constant nor a uniform
2520 parameter. Look through POINTER_PLUS_EXPR for array section
2521 reductions. Diagnose the same var or function appearing multiple
2522 times on the same directive. Fix up wording for the to clause if t
2523 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
2524 modifier on kinds other than dynamic or guided or nonmonotonic
2525 modifier together with ordered clause.
2526
4bf9e5a8
TS
25272015-11-03 Thomas Schwinge <thomas@codesourcery.com>
2528 Chung-Lin Tang <cltang@codesourcery.com>
2529
2530 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
2531
2adfab87
AM
25322015-10-29 Andrew MacLeod <amacleod@redhat.com>
2533
2534 * c-array-notation.c: Reorder #include's and remove duplicates.
2535 * c-aux-info.c: Likewise.
2536 * c-convert.c: Likewise.
2537 * c-decl.c: Likewise.
2538 * c-errors.c: Likewise.
2539 * c-lang.c: Likewise.
2540 * c-objc-common.c: Likewise.
2541 * c-parser.c: Likewise.
2542 * c-typeck.c: Likewise.
2543
e922069e
JW
25442015-10-26 Jim Wilson <jim.wilson@linaro.org>
2545
2546 PR debug/66068
2547 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
2548 after calling build_qualified_type.
2549
765dd391
CP
25502015-10-27 Cesar Philippidis <cesar@codesourcery.com>
2551 Thomas Schwinge <thomas@codesourcery.com>
2552 James Norris <jnorris@codesourcery.com>
2553 Joseph Myers <joseph@codesourcery.com>
2554 Julian Brown <julian@codesourcery.com>
2555 Bernd Schmidt <bschmidt@redhat.com>
2556
2557 * c-parser.c (c_parser_oacc_shape_clause): New.
2558 (c_parser_oacc_simple_clause): New.
2559 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
2560 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
2561
88bae6f4
TS
25622015-10-27 Thomas Schwinge <thomas@codesourcery.com>
2563 James Norris <jnorris@codesourcery.com>
2564 Cesar Philippidis <cesar@codesourcery.com>
2565
2566 PR c/64765
2567 PR c/64880
2568 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
2569 parameters, and handle these. Adjust all users.
2570 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
2571 into...
2572 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
2573 all users.
2574 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
2575 declare functions.
2576 (c_finish_omp_construct): Declare function.
2577 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
2578 Merge functions into...
2579 (c_finish_omp_construct): ... this new function.
2580
a8fc2579
RB
25812015-10-22 Richard Biener <rguenther@suse.de>
2582
2583 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
2584 before folding a MINUS_EXPR.
2585
e9122ef6
MP
25862015-10-21 Marek Polacek <polacek@redhat.com>
2587
2588 PR c/68024
2589 * c-decl.c (start_function): Warn about vararg functions without
2590 a prototype.
2591
9f47c7e5
IE
25922015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
2593
2594 * c-typeck.c (build_conditional_expr): Use boolean vector
2595 type for vector comparison.
2596 (build_vec_cmp): New.
2597 (build_binary_op): Use build_vec_cmp for comparison.
2598
fa60eeb9
MP
25992015-10-20 Marek Polacek <polacek@redhat.com>
2600
2601 * c-parser.c (is_cilkplus_vector_p): Don't define here.
2602
2c7020eb
MP
26032015-10-20 Marek Polacek <polacek@redhat.com>
2604
2605 PR c/67964
2606 * c-parser.c (c_parser_attributes): Break out of the loop if the
2607 token after an attribute isn't a comma.
2608
d9a6bd32
JJ
26092015-10-13 Jakub Jelinek <jakub@redhat.com>
2610 Aldy Hernandez <aldyh@redhat.com>
2611
2612 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
2613 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
2614 (c_parser_omp_variable_list): Handle structure elements for
2615 map, to and from clauses. Handle array sections in reduction
2616 clause. Formatting fixes.
2617 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
2618 if clause modifiers.
2619 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
2620 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
2621 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
2622 c_parser_omp_clause_is_device_ptr): New functions.
2623 (c_parser_omp_clause_ordered): Parse optional parameter.
2624 (c_parser_omp_clause_reduction): Handle array reductions.
2625 (c_parser_omp_clause_schedule): Parse optional simd modifier.
2626 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
2627 functions.
2628 (c_parser_omp_clause_linear): Parse linear clause modifiers.
2629 (c_parser_omp_clause_depend_sink): New function.
2630 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
2631 (c_parser_omp_clause_map): Parse release/delete map kinds and
2632 optional always modifier.
2633 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
2634 and c_finish_omp_clauses callers.
2635 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
2636 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
2637 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
2638 (OMP_CRITICAL_CLAUSE_MASK): Define.
2639 (c_parser_omp_critical): Parse critical clauses.
2640 (c_parser_omp_for_loop): Handle doacross loops, adjust
2641 c_finish_omp_for and c_finish_omp_clauses callers.
2642 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
2643 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
2644 (OMP_FOR_CLAUSE_MASK): Add linear clause.
2645 (c_parser_omp_for): Disallow ordered clause when combined with
2646 distribute. Disallow linear clause when combined with distribute
2647 and not combined with simd.
2648 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
2649 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
2650 parse clauses and if depend clause is found, don't parse a body.
2651 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
2652 Allow target parallel without for after it.
2653 (OMP_TASK_CLAUSE_MASK): Add priority clause.
2654 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
2655 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
2656 invalid kinds.
2657 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
2658 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
2659 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
2660 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
2661 functions.
2662 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
2663 defaultmap and is_device_ptr clauses.
2664 (c_parser_omp_target): Parse target parallel and target simd. Set
2665 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
2666 and target exit data. Diagnose invalid map kinds.
2667 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
2668 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
2669 construct.
2670 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
2671 &omp_priv.
2672 (OMP_TASKLOOP_CLAUSE_MASK): Define.
2673 (c_parser_omp_taskloop): New function.
2674 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
2675 handle PRAGMA_OMP_TASKLOOP.
2676 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
2677 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
2678 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
2679 Add IS_OMP argument, handle structure element bases, diagnose
2680 bitfields, pass IS_OMP recursively, diagnose known zero length
2681 array sections in depend clauses, handle array sections in reduction
2682 clause, diagnose negative length even for pointers.
2683 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
2684 types, pass IS_OMP down to handle_omp_array_sections_1, handle
2685 array sections in reduction clause, set
2686 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
2687 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
2688 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
2689 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
2690
21ba0cea
MP
26912015-10-06 Marek Polacek <polacek@redhat.com>
2692
2693 * c-parser.c (c_parser_statement_after_labels): Use
2694 protected_set_expr_location.
2695 (c_parser_omp_clause_num_gangs): Likewise.
2696 (c_parser_omp_clause_num_threads): Likewise.
2697 (c_parser_omp_clause_num_workers): Likewise.
2698 (c_parser_omp_clause_vector_length): Likewise.
2699 (c_parser_omp_clause_num_teams): Likewise.
2700 (c_parser_omp_clause_thread_limit): Likewise.
2701 * c-typeck.c (build_c_cast): Likewise.
2702 (c_cast_expr): Likewise.
2703
624d31fe
RS
27042015-10-05 Richard Sandiford <richard.sandiford@arm.com>
2705
2706 * c-typeck.c (c_tree_equal): Use real_equal instead of
2707 REAL_VALUES_EQUAL.
2708
b8fd7909
JM
27092015-10-04 Jason Merrill <jason@redhat.com>
2710
2711 * c-parser.c (c_lex_one_token): Handle @synchronized.
2712 * c-decl.c (match_builtin_function_types): A declaration of a built-in
2713 can change whether the function is transaction_safe.
2714
1c7485af
MP
27152015-10-02 Marek Polacek <polacek@redhat.com>
2716
2717 PR c/67730
2718 * c-typeck.c (convert_for_assignment): Use the expansion point
2719 location throughout.
2720
3e3b8d63
MP
27212015-10-02 Marek Polacek <polacek@redhat.com>
2722
2723 PR c/64249
2724 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
2725 and pass it down to c_parser_if_statement.
2726 (c_parser_else_body): Add CHAIN parameter and pass it down to
2727 c_parser_statement_after_labels.
2728 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
2729 duplicated if-else-if conditions.
2730
aabef2de
MP
27312015-10-01 Marek Polacek <polacek@redhat.com>
2732
2733 * c-typeck.c (convert_for_assignment): Improve commentary.
2734
de8ddd5f
MP
27352015-09-30 Marek Polacek <polacek@redhat.com>
2736
2737 PR c/67730
2738 * c-typeck.c (c_finish_return): Use the expansion point location for
2739 certain "return with value" warnings.
2740
c4914de6
MLI
27412015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
2742
2743 * c-parser.c (pragma_lex): Add loc argument.
2744
0e36f5c7
MP
27452015-09-15 Marek Polacek <polacek@redhat.com>
2746
2747 PR c/67580
2748 * c-decl.c (tag_exists_p): New function.
2749 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
2750 struct/union/enum keywords are missing.
2751 * c-tree.h (tag_exists_p): Declare.
2752
2f3bb934
MP
27532015-09-15 Marek Polacek <polacek@redhat.com>
2754
2755 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
2756 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
2757 Return NULL_TREE instead of 0.
2758 (lookup_name): Return NULL_TREE instead of 0.
2759 (lookup_name_in_scope): Likewise.
2760 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
2761 (parser_xref_tag): Use false instead of 0.
2762 (start_struct): Use true instead of 1.
2763 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
2764
aa256c4a
MP
27652015-09-14 Marek Polacek <polacek@redhat.com>
2766
2767 * c-typeck.c (set_nonincremental_init_from_string): Use
2768 HOST_WIDE_INT_M1U when shifting a negative value.
2769
dbb68221
MW
27702015-09-09 Mark Wielaard <mjw@redhat.com>
2771
2772 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
2773 parm against NULL.
2774
a8a098ac
JJ
27752015-09-10 Jakub Jelinek <jakub@redhat.com>
2776
2777 PR c/67502
2778 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
2779 into OMP_FOR_PRE_BODY rather than before the loop.
2780
f4b189d5
JJ
27812015-09-09 Jakub Jelinek <jakub@redhat.com>
2782
0bb99c11
JJ
2783 PR c/67501
2784 * c-parser.c (c_parser_oacc_all_clauses,
2785 c_parser_omp_all_clauses): Remove invalid clause from
2786 list of clauses even if parser->error is set.
2787
fce5e5e3
JJ
2788 PR c/67500
2789 * c-parser.c (c_parser_omp_clause_aligned,
2790 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
2791 test for errors.
2792 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
2793 error_mark_node.
2794
f4b189d5
JJ
2795 PR c/67495
2796 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
2797 instead of c_parser_unary_expression. If the result is !lvalue_p,
2798 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
2799
b2aaf235
MP
28002015-09-04 Marek Polacek <polacek@redhat.com>
2801
2802 PR sanitizer/67279
2803 * c-typeck.c (build_binary_op): Don't instrument static initializers.
2804
1807ffc1
MS
28052015-09-03 Martin Sebor <msebor@redhat.com>
2806
2807 PR c/66516
8b652e65
JJ
2808 * c-typeck.c (convert_arguments, parser_build_unary_op,
2809 build_conditional_expr, c_cast_expr, convert_for_assignment,
2810 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
2811 reject_gcc_builtin.
2812 (c_decl_implicit): Define.
2813
d04ff417
MP
28142015-09-02 Marek Polacek <polacek@redhat.com>
2815
2816 PR c/67432
2817 * c-parser.c (c_parser_enum_specifier): Give a better error for
2818 an empty enum.
2819
a79683d5
TS
28202015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
2821
2822 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
2823
191a6b94
MP
28242015-08-12 Marek Polacek <polacek@redhat.com>
2825
2826 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
2827 LOC to it.
2828
420a9d9b
MP
28292015-08-03 Marek Polacek <polacek@redhat.com>
2830
2831 PR c/67088
2832 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
2833 Use it.
2834 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
2835
992118a1
PP
28362015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
2837
2838 * c-parser.c (c_parser_if_body): Take token_indent_info
2839 argument. Call warn_for_misleading_indentation even when the
2840 body is a semicolon. Extract token_indent_infos corresponding
2841 to the guard, body and next tokens. Adjust call to
2842 warn_for_misleading_indentation accordingly.
2843 (c_parser_else_body): Likewise.
2844 (c_parser_if_statement): Likewise.
2845 (c_parser_while_statement): Likewise.
2846 (c_parser_for_statement): Likewise.
2847
46308474
LFSM
28482015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
2849 Manuel López-Ibáñez <manu@gcc.gnu.org>
2850
2851 * c-decl.c (get_parm_info): Remove static var. Update warning
2852 message.
2853
05b28fd6
MP
28542015-07-27 Marek Polacek <polacek@redhat.com>
2855
2856 PR c++/66555
2857 PR c/54979
2858 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
2859
451b5e48
MP
28602015-07-20 Marek Polacek <polacek@redhat.com>
2861
2862 PR c++/55095
2863 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
2864 (build_binary_op): Warn about left shift overflows.
2865
1916bcb5
AM
28662015-07-09 Andrew MacLeod <amacleod@redhat.com>
2867
2868 * c-array-notation.c: Adjust includes for flags.h changes.
2869 * c-objc-common.c: Likewise.
2870
c7131fb2
AM
28712015-07-07 Andrew MacLeod <amacleod@redhat.com>
2872
2873 * c-array-notation.c: Adjust includes.
2874 * c-aux-info.c: Likewise.
2875 * c-convert.c: Likewise.
2876 * c-decl.c: Likewise.
2877 * c-errors.c: Likewise.
2878 * c-lang.c: Likewise.
2879 * c-objc-common.c: Likewise.
2880 * c-parser.c: Likewise.
2881 * c-typeck.c: Likewise.
2882
da2e71c9
MLI
28832015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
2884
2885 PR fortran/66605
2886 * c-decl.c (finish_function): Call do_warn_unused_parameter.
2887
b155cfd9
MP
28882015-06-29 Marek Polacek <polacek@redhat.com>
2889
2890 PR c/66322
2891 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
2892 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
2893 about -Wswitch-bool here.
2894 (do_case): Update c_add_case_label call.
2895 (c_finish_case): Update c_do_switch_warnings call.
2896
31521951
MP
28972015-06-27 Marek Polacek <polacek@redhat.com>
2898
2899 * c-typeck.c: Use VECTOR_TYPE_P throughout.
2900
22d03525
MP
29012015-06-26 Marek Polacek <polacek@redhat.com>
2902
2903 * c-array-notation.c (fix_builtin_array_notation_fn): Use
2904 INDIRECT_REF_P.
2905 * c-typeck.c (array_to_pointer_conversion): Likewise.
2906 (build_unary_op): Likewise.
2907 (c_finish_return): Likewise.
2908
f0889939
AM
29092015-06-25 Andrew MacLeod <amacleod@redhat.com>
2910
2911 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
2912 * c-parser.c: Likewise.
2913
8d67ee55
RS
29142015-06-25 Richard Sandiford <richard.sandiford@arm.com>
2915
2916 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
2917 instead of pointer_hash.
2918 (detect_field_duplicates): Likewise.
2919
0ae9bd27
MP
29202015-06-25 Marek Polacek <polacek@redhat.com>
2921
2922 * c-array-notation.c: Use VAR_P throughout.
2923 * c-decl.c: Likewise.
2924 * c-objc-common.c: Likewise.
2925 * c-parser.c: Likewise.
2926 * c-typeck.c: Likewise.
2927
62f9079a
MP
29282015-06-25 Marek Polacek <polacek@redhat.com>
2929
2930 * c-decl.c: Use is_global_var throughout.
2931 * c-parser.c: Likewise.
2932 * c-typeck.c: Likewise.
2933
abb226c9
AM
29342015-06-17 Andrew MacLeod <amacleod@redhat.com>
2935
2936 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
2937 * c-aux-info.c: Likewise.
2938 * c-convert.c: Likewise.
2939 * c-decl.c: Likewise.
2940 * c-errors.c: Likewise.
2941 * c-lang.c: Likewise.
2942 * c-objc-common.c: Likewise.
2943 * c-parser.c: Likewise.
2944 * c-typeck.c: Likewise.
2945
8cbababc
JH
29462015-06-11 Jan Hubicka <hubicka@ucw.cz>
2947
2948 PR middle-end/66325
2949 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
2950 variants.
2951
a0349665
PMR
29522015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
2953
2954 * c-decl.c (pop_scope): Register the main translation unit
2955 through the new debug hook.
2956
13fdf2e2
AM
29572015-06-08 Andrew MacLeod <amacleod@redhat.com>
2958
2959 * c-array-notation.c : Adjust include files.
2960 * c-aux-info.c : Likewise.
2961 * c-convert.c : Likewise.
2962 * c-decl.c : Likewise.
2963 * c-errors.c : Likewise.
2964 * c-lang.c : Likewise.
2965 * c-lang.h : Likewise.
2966 * c-objc-common.c : Likewise.
2967 * c-parser.c : Likewise.
2968 * c-typeck.c : Likewise.
2969
d7438551
AH
29702015-06-05 Aldy Hernandez <aldyh@redhat.com>
2971
2972 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
2973 immediately clobber it.
2974 (c_write_global_declarations_1): Remove call to
2975 check_global_declaration_1.
2976 (c_write_global_declarations_2): Remove.
2977 (c_write_final_cleanups): Rename from c_write_global_declarations.
2978 Remove call to finalize_compilation_unit.
2979 Remove calls to debugging hooks.
2980 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
2981 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
2982 * c-tree.h: Remove c_write_global_declarations.
2983
ecb9f223
AM
29842015-06-04 Andrew MacLeod <amacleod@redhat.com>
2985
2986 * c-array-notation.c: Adjust includes for restructured coretypes.h.
2987 * c-aux-info.c: Likewise.
2988 * c-convert.c: Likewise.
2989 * c-decl.c: Likewise.
2990 * c-errors.c: Likewise.
2991 * c-lang.c: Likewise.
2992 * c-objc-common.c: Likewise.
2993 * c-parser.c: Likewise.
2994 * c-typeck.c: Likewise.
2995
9482b620
MP
29962015-06-04 Marek Polacek <polacek@redhat.com>
2997
2998 PR c/66341
2999 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
3000 it is a lvalue.
3001
bc51ace3
PK
30022015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3003
3004 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
3005 Warn for empty struct.
3006 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
3007
ea5b45b6
AT
30082015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
3009
3010 * c-decl.c (start_function): Call plugin before parsing.
3011 (finish_function): Call plugin after parsing.
3012
c2d47482
PK
30132015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3014
3015 PR c/49551
3016 * c-decl.c (merge_decls): Merge DECL_COMMON.
3017
a95492ab
JW
30182015-05-22 Jim Wilson <jim.wilson@linaro.org>
3019
3020 * Make-lang.in (check_gcc_pallelize): Define.
3021
fd5c817a
MP
30222015-05-22 Marek Polacek <polacek@redhat.com>
3023
3024 PR c/47043
3025 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
3026 attributes.
3027
c7b70a3c
MP
30282015-05-21 Marek Polacek <polacek@redhat.com>
3029
3030 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
3031 DECL_BUILT_IN.
3032
21b634ae
MP
30332015-05-20 Marek Polacek <polacek@redhat.com>
3034
3035 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
3036 * c-typeck.c: Likewise.
3037
296a8c2f
MP
30382015-05-19 Marek Polacek <polacek@redhat.com>
3039
3040 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
3041
41b37d5e
JJ
30422015-05-19 Jakub Jelinek <jakub@redhat.com>
3043
3044 PR middle-end/66199
3045 * c-parser.c (c_parser_omp_for_loop): Don't add
3046 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
3047 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
3048 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
3049 constructs.
3050
fab27f52
MM
30512015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
3052
3053 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 3054 swaps.
fab27f52 3055
40de31cf
MLI
30562015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
3057
3058 PR fortran/44054
3059 * c-objc-common.c (c_tree_printer): Replace locus pointer with
3060 accessor function.
3061
3aa3c9fc
MP
30622015-05-14 Marek Polacek <polacek@redhat.com>
3063
3064 PR c/66066
3065 PR c/66127
3066 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
3067 rather than with 0.
3068
c3388e62
DM
30692015-05-12 David Malcolm <dmalcolm@redhat.com>
3070
3071 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
3072 to add a call to warn_for_misleading_indentation.
3073 (c_parser_else_body): Likewise, adding param "else_loc".
3074 (c_parser_if_statement): Check for misleading indentation.
3075 (c_parser_while_statement): Likewise.
3076 (c_parser_for_statement): Likewise.
3077
755e528f
MP
30782015-05-08 Marek Polacek <polacek@redhat.com>
3079
3080 PR c/64918
3081 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
3082 (output_init_element): Likewise.
3083
0173bd2a
MP
30842015-05-07 Marek Polacek <polacek@redhat.com>
3085
3086 PR c/65179
3087 * c-typeck.c (build_binary_op): Warn when left shifting a negative
3088 value.
3089
9babc352
MP
30902015-04-30 Marek Polacek <polacek@redhat.com>
3091
3092 * c-typeck.c (set_init_label): Call error_at instead of error and
3093 pass LOC to it.
3094
ac9f18db
MP
3095 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
3096 the type of a decl.
3097
ec3fba51
MP
3098 * c-typeck.c (c_build_va_arg): Clarify the error message.
3099
b811915d
TS
31002015-04-29 Thomas Schwinge <thomas@codesourcery.com>
3101
3102 * c-parser.c (c_parser_oacc_enter_exit_data): Use
3103 OMP_STANDALONE_CLAUSES.
3104
f3075008
MP
31052015-04-28 Marek Polacek <polacek@redhat.com>
3106
3107 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
3108
4e81b788
MP
31092015-04-28 Marek Polacek <polacek@redhat.com>
3110
3111 PR c/65901
3112 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
3113
6c1db78e
MP
31142015-04-25 Marek Polacek <polacek@redhat.com>
3115
3116 PR c/52085
3117 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
3118 attribute.
3119
5c4abbb8
MP
31202015-04-23 Marek Polacek <polacek@redhat.com>
3121
3122 PR c/65345
3123 * c-decl.c (set_labels_context_r): New function.
3124 (store_parm_decls): Call it via walk_tree_without_duplicates.
3125 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
3126 instead of create_tmp_var. Build TARGET_EXPR instead of
3127 COMPOUND_EXPR.
3128 (build_atomic_assign): Use create_tmp_var_raw instead of
3129 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
3130
06aca1d5
IV
31312015-04-20 Ilya Verbin <ilya.verbin@intel.com>
3132
3133 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
3134 (c_parser_omp_target_update): Add missed %> to error_at ().
3135
8fba1830
BRF
31362015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
3137
3138 PR target/55143
3139 * c-decl.c (c_default_pointer_mode): Remove definition.
3140 * c-tree.h (c_default_pointer_mode): Remove declaration.
3141
62021f64
TB
31422015-03-27 Tobias Burnus <burnus@net-b.de>
3143
3144 PR c/65586
3145 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
3146 error out.
3147 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
3148 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
3149 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
3150
9b65e171
JJ
31512015-03-19 Jakub Jelinek <jakub@redhat.com>
3152
3153 * c-decl.c (c_decl_attributes): Also add "omp declare target"
3154 attribute for DECL_EXTERNAL VAR_DECLs.
3155
17958621
JJ
31562015-03-11 Jakub Jelinek <jakub@redhat.com>
3157
3158 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
3159 argument.
3160
7ccb1a11
JJ
31612015-03-10 Jakub Jelinek <jakub@redhat.com>
3162
3163 PR c/65120
3164 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
3165 before preparing arguments to warn_logical_not_parentheses.
3166
01177669
JJ
31672015-03-09 Jakub Jelinek <jakub@redhat.com>
3168
3169 PR c/65120
3170 * c-typeck.c (parser_build_binary_op): Don't warn for
3171 !!x == y or !b == y where b is _Bool.
3172
802ac282
MP
31732015-03-09 Marek Polacek <polacek@redhat.com>
3174
3175 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
3176 * c-decl.c (grokdeclarator): Likewise.
3177 * c-typeck.c (build_binary_op): Likewise.
3178
e5165b60
MP
31792015-02-27 Marek Polacek <polacek@redhat.com>
3180
3181 PR c/65228
3182 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
3183
065d214c
MP
31842015-02-14 Marek Polacek <polacek@redhat.com>
3185
3186 PR c/64768
3187 * c-decl.c (grokdeclarator): Set the range of a flexible array member
3188 declared through a typedef name.
3189
e5d9235b
MP
31902015-02-13 Marek Polacek <polacek@redhat.com>
3191
3192 PR c/65050
3193 * c-decl.c (grokdeclarator): Print also the type when giving
3194 the error message about array's incomplete element type.
3195
fa01ffcc
JJ
31962015-02-11 Jakub Jelinek <jakub@redhat.com>
3197
3198 PR c/64824
3199 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
3200 check in the POP macro.
3201
c3e38a03
MP
32022015-02-09 Marek Polacek <polacek@redhat.com>
3203
3204 PR c/64856
3205 * c-typeck.c (process_init_element): Don't always wrap
3206 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
3207 initializing a range of elements.
3208
4886ec8e
JJ
32092015-02-04 Jakub Jelinek <jakub@redhat.com>
3210
3211 PR c/64824
3212 PR c/64868
3213 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
3214
c3e38a03 32152015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
3216
3217 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
3218 processing enum declaration.
3219
7b33f0c8
MP
32202015-01-29 Marek Polacek <polacek@redhat.com>
3221
3222 PR c/64709
3223 * c-typeck.c (pop_init_level): If constructor_elements has
3224 exactly one element with integer_zerop value, set constructor_zeroinit
3225 to 1. Remove braces around warning_init call.
3226
dea63e49
JJ
32272015-01-27 Jakub Jelinek <jakub@redhat.com>
3228
3229 PR c/64766
3230 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
3231 of FUNCTION_DECLs with error_mark_node.
3232
d38f7dce
JJ
32332015-01-26 Jakub Jelinek <jakub@redhat.com>
3234
3235 PR c/64778
3236 * c-typeck.c (convert_arguments): Return -1 if there are
3237 error_args, even if we've diagnosed too many arguments.
3238
cbf5d0e7
RB
32392015-01-21 Richard Biener <rguenther@suse.de>
3240
3241 PR middle-end/64313
3242 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
3243 for builtins the user declared correctly.
3244
41dbbb37
TS
32452015-01-15 Thomas Schwinge <thomas@codesourcery.com>
3246 Bernd Schmidt <bernds@codesourcery.com>
3247 Cesar Philippidis <cesar@codesourcery.com>
3248 James Norris <jnorris@codesourcery.com>
3249 Jakub Jelinek <jakub@redhat.com>
3250 Ilmir Usmanov <i.usmanov@samsung.com>
3251
3252 * c-parser.c: Include "gomp-constants.h".
3253 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
3254 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
3255 Use OMP_CLAUSE_SET_MAP_KIND.
3256 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
3257 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
3258 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
3259 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
3260 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
3261 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
3262 "copyout", "create", "delete", "deviceptr", "gang", "host",
3263 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
3264 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
3265 "present_or_create", "pcreate", "seq", "self", "vector",
3266 "vector_length", "wait", "worker".
3267 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
3268 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
3269 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
3270 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
3271 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
3272 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
3273 (c_parser_oacc_data_clause_deviceptr)
3274 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
3275 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
3276 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
3277 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
3278 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
3279 (c_parser_oacc_parallel, c_parser_oacc_update)
3280 (c_parser_oacc_wait): New functions.
3281 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
3282 (c_finish_oacc_data): New prototypes.
3283 * c-typeck.c: Include "gomp-constants.h".
3284 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
3285 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
3286 OMP_CLAUSE_SET_MAP_KIND.
3287 (c_finish_oacc_parallel, c_finish_oacc_kernels)
3288 (c_finish_oacc_data): New functions.
3289 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
3290 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
3291 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
3292 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
3293 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
3294 GOMP_MAP_FORCE_DEVICEPTR.
3295
adfac8df
JJ
32962015-01-09 Michael Collison <michael.collison@linaro.org>
3297
3298 * c-array-notation.c: Include hash-set.h, machmode.h,
3299 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3300 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
3301 * c-aux-info.c: Ditto.
3302 * c-convert.c: Ditto.
3303 * c-decl.c: Ditto.
3304 * c-errors.c: Ditto.
3305 * c-lang.c: Dittoxs.
3306 * c-objc-common.c: Ditto.
3307 * c-parser.c: Ditto.
3308 * c-typeck.c: Include hash-set.h, machmode.h,
3309 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3310 fold-const.h, wide-int.h, inchash.h, real.h and
3311 fixed-value.h due to flattening of tree.h.
3312
2cc901dc
MP
33132015-01-07 Marek Polacek <polacek@redhat.com>
3314
3315 PR c/64417
3316 * c-typeck.c (process_init_element): Disallow initialization of
3317 a flexible array member with a string constant if the structure
3318 is in an array.
3319
5624e564
JJ
33202015-01-05 Jakub Jelinek <jakub@redhat.com>
3321
e5341100
JJ
3322 PR sanitizer/64344
3323 * c-typeck.c (convert_for_assignment, c_finish_return): For
3324 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
3325 types also set in_late_binary_op around convert call.
3326 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
3327 to integral type casts, if not in_late_binary_op, pass c_fully_fold
3328 result on expr as last argument to ubsan_instrument_float_cast,
3329 if in_late_binary_op, don't use c_save_expr but save_expr.
3330
5624e564
JJ
3331 Update copyright years.
3332
5bd012f8
MP
33332015-01-05 Marek Polacek <polacek@redhat.com>
3334
3335 PR c/64423
3336 * c-typeck.c (build_array_ref): Pass loc down to
3337 warn_array_subscript_with_type_char.
3338
3f8257db 33392014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
3340
3341 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 3342 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 3343 element type.
8e745a17 3344 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 3345 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 3346 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 3347 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 3348 to PEDWARN_FOR_QUALIFIERS.
768952be 3349
8f94a8c4
JJ
33502014-12-17 Jakub Jelinek <jakub@redhat.com>
3351
3352 PR sanitizer/64289
3353 * c-convert.c: Include ubsan.h.
3354 (convert): For real -> integral casts and
3355 -fsanitize=float-cast-overflow don't call convert_to_integer, but
3356 instead instrument the float cast directly.
3357
b731b390
JJ
33582014-11-29 Jakub Jelinek <jakub@redhat.com>
3359
3360 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
3361 c_finish_stmt_expr): Remove NULL last argument from
3362 create_tmp_var_raw and create_tmp_var calls.
3363 * c-array-notation.c (fix_builtin_array_notation_fn,
3364 build_array_notation_expr, fix_conditional_array_notations_1,
3365 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
3366
541e35a6
MP
33672014-11-28 Marek Polacek <polacek@redhat.com>
3368
3369 PR c/63862
3370 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
3371 convert the right operand to integer type.
3372
b286be94
MP
33732014-11-25 Marek Polacek <polacek@redhat.com>
3374
3375 PR c/63877
3376 * c-decl.c (start_function): Disable -Wmissing-declarations warning
3377 for inline functions.
3378
aa7da51a
JJ
33792014-11-21 Jakub Jelinek <jakub@redhat.com>
3380
3381 PR target/63764
3382 * c-typeck.c (build_array_ref): Adjust
3383 convert_vector_to_pointer_for_subscript caller. If it returns true,
3384 call non_lvalue_loc on the result.
3385
d876207f
RB
33862014-11-11 Richard Biener <rguenther@suse.de>
3387
3388 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
3389 to true.
3390
e5e44252
AK
33912014-11-10 Andi Kleen <ak@linux.intel.com>
3392
3393 PR c/60804
3394 * c-parser.c (c_parser_statement_after_labels): Call
3395 check_no_cilk.
3396 (c_parser_if_statement): Dito.
3397 (c_parser_switch_statement): Dito.
3398 (c_parser_while_statement): Dito.
3399 (c_parser_do_statement): Dito.
3400 (c_parser_for_statement): Dito.
3401 * c-typeck.c (c_finish_loop): Dito.
3402
13c21655
PC
34032014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
3404
3405 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
3406 OPT_Wshift_count_overflow in the warnings.
3407
2d51fcef
MP
34082014-10-30 Marek Polacek <polacek@redhat.com>
3409
3410 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
3411 print the stripped version as well, if they're not the same.
3412
ef4bddc2
RS
34132014-10-29 Richard Sandiford <richard.sandiford@arm.com>
3414
3415 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
3416 machine_mode.
3417
c582198b
AM
34182014-10-28 Andrew MacLeod <amacleod@redhat.com>
3419
3420 * c-decl.c: Adjust include files.
3421 * c-parser.c: Ditto.
3422
ddc8de03
PM
34232014-10-27 Phil Muldoon <pmuldoon@redhat.com>
3424 Tom Tromey <tromey@redhat.com>
3425
3426 * c-tree.h (enum c_oracle_request): New.
3427 (c_binding_oracle_function): New typedef.
3428 (c_binding_oracle, c_pushtag, c_bind): Declare.
3429 * c-decl.c (c_binding_oracle): New global.
3430 (I_SYMBOL_CHECKED): New macro.
3431 (i_symbol_binding): New function.
3432 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
3433 (I_TAG_CHECKED): New macro.
3434 (i_tag_binding): New function.
3435 (I_TAG_BINDING, I_TAG_DECL): Redefine.
3436 (I_LABEL_CHECKED): New macro.
3437 (i_label_binding): New function.
3438 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
3439 (c_print_identifier): Save and restore c_binding_oracle.
3440 (c_pushtag, c_bind): New functions.
3441
60393bbc
AM
34422014-10-27 Andrew MacLeod <amacleod@redhat.com>
3443
3444 * c-typeck.c: Adjust include files.
3445
d723bb7c
MLI
34462014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
3447
3448 PR c++/53061
3449 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
3450 initialization here...
3451 (c_initialize_diagnostics): ... but here. Set defaults after
3452 building pretty-printer.
3453
1bc5a451
MP
34542014-10-23 Marek Polacek <polacek@redhat.com>
3455
3456 PR c/63626
3457 * c-decl.c (pop_scope): Don't print warning in external_scope.
3458
4435bb92
MP
34592014-10-19 Marek Polacek <polacek@redhat.com>
3460
3461 PR c/63567
3462 * c-typeck.c (output_init_element): Allow initializing objects with
3463 static storage duration with compound literals even in C99 and add
3464 pedwarn for it.
3465
7278465e
MP
34662014-10-17 Marek Polacek <polacek@redhat.com>
3467
3468 PR c/63567
3469 * c-typeck.c (digest_init): Allow initializing objects with static
3470 storage duration with compound literals even in C99 and add pedwarn
3471 for it.
3472
d9b7be2e
MP
34732014-10-17 Marek Polacek <polacek@redhat.com>
3474
3475 PR c/63543
3476 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
3477 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
3478 error multiple times. Print the type.
3479
f406ae1f
MP
34802014-10-17 Marek Polacek <polacek@redhat.com>
3481
3482 PR c/63549
3483 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
3484 type.
3485
92574c7c
MP
34862014-10-17 Marek Polacek <polacek@redhat.com>
3487
3488 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
3489 (start_function): Use OPT_Wimplicit_int instead of 0.
3490 (store_parm_decls_oldstyle): Likewise.
3491
1bc4a978
MT
34922014-10-17 Alan Modra <amodra@gmail.com>
3493
3494 PR middle-end/61848
3495 * c-decl.c (merge_decls): Don't merge section name or tls model
3496 to newdecl symtab node, instead merge to olddecl. Override
3497 existing olddecl section name. Set tls_model for all thread-local
3498 vars, not just OMP thread-private ones. Remove incorrect comment.
3499
83685514
AM
35002014-10-16 Andrew MacLeod <amacleod@redhat.com>
3501
3502 * c-decl.c: Adjust include files.
3503
78a7c317
DD
35042014-10-14 DJ Delorie <dj@redhat.com>
3505
3506 * c-parser.c (c_parse_init): Add RID entries for each __intN.
3507 (c_token_starts_typename): Check all __intN, not just __int128.
3508 (c_token_starts_declspecs): Likewise.
3509 (c_parser_declspecs): Likewise.
3510 (c_parser_attribute_any_word): Likewise.
3511 (c_parser_objc_selector): Likewise.
3512 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
3513 (struct c_declspecs): Add int_n_idx field to record *which* __intN
3514 is specified.
3515 * c-decl.c (declspecs_add_type): Check for all __intN, not just
3516 __int128.
3517 (finish_declspecs): Likewise.
3518
74d98c1e
AB
35192014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
3520
8e745a17 3521 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 3522 the duplicate code.
8e745a17 3523 (c_parser_statement): Call the new function.
74d98c1e 3524
84937de2
MP
35252014-10-09 Marek Polacek <polacek@redhat.com>
3526
3527 PR c/63480
3528 * c-typeck.c (pop_init_level): Don't warn about initializing
3529 with { }.
3530
0382aaa0
MP
35312014-10-07 Marek Polacek <polacek@redhat.com>
3532
3533 PR c/59717
3534 * c-decl.c (header_for_builtin_fn): New function.
3535 (implicitly_declare): Suggest which header to include.
3536
7a0ca710
MP
35372014-10-07 Marek Polacek <polacek@redhat.com>
3538
3539 * c-convert.c (convert): Use error_operand_p.
3540 * c-typeck.c (require_complete_type): Likewise.
3541 (really_atomic_lvalue): Likewise.
3542 (digest_init): Likewise.
3543 (handle_omp_array_sections_1): Likewise.
3544
6bc8a126
MP
35452014-10-03 Marek Polacek <polacek@redhat.com>
3546
3547 PR c/63453
3548 * c-decl.c (pop_scope): Don't warn about "inline function declared
3549 but never defined" for functions marked with gnu_inline attribute.
3550
d90c0a59
JJ
35512014-09-25 Jakub Jelinek <jakub@redhat.com>
3552
3553 PR c++/63249
3554 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
3555 on low_bound and length.
3556
083e891e
MP
35572014-09-24 Marek Polacek <polacek@redhat.com>
3558
3559 PR c/61405
3560 PR c/53874
3561 * c-parser.c: Don't define CPP_KEYWORD.
3562 (c_parser_switch_statement): Pass original type to c_finish_case.
3563 * c-tree.h (c_finish_case): Update declaration.
3564 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
3565 conditionally to c_do_switch_warnings.
3566
8d95fe25
MP
35672014-09-03 Marek Polacek <polacek@redhat.com>
3568
3569 PR c/62024
3570 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
3571 conversions.
3572
9a771876
JJ
35732014-09-02 Jakub Jelinek <jakub@redhat.com>
3574 Balaji V. Iyer <balaji.v.iyer@intel.com>
3575 Igor Zamyatin <igor.zamyatin@intel.com>
3576
3577 * c-parser.c (c_parser_cilk_for): New function.
3578 (c_parser_cilk_grainsize): Likewise.
3579 (c_get_temp_regvar): Likewise.
3580 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
3581 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
3582 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
3583 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
3584 case.
3585
b7679d96
CG
35862014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
3587
3588 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
3589 with using HOST_WIDE_INT without truncation to 'int'
3590
59ea0364
MP
35912014-08-22 Marek Polacek <polacek@redhat.com>
3592
3593 PR c++/62199
3594 * c-typeck.c (parser_build_binary_op): Adjust call to
3595 warn_logical_not_parentheses.
3596
671a475e
IZ
35972014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
3598
3599 PR other/62008
3600 * c-parser.c (c_parser_array_notation): Check for correct
3601 type of an array added.
3602
04159acf
MP
36032014-08-19 Marek Polacek <polacek@redhat.com>
3604
3605 PR c++/62153
3606 * c-typeck.c (build_binary_op): If either operand of a comparison
3607 is a boolean expression, call maybe_warn_bool_compare.
3608
c77935ee
PP
36092014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
3610
3611 PR c/45584
3612 * c-typeck.c (build_c_cast): Do a conversion even when the
3613 TYPE_MAIN_VARIANTs are the same.
3614
35aff4fb
MP
36152014-08-19 Marek Polacek <polacek@redhat.com>
3616
3617 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
3618 pedwarn_c99 instead of pedwarn.
3619 (grokfield): Likewise.
3620 (warn_defaults_to): New function.
3621 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
3622 Unconditionally call pedwarn_c99 instead of pedwarn.
3623 (start_function): Call warn_defaults_to instead of pedwarn_c99.
3624 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
3625 check flag_isoc11 before.
3626 * c-errors.c (pedwarn_c99): Change the return type to bool.
3627 Handle -Wc99-c11-compat.
3628 * c-parser.c (disable_extension_diagnostics): Handle
3629 warn_c99_c11_compat.
3630 (restore_extension_diagnostics): Likewise.
3631 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
3632 instead of pedwarn, don't check flag_isoc11 before.
3633 (c_parser_declspecs): Likewise.
3634 (c_parser_alignas_specifier): Likewise.
3635 (c_parser_alignof_expression): Likewise.
3636 (c_parser_generic_selection): Likewise.
3637 * c-tree.h (pedwarn_c99): Update declaration.
3638 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
3639 of pedwarn_c99.
3640
177cce46
MP
36412014-08-19 Marek Polacek <polacek@redhat.com>
3642
3643 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
3644 to pedwarn_c90.
3645 * c-errors.c: Include "opts.h".
3646 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
3647 * c-parser.c (disable_extension_diagnostics): Handle negative value
3648 of warn_c90_c99_compat, too.
3649 (restore_extension_diagnostics): Likewise.
3650 (c_parser_compound_statement_nostart): Pass
3651 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
3652
6dc99c33
MP
36532014-08-12 Marek Polacek <polacek@redhat.com>
3654
3655 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
3656 Add pedwarn.
3657 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
3658 Likewise.
3659 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
3660
3f8257db 36612014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
3662
3663 PR c/51849
3664 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
3665 Call pedwarn_c90 instead of pedwarn.
3666 (check_bitfield_type_and_width): Likewise.
3667 (declspecs_add_qual): Likewise.
3668 (declspecs_add_type): Likewise.
3669 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
3670 Adjust to only call pedwarn_c90.
3671 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
3672 pedwarn_c90 instead of pedwarn.
3673 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
3674 * c-parser.c (disable_extension_diagnostics): Handle
3675 warn_c90_c99_compat.
3676 (restore_extension_diagnostics): Likewise.
3677 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
3678 pedwarn_c90 instead of pedwarn.
3679 (c_parser_initelt): Likewise.
3680 (c_parser_postfix_expression): Likewise.
3681 (c_parser_postfix_expression_after_paren_type): Likewise.
3682 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
3683 * c-tree.h: Fix formatting.
3684 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
3685 pedwarn_c90 instead of pedwarn.
3686
9f25a338
TS
36872014-08-07 Trevor Saunders <tsaunders@mozilla.com>
3688
3689 * c-typeck.c: Remove include of pointer-set.h.
3690
044331a8
MP
36912014-08-07 Marek Polacek <polacek@redhat.com>
3692
3693 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
3694
b787e7a2
TS
36952014-08-02 Trevor Saunders <tsaunders@mozilla.com>
3696
3697 * c-typeck.c: Use hash_map instead of pointer_map.
3698
6e2830c3
TS
36992014-08-02 Trevor Saunders <tsaunders@mozilla.com>
3700
3701 * c-decl.c: Use hash_set instead of pointer_set.
3702
a7ee52fb
IZ
37032014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
3704
3705 PR middle-end/61455
3706 * c-array-notation.c (expand_array_notations): Handling
3707 of DECL_EXPR added.
3708
b4dfdc11
MG
37092014-07-31 Marc Glisse <marc.glisse@inria.fr>
3710
3711 PR c++/60517
3712 * c-typeck.c (c_finish_return): Return 0 instead of the address of
3713 a local variable.
3714
976d5a22
TT
37152014-07-30 Tom Tromey <tromey@redhat.com>
3716
3717 * c-typeck.c (struct constructor_stack) <designator_depth>: New
3718 field.
3719 (really_start_incremental_init, push_init_level): Initialize
3720 designator_depth.
3721 (pop_init_level): Set global designator_depth.
3722 (process_init_element): Check for designated_init attribute.
3723
30281de2
MP
37242014-07-20 Marek Polacek <polacek@redhat.com>
3725
3726 PR c/61852
3727 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
3728 (implicitly_declare): Pass location to implicit_decl_warning.
3729
b108f48f
JJ
37302014-07-14 Jakub Jelinek <jakub@redhat.com>
3731
3732 PR middle-end/61294
3733 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
3734 If non-NULL, call c_parser_check_literal_zero.
3735 (c_parser_check_literal_zero): New function.
3736 (c_parser_postfix_expression_after_primary): Adjust
3737 c_parser_expr_list caller, handle -Wmemset-transposed-args.
3738
773ec47f
MP
37392014-07-06 Marek Polacek <polacek@redhat.com>
3740
3741 PR c/6940
3742 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
3743 * c-tree.h (C_ARRAY_PARAMETER): Define.
3744 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
3745 function parameter.
3746
22e1cf1c 37472014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 3748 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
3749
3750 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
3751 releasing symbol.
3752
52ec0ea3
MP
37532014-07-01 Marek Polacek <polacek@redhat.com>
3754
3755 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
3756 instead of 0 to WARN_FOR_ASSIGNMENT.
3757
d5c3d343
MP
37582014-07-01 Marek Polacek <polacek@redhat.com>
3759
3760 PR c/58286
3761 * c-typeck.c (convert_for_assignment): Pass
3762 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
3763
6a7253a4
MP
37642014-06-30 Marek Polacek <polacek@redhat.com>
3765
3766 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
3767 has no_sanitize_undefined attribute.
3768
5e88a8f4
IZ
37692014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
3770
3771 PR middle-end/57541
3772 * c-array-notation.c (fix_builtin_array_notation_fn):
3773 Check for 0 arguments in builtin call. Check that bultin argument is
3774 correct.
3775 * c-parser.c (c_parser_array_notation): Check for incorrect initial
3776 index.
3777
9698b078
SH
37782014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
3779
3780 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
3781 qualifiers in __auto_type for atomic types.
3782 (c_parser_typeof_specifier): Discard all type qualifiers in
3783 __typeof__ for atomic types.
3784
6e07c515
MP
37852014-06-25 Marek Polacek <polacek@redhat.com>
3786
3787 PR c/61162
3788 * c-parser.c (c_parser_statement_after_labels): Pass the location of
3789 the return expression to c_finish_return.
3790
da6f124d
JJ
37912014-06-25 Jakub Jelinek <jakub@redhat.com>
3792
3793 * c-typeck.c (c_finish_omp_clauses): Make sure
3794 OMP_CLAUSE_LINEAR_STEP has correct type.
3795
c203e8a7
TS
37962014-06-24 Trevor Saunders <tsaunders@mozilla.com>
3797
3798 * c-decl.c: Adjust.
3799
56ad0e38
JJ
38002014-06-24 Jakub Jelinek <jakub@redhat.com>
3801
3802 * c-parser.c (c_parser_omp_for_loop): For
3803 #pragma omp parallel for simd move lastprivate clause from parallel
3804 to for rather than simd.
3805
47c2554f
MP
38062014-06-23 Marek Polacek <polacek@redhat.com>
3807
3808 * c-typeck.c (parser_build_binary_op): Don't call
3809 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
3810
56363ffd
JH
38112014-06-15 Jan Hubicka <hubicka@ucw.cz>
3812
3813 * c-parser.c (c_parser_omp_threadprivate): Likewise.
3814 * c-decl.c (merge_decls): Likewise.
3815
d7ff7ae5
MP
38162014-06-09 Marek Polacek <polacek@redhat.com>
3817
3818 PR c/36446
3819 * c-typeck.c (error_init): Call inform instead of error_at.
3820 (pedwarn_init): Call inform instead of pedwarn.
3821 (warning_init): Call inform instead of warning_at.
3822
24d047a3
JH
38232014-06-07 Jan Hubicka <hubicka@ucw.cz>
3824
3825 * c-decl.c (merge_decls): Use set_decl_section_name.
3826 (duplicate_decls): Remove node if it exists.
3827
9bac5cbb
G
38282014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
3829
3830 PR c/53119
3831 * c-typeck.c (push_init_level, process_init_element,
3832 pop_init_level): Correct check for zero initialization, move
3833 missing brace warning to respect zero initialization.
3834
8ffcdea8
MP
38352014-06-05 Marek Polacek <polacek@redhat.com>
3836
3837 PR c/56724
3838 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
3839
742938c9
MP
38402014-06-05 Marek Polacek <polacek@redhat.com>
3841
3842 PR c/49706
3843 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
3844 on the left hand side operand of a comparison.
3845
6447c55d
MP
38462014-06-05 Marek Polacek <polacek@redhat.com>
3847
3848 PR c/48062
3849 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
3850 Print note only if the warning was printed.
3851
9dc7743c
IZ
38522014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
3853
3854 PR c/58942
3855 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
3856 with a pointer.
3857
fedfecef
MP
38582014-06-03 Marek Polacek <polacek@redhat.com>
3859
3860 PR c/60439
3861 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
3862 c_start_case.
3863 * c-tree.h (c_start_case): Update.
3864 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
3865 switch condition has boolean value.
3866
9b2b7279
AM
38672014-06-02 Andrew MacLeod <amacleod@redhat.com>
3868
3869 * c-decl.c: Include builtins.h.
3870 * c-parser.c: Likewise.
3871
5c1bc275
MP
38722014-05-27 Marek Polacek <polacek@redhat.com>
3873
3874 PR c/56724
3875 * c-typeck.c (convert_arguments): Get location of a parameter. Change
3876 error and warning calls to error_at and warning_at. Pass location of
3877 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
3878 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
3879 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
3880
97563bc8
IZ
38812014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
3882
3883 PR c/61191
3884 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
3885 function parameters.
3886
aede2c10
JH
38872014-05-23 Jan Hubicka <hubicka@ucw.cz>
3888
3889 * c-decl.c (merge_decls): Preserve symtab node pointers.
3890 (duplicate_decls): Free new decl.
3891
edbba2ce
TS
38922014-05-23 Thomas Schwinge <thomas@codesourcery.com>
3893
f3316c6d
TS
3894 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
3895 initialization.
3896
edbba2ce
TS
3897 * c-parser.c (c_parser_omp_target): Return bool values.
3898
68c81f24
TS
38992014-05-22 Thomas Schwinge <thomas@codesourcery.com>
3900
3901 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
3902 num_teams_loc variable to num_thread_limit_loc.
3903
632f2871
RS
39042014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
3905
3906 * c-array-notation.c (expand_array_notations): Use void_node
3907 instead of void_zero_node.
3908
766090c2
TS
39092014-05-17 Trevor Saunders <tsaunders@mozilla.com>
3910
3911 * c-decl.c (finish_struct): Adjust.
3912 (finish_enum): Likewise.
3913 (bind): Adjust.
3914 (record_inline_static): Likewise.
3915 (push_scope): Likewise.
3916 (make_label): Likewise.
3917 (lookup_label_for_goto): Likewise.
3918 (finish_struct): Likewise.
3919 (finish_enum): Likewise.
3920 (store_parm_decls): Likewise.
3921 (c_push_function_context): Likewise.
3922 * c-lang.h: Remove usage of variable_size gty attribute.
3923 * c-parser.c (c_parse_init): Adjust.
3924 (c_parse_file): Likewise.
3925
2b107f6b
MP
39262014-05-13 Marek Polacek <polacek@redhat.com>
3927
3928 PR c/61162
3929 * c-typeck.c (convert_for_assignment): Pass location to
3930 WARN_FOR_ASSIGNMENT instead of input_location.
3931
d033409e
MP
39322014-05-10 Marek Polacek <polacek@redhat.com>
3933
3934 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
3935 maybe_warn_string_init.
3936 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
3937 maybe_warn_string_init.
3938 * c-tree.h (maybe_warn_string_init): Update declaration.
3939 * c-typeck.c (maybe_warn_string_init): Add location parameter.
3940 Call pedwarn_init with loc instead of with input_location.
3941 (digest_init): Pass init_loc to maybe_warn_string_init.
3942 (pop_init_level): Call pedwarn_init with loc instead of with
3943 input_location.
3944 (set_init_index): Likewise.
3945 (process_init_element): Likewise.
3946
ea58ef42
MP
39472014-05-09 Marek Polacek <polacek@redhat.com>
3948
3949 PR c/61096
3950 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
3951 (c_parser_initelt): Pass location to set_init_label. Pass array index
3952 location to set_init_index.
3953 * c-tree.h (push_init_level): Update declaration.
3954 (pop_init_level): Likewise.
3955 (set_init_index): Likewise.
3956 (set_init_label): Likewise.
3957 * c-typeck.c (error_init): Add location parameter. Call error_at
3958 instead of error.
3959 (digest_init): Pass init_loc to error_init.
3960 (really_start_incremental_init):
3961 (push_init_level): Add location parameter. Pass loc to pop_init_level
3962 and error_init.
3963 (pop_init_level): Likewise.
3964 (set_designator): Add location parameter. Pass loc to pop_init_level,
3965 push_init_level, and error_init.
3966 (set_init_index): Add location parameter. Pass loc to error_init and
3967 set_designator.
3968 (set_init_label): Likewise.
3969 (output_init_element): Pass loc to error_init.
3970 (process_init_element): Pass loc to error_init, pop_init_level,
3971 pedwarn_init, and push_init_level.
3972
661a0813
MP
39732014-05-09 Marek Polacek <polacek@redhat.com>
3974
3975 PR c/50459
3976 * c-parser.c (c_parser_attributes): Parse the arguments as an
3977 expression-list if the attribute takes identifier.
3978
2793eeab
MP
39792014-05-08 Marek Polacek <polacek@redhat.com>
3980
3981 PR c/61053
3982 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
3983 TYPE_ALIGN_UNIT.
3984
f827930a
MP
39852014-05-08 Marek Polacek <polacek@redhat.com>
3986
3987 PR c/61077
3988 * c-decl.c (start_function): Warn for _Atomic-qualified return type
3989 of main.
3990
1d60af08
KZ
39912014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
3992 Mike Stump <mikestump@comcast.net>
3993 Richard Sandiford <rdsandiford@googlemail.com>
3994
3995 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
3996 (finish_enum): Use wide-int interfaces.
3997 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
3998 * c-typeck.c (build_c_cast): Likewise.
3999 (set_nonincremental_init_from_string): Likewise.
4000 (c_tree_equal): Likewise.
4001
a0e24419
MP
40022014-05-02 Marek Polacek <polacek@redhat.com>
4003
4004 PR c/25801
4005 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
4006 Return size_one_node when the type is not complete.
4007 (pointer_diff): Remove comment.
4008 (build_unary_op): Improve error messages.
4009
19fc9faa
MP
40102014-05-02 Marek Polacek <polacek@redhat.com>
4011
4012 * c-typeck.c (c_finish_return): Separate warning_at calls.
4013
63bc4e87
MP
40142014-05-02 Marek Polacek <polacek@redhat.com>
4015
4016 * c-tree.h (error_init): Remove declaration.
4017 (pedwarn_init): Likewise.
4018 * c-typeck.c (error_init): Make static and move above.
4019 (pedwarn_init): Likewise.
4020 (warning_init): Move above.
4021 (maybe_warn_string_init): Likewise.
4022
4bd2511b
JL
40232014-05-01 Jeff Law <law@redhat.com>
4024
4025 Revert:
4026
4027 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4028 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
4029 avoid goto.
4030
6a358dcb
MP
40312014-05-02 Marek Polacek <polacek@redhat.com>
4032
4033 PR c/60784
4034 * c-typeck.c (push_init_level): Set constructor_designated to
4035 p->designated for structures.
4036
ae5ebda4
MP
40372014-05-01 Marek Polacek <polacek@redhat.com>
4038
4039 PR c/60915
4040 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
4041 function-definition has an attribute after the declarator.
4042
96b40f8d
MP
40432014-05-01 Marek Polacek <polacek@redhat.com>
4044
4045 PR c/60257
4046 * c-typeck.c (warning_init): Add location_t parameter. Call
4047 warning_at instead of warning.
4048 (push_init_level): Pass input_location to warning_init.
4049 (add_pending_init): Add location_t parameter. Pass loc to
4050 warning_init.
4051 (set_nonincremental_init): Pass input_location to add_pending_init.
4052 (set_nonincremental_init_from_string): Likewise.
4053 (output_init_element): Pass loc to warning_init and to
4054 add_pending_init.
4055
32e00768
MP
40562014-05-01 Marek Polacek <polacek@redhat.com>
4057
4058 PR c/43395
4059 * c-typeck.c (c_finish_return): Distinguish between label and variable
4060 when warning about returning local address.
4061
c9379ce2
MP
40622014-05-01 Marek Polacek <polacek@redhat.com>
4063
4064 PR c/29467
4065 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
4066 in C89 mode.
4067
d00887e8
MP
40682014-05-01 Marek Polacek <polacek@redhat.com>
4069
4070 PR c/43245
4071 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
4072 instead of 0 to WARN_FOR_QUALIFIERS.
4073
5436fa2e
MP
40742014-05-01 Marek Polacek <polacek@redhat.com>
4075
4076 PR c/56989
4077 * c-typeck.c (default_conversion): Use better location for
4078 error call.
4079
f8ed5150
MP
40802014-04-30 Marek Polacek <polacek@redhat.com>
4081
4082 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
4083 also when SANITIZE_FLOAT_DIVIDE is on.
4084
8337d1db
MP
40852014-04-30 Marek Polacek <polacek@redhat.com>
4086
4087 PR c/60139
4088 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
4089 and pedwarn_init. Use loc insted of input_location.
4090
c4bdc42f
MP
40912014-04-30 Marek Polacek <polacek@redhat.com>
4092
4093 PR c/60351
4094 * c-typeck.c (build_binary_op): Use location when warning about
4095 shift count.
4096
45484dcf
MP
40972014-04-25 Marek Polacek <polacek@redhat.com>
4098
4099 PR c/18079
4100 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
4101 always_inline/noinline and hot/cold attributes.
4102
34cf811f
MP
41032014-04-25 Marek Polacek <polacek@redhat.com>
4104
4105 PR c/60114
4106 * c-parser.c (c_parser_initelt): Pass input_location to
4107 process_init_element.
4108 (c_parser_initval): Pass loc to process_init_element.
4109 * c-tree.h (process_init_element): Adjust declaration.
4110 * c-typeck.c (push_init_level): Pass input_location to
4111 process_init_element.
4112 (pop_init_level): Likewise.
4113 (set_designator): Likewise.
4114 (output_init_element): Add location_t parameter. Pass loc to
4115 digest_init.
4116 (output_pending_init_elements): Pass input_location to
4117 output_init_element.
4118 (process_init_element): Add location_t parameter. Pass loc to
4119 output_init_element.
4120
42056eac
JJ
41212014-04-24 Jakub Jelinek <jakub@redhat.com>
4122
4123 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
4124 atomic-clause, allow comma in between atomic-clause and
4125 seq_cst.
4126
e162a134
JJ
41272014-04-22 Jakub Jelinek <jakub@redhat.com>
4128
4129 PR c/59073
4130 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
4131 fails, don't set OM_PARALLEL_COMBINED and return NULL.
4132
2f6babac
IZ
41332014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
4134
4135 PR middle-end/60469
4136 * c-array-notation.c (fix_builtin_array_notation_fn): Use
4137 create_tmp_var instead build_decl for creating temps.
4138 (build_array_notation_expr): Likewise.
4139 (fix_conditional_array_notations_1): Likewise.
4140 (fix_array_notation_expr): Likewise.
4141 (fix_array_notation_call_expr): Likewise.
4142
8edbfaa6
JJ
41432014-03-28 Jakub Jelinek <jakub@redhat.com>
4144
4145 PR c++/60689
4146 * c-tree.h (c_build_function_call_vec): New prototype.
4147 * c-typeck.c (build_function_call_vec): Don't call
4148 resolve_overloaded_builtin here.
4149 (c_build_function_call_vec): New wrapper function around
4150 build_function_call_vec. Call resolve_overloaded_builtin here.
4151 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
4152 Call c_build_function_call_vec instead of build_function_call_vec.
4153 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
4154 * c-decl.c (finish_decl): Likewise.
4155
7485aeea
MLI
41562014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4157
4158 PR c/55383
4159 * c-typeck.c: Use correct format string in cast-qual warning
4160
b17a8b07
TS
41612014-03-07 Thomas Schwinge <thomas@codesourcery.com>
4162
4163 * c-decl.c (c_decl_attributes): Use
4164 lang_hooks.types.omp_mappable_type.
4165 * c-typeck.c (c_finish_omp_clauses): Likewise.
4166
3af9c5e9
MP
41672014-03-06 Marek Polacek <polacek@redhat.com>
4168
4169 PR c/60197
4170 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
4171 of checking tree code.
4172
1c9f5f33
PK
41732014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4174
4175 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
4176 (c_parser_parameter_declaration): Likewise.
4177
cc28fc7f
MP
41782014-02-19 Marek Polacek <polacek@redhat.com>
4179
4180 PR c/60195
4181 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
4182 Call mark_exp_read on exp.value.
4183 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
4184 TREE_ADDRESSABLE on old instead of val.
4185 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
4186
b581c05c
PK
41872014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4188
4189 * c-parser.c (c_parser_get_builtin_args): Replace calls to
4190 C_EXPR_APPEND by vec_safe_push.
4191 * c-tree.h (C_EXPR_APPEND): Remove.
4192
81e5eca8
MP
41932014-01-31 Marek Polacek <polacek@redhat.com>
4194
4195 PR c/59963
4196 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
4197 build_function_call_vec.
4198 (build_function_call): Likewise.
4199 (build_atomic_assign): Likewise.
4200 (build_function_call_vec): Add arg_loc parameter. Use it.
4201 (convert_arguments): Likewise.
4202 (convert_for_assignment): Rename rhs_loc to expr_loc.
4203 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
4204 (c_parser_objc_keywordexpr): Likewise.
4205 (c_parser_postfix_expression_after_primary): Call
4206 build_function_call_vec with expr_loc rather than op_loc.
4207 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
4208 build_function_call_vec.
4209 (c_parser_expr_list): Add locations parameter. Fill it with locations
4210 of function arguments.
4211 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
4212
68fca595
MP
42132014-01-30 Marek Polacek <polacek@redhat.com>
4214
4215 PR c/59940
4216 * c-typeck.c (build_function_call_vec): Use loc parameter.
4217 (convert_arguments): Add location parameter. Use it.
4218 (ep_convert_and_check): Likewise.
4219 (build_atomic_assign): Adjust convert_for_assignment call.
4220 (build_modify_expr): Likewise.
4221 (digest_init): Likewise.
4222 (c_finish_return): Likewise.
4223 (build_conditional_expr): Adjust ep_convert_and_check calls.
4224 (convert_for_assignment): Add rhs_loc parameter. Use it.
4225 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
4226 calls.
4227
fa337f3a
RB
42282014-01-30 Richard Biener <rguenther@suse.de>
4229
4230 PR c/59905
4231 * c-typeck.c (build_function_call_vec): Do not replace calls
4232 to a function via an incompatible type with a runtime abort.
4233
b72271b9
BI
42342014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
4235
4236 * c-parser.c (c_parser_declaration_or_fndef): Replaced
4237 flag_enable_cilkplus with flag_cilkplus.
4238 (c_parser_direct_declarator_inner): Likewise.
4239 (c_parser_attribute_any_word): Likewise.
4240 (c_parser_attributes): Likewise.
4241 (c_parser_compound_statement): Likewise.
4242 (c_parser_statement_after_labels): Likewise.
4243 (c_parser_if_statement): Likewise.
4244 (c_parser_switch_statement): Likewise.
4245 (c_parser_do_statement): Likewise.
4246 (c_parser_for_statement): Likewise.
4247 (c_parser_unary_expression): Likewise.
4248 (c_parser_postfix_expression): Likewise.
4249 (c_parser_postfix_expression_after_primary): Likewise.
4250 (c_parser_postfix_expression_after_primary): Likewise.
4251 (c_parser_omp_clause_name): Likewise.
4252 (c_finish_omp_declare_simd): Likewise.
4253 (c_parser_cilk_verify_simd): Likewise.
4254 * c-typeck.c (build_array_ref): Likewise.
4255 (build_function_call_vec): Likewise.
4256 (convert_arguments): Likewise.
4257 (build_compound_expr): Likewise.
4258 (c_finish_return): Likewise.
4259 (c_finish_if_stmt): Likewise.
4260 (c_finish_loop): Likewise.
4261 (build_binary_op): Likewise.
4262
393e8e8b
MP
42632014-01-23 Marek Polacek <polacek@redhat.com>
4264
4265 PR c/59846
4266 * c-typeck.c (parser_build_binary_op): Use location instead of
4267 input_location.
4268 (build_binary_op): Pass location to shorten_compare.
4269
f04dda30
MP
42702014-01-23 Marek Polacek <polacek@redhat.com>
4271
4272 PR c/58346
4273 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
4274 an empty aggregate.
4275
789eadcd
MP
42762014-01-23 Marek Polacek <polacek@redhat.com>
4277
4278 PR c/59871
4279 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
4280 of a comma expression.
4281 (emit_side_effect_warnings): Likewise.
4282
40f14e9f
BI
42832014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
4284
4285 PR c/59825
4286 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
4287 function to use walk_tree and moved a lot of its functionality to
4288 expand_array_notations.
4289 (expand_array_notations): New function.
4290
74558dd9
BI
42912014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
4292
4293 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
4294 attribute an attribute without value.
4295
652fea39
JJ
42962014-01-23 Jakub Jelinek <jakub@redhat.com>
4297
4298 PR middle-end/58809
4299 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
4300 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
4301
f34f1c87
MP
43022014-01-22 Marek Polacek <polacek@redhat.com>
4303
4304 PR c/59891
4305 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
4306 of remove_c_maybe_const_expr on op1 and op2.
4307
241f845a
JJ
43082014-01-15 Jakub Jelinek <jakub@redhat.com>
4309
4310 PR c/58943
4311 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
4312 effects, preevaluate rhs using SAVE_EXPR first.
4313
9a74f20c
BI
43142014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
4315
4316 PR c++/59631
4317 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
4318 statements with if-elseif statements.
4319
96066ce1
MP
43202014-01-06 Marek Polacek <polacek@redhat.com>
4321
4322 PR c/57773
4323 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
4324 defined bit-field types only in ISO C.
4325
23a5b65a
RS
43262014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
4327
4328 Update copyright years
4329
f9030485
RS
43302014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
4331
4332 * c-array-notation.c: Use the standard form for the copyright notice.
4333
41958c28
BI
43342013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
4335
4336 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
4337 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
4338 field in parser is not empty. If not-empty, call the function
4339 c_parser_finish_omp_declare_simd.
4340 (c_parser_cilk_clause_vectorlength): Modified function to be shared
4341 between SIMD-enabled functions and #pragma simd. Added new parameter.
4342 (c_parser_cilk_all_clauses): Modified the usage of the function
4343 c_parser_cilk_clause_vectorlength as mentioned above.
4344 (c_parser_cilk_simd_fn_vector_attrs): New function.
4345 (c_finish_cilk_simd_fn_tokens): Likewise.
4346 (is_cilkplus_vector_p): Likewise.
4347 (c_parser_omp_clause_name): Added checking for "vectorlength,"
4348 "nomask," and "mask" strings in clause name.
4349 (c_parser_omp_all_clauses): Added 3 new case statements:
4350 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
4351 PRAGMA_CILK_CLAUSE_NOMASK.
4352 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
4353 check for vector attribute and if so call the function
4354 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
4355 called the function c_finish_cilk_simd_fn_tokens.
4356 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
4357 parser field is non-empty. If so, parse them as you would parse
4358 the omp declare simd pragma.
4359 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
4360 Added a check when step is a parameter and flag it as error.
4361 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
4362 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
4363 pragma_omp_clause.
4364
cef0fd0e
TS
43652013-12-17 Thomas Schwinge <thomas@codesourcery.com>
4366
4367 * c-parser.c (c_parser_omp_parallel): Fix description.
4368
12893402
BI
43692013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
4370
4371 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
4372 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
4373 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
4374 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
4375
296674db
JM
43762013-12-04 Joseph Myers <joseph@codesourcery.com>
4377
4378 PR c/52023
4379 * c-parser.c (c_parser_alignas_specifier): Use
4380 c_sizeof_or_alignof_type instead of c_alignof.
4381 (c_parser_alignof_expression): Likewise, with min_alignof
4382 parameter depending on alignof spelling used.
4383
edd28054
MP
43842013-12-04 Marek Polacek <polacek@redhat.com>
4385
4386 PR c/54113
4387 * c-decl.c (start_function): Don't warn for missing prototype for
4388 inline functions.
4389
da0fc454
MP
43902013-12-03 Marek Polacek <polacek@redhat.com>
4391
4392 PR c/59351
4393 * c-decl.c (build_compound_literal): Allow compound literals with
4394 empty initial value.
4395
4c2ecab0
JM
43962013-12-02 Joseph Myers <joseph@codesourcery.com>
4397
4398 PR c/58235
4399 * c-typeck.c (build_modify_expr): Diagnose assignment to
4400 expression with array type.
4401
340baef7
JM
44022013-11-29 Joseph Myers <joseph@codesourcery.com>
4403
4404 PR c/42262
4405 * c-typeck.c (process_init_element): Do not treat a string as
4406 initializing a whole array when used with a designator for an
4407 individual element.
4408
6763b9f7
JM
44092013-11-29 Joseph Myers <joseph@codesourcery.com>
4410
4411 PR c/57574
4412 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
4413 an inline function following a static declaration.
4414
e7bd1de1
JJ
44152013-11-28 Jakub Jelinek <jakub@redhat.com>
4416
4417 PR c/59310
4418 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
4419 to p_name before calling c_parser_omp_teams instead of after.
4420 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
4421 argument. Remove unused p_name variable.
4422
0136f8f0
AH
44232013-11-27 Aldy Hernandez <aldyh@redhat.com>
4424 Jakub Jelinek <jakub@redhat.com>
4425
4426 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
4427 external_scope is NULL.
4428
241b71bb
TV
44292013-11-27 Tom de Vries <tom@codesourcery.com>
4430 Marc Glisse <marc.glisse@inria.fr>
4431
4432 PR c++/59032
4433 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
4434
2fb9a547
AM
44352013-11-22 Andrew MacLeod <amacleod@redhat.com>
4436
4437 * c-typeck.c: Add required include files from gimple.h.
4438
8400e75e
DM
44392013-11-22 David Malcolm <dmalcolm@redhat.com>
4440
4441 * c-decl.c (define_label, shadow_tag_warned)
4442 (check_bitfield_type_and_width, grokdeclarator, grokparms,
4443 store_parm_decls_newstyle, store_parm_decls_oldstyle)
4444 (declspecs_add_type): Remove use of in_system_header macro.
4445 * c-parser.c (c_parser_unary_expression): Likewise.
4446 * c-typeck.c (store_init_value, process_init_element)
4447 (c_start_case): Likewise.
4448
4449 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
4450 macro.
4451
4452 * c-parser.c (c_parser_set_source_position_from_token): Remove
4453 reference to in_system_header from comment.
4454
386b1f1f
RS
44552013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4456
4457 * c-decl.c (grokdeclarator): Update comment to refer to
4458 tree_to_[su]hwi rather than tree_low_cst.
4459
ae7e9ddd
RS
44602013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4461
4462 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
4463 tree_to_uhwi throughout.
4464
9439e9a1
RS
44652013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4466
4467 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
4468 throughout.
4469
9541ffee
RS
44702013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4471
4472 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
4473 throughout.
4474
c02065fc
AH
44752013-11-15 Aldy Hernandez <aldyh@redhat.com>
4476
4477 * c-parser.c (c_parser_cilk_simd): New.
4478 (c_parser_cilk_verify_simd): New.
4479 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
4480 (c_parser_omp_for_loop): Add case for NE_EXPR.
4481 Set c_break_label for CILK_SIMD.
4482 (c_parser_cilk_clause_vectorlength): New.
4483 (c_parser_cilk_clause_linear): New.
4484 (c_parser_cilk_clause_name): New.
4485 (c_parser_cilk_all_clauses): New.
4486 * c-typeck.c (build_unary_op): Pass location argument to
4487 readonly_error.
4488 (build_modify_expr): Same.
4489 (build_asm_expr): Same.
4490 (c_finish_bc_stmt): Error on break/continue in loops.
4491
18f429e2
AM
44922013-11-14 Andrew MacLeod <amacleod@redhat.com>
4493
4494 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
4495
d8a2d370
DN
44962013-11-14 Diego Novillo <dnovillo@google.com>
4497
4498 * c-decl.c: Include print-tree.h.
4499 Include stor-layout.h.
4500 Include varasm.h.
4501 Include attribs.h.
4502 Include stringpool.h.
4503 * c-lang.c: Include fold-const.h.
4504 * c-parser.c: Include stringpool.h.
4505 Include attribs.h.
4506 Include stor-layout.h.
4507 Include varasm.h.
4508 Include trans-mem.h.
4509 * c-typeck.c: Include stor-layout.h.
4510 Include trans-mem.h.
4511 Include varasm.h.
4512 Include stmt.h.
4513
38b7bc7f
JM
45142013-11-13 Joseph Myers <joseph@codesourcery.com>
4515
4516 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
4517 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
4518 __auto_type.
4519 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
4520 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
4521 RID_AUTO_TYPE.
4522 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
4523 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
4524 (c_parser_declarator, c_parser_direct_declarator_inner)
4525 (c_parser_parameter_declaration, c_parser_type_name): All callers
4526 changed.
4527 (c_parser_declaration_or_fndef): Handle declarations with type
4528 determined from the initializer.
4529
45b0be94
AM
45302013-11-12 Andrew MacLeod <amacleod@redhat.com>
4531
18f429e2 4532 * c-typeck.c: Include gimplify.h.
45b0be94 4533
582d9b50
JM
45342013-11-12 Joseph Myers <joseph@codesourcery.com>
4535
4536 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
4537 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
4538 comment.
4539 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
4540 or _Thread_local as appropriate in diagnostics.
4541 (build_null_declspecs): Initialize ret->thread_gnu_p.
4542 (declspecs_add_scspec): Handle either __thread or _Thread_local
4543 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
4544 pedantic. Do not disallow _Thread_local extern and _Thread_local
4545 static.
4546
267bac10
JM
45472013-11-07 Joseph Myers <joseph@codesourcery.com>
4548 Andrew MacLeod <amacleod@redhat.com>
4549
4550 * c-aux-info.c (gen_type): Handle atomic qualifier.
4551 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
4552 qualifiers when compating types.
4553 (shadow_tag_warned): Handle atomic_p in declspecs.
4554 (quals_from_declspecs): Likewise.
4555 (start_decl): Use c_type_promotes_to when promoting argument
4556 types.
4557 (grokdeclarator): Handle _Atomic.
4558 (get_parm_info): Diagnose any qualifier on "void" as only
4559 parameter.
4560 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
4561 comparing types. Use c_type_promotes_to when promoting argument
4562 types.
4563 (finish_function): Use c_type_promotes_to when promoting argument
4564 types.
4565 (build_null_declspecs): Handle atomic_p in declspecs.
4566 (declspecs_add_qual): Handle RID_ATOMIC.
4567 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
4568 (c_token_starts_declspecs): Handle RID_ATOMIC.
4569 (c_parser_declspecs): Handle atomic type specifiers and
4570 qualifiers.
4571 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
4572 from types of expressions with atomic type.
4573 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
4574 (c_parser_attribute_any_word): Handle RID_ATOMIC.
4575 (c_parser_initializer, c_parser_initelt, c_parser_initval)
4576 (c_parser_statement_after_labels, c_parser_switch_statement)
4577 (c_parser_for_statement, c_parser_expr_no_commas)
4578 (c_parser_conditional_expression, c_parser_binary_expression)
4579 (c_parser_cast_expression, c_parser_unary_expression)
4580 (c_parser_postfix_expression)
4581 (c_parser_postfix_expression_after_primary, c_parser_expression):
4582 Use convert_lvalue_to_rvalue.
4583 (c_parser_expression_conv, c_parser_expr_list): Document
4584 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
4585 (c_parser_objc_synchronized_statement): Use
4586 convert_lvalue_to_rvalue.
4587 (c_parser_objc_selector): Handle RID_ATOMIC.
4588 (c_parser_objc_receiver, c_parser_array_notation): Use
4589 convert_lvalue_to_rvalue.
4590 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
4591 _Atomic (type-name).
4592 (struct c_declspecs): Add atomic_p field.
4593 (convert_lvalue_to_rvalue): Declare.
4594 * c-typeck.c (c_type_promotes_to): Promote atomic types to
4595 corresponding atomic types.
4596 (qualify_type): Don't add _Atomic qualifiers from second argument.
4597 (comp_target_types): Do not allow _Atomic mismatches.
4598 (type_lists_compatible_p): Do not remove atomic qualifiers when
4599 comparing types.
4600 (really_atomic_lvalue, convert_lvalue_to_rvalue)
4601 (build_atomic_assign): New functions.
4602 (build_unary_op): Use build_atomic_assign for atomic increment and
4603 decrement.
4604 (build_conditional_expr): Do not treat _Atomic void as a qualified
4605 version of void.
4606 (build_modify_expr): Use build_atomic_assign for atomic LHS.
4607 (find_anonymous_field_with_type, convert_to_anonymous_field)
4608 (convert_for_assignment): Do not remove atomic qualifiers when
4609 comparing types.
4610 (digest_init): Do not accept initialization of arrays of atomic
4611 elements by string constants.
4612 (build_asm_expr): Use convert_lvalue_to_rvalue.
4613 (build_binary_op): Do not treat _Atomic void as a qualified
4614 version of void.
4615
0c249d4b
DD
46162013-11-06 DJ Delorie <dj@redhat.com>
4617
4618 * c-decl.c (locate_old_decl): If a previous conflicting decl is
4619 both explicit and builtin, print the location of the explicit one.
4620
6d7f7e0a
TB
46212013-11-05 Tobias Burnus <burnus@net-b.de>
4622
4623 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
4624 c_parser_omp_distribute, c_parser_omp_teams,
4625 c_parser_omp_target, c_parser_omp_declare): Handle
4626 -fopenmp-simd.
4627
b906f4ca
MP
46282013-11-03 Marek Polacek <polacek@redhat.com>
4629
4630 * c-decl.c (grokdeclarator): Add VLA instrumentation.
4631
ee1d5a02
JJ
46322013-11-01 Jakub Jelinek <jakub@redhat.com>
4633
4634 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
4635 check_dup_generic at the end, unless remove is true.
4636 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
4637 remove = true;.
4638 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
4639
5a9785fb
JJ
46402013-10-31 Jakub Jelinek <jakub@redhat.com>
4641
4642 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
4643 with decl that is not pointer nor array.
4644
939b37da
BI
46452013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
4646
4647 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
4648 a spawning function is found.
4649 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
4650 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
4651 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
4652 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
4653 case.
4654 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
4655 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
4656 expr.
4657 (c_finish_return): Added a check to reject _Cilk_spawn in return
4658 expression.
4659 (build_cilk_spawn): New function.
4660 (build_cilk_sync): Likewise.
4661 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
4662
d4af74d4
TB
46632013-10-27 Tobias Burnus <burnus@net-b.de>
4664
4665 PR other/33426
4666 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
4667 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
4668 (c_parser_statement_after_labels): Update calls.
4669
d73749df 46702013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
4671
4672 PR other/33426
4673 * c-parser.c (c_parser_pragma, c_parser_for_statement):
4674 Handle PRAGMA_IVDEP.
4675 (c_parser_statement_after_labels): Update call.
4676
f28aa681
MP
46772013-10-24 Marek Polacek <polacek@redhat.com>
4678
4679 * c-parser.c (c_parser_struct_declaration): Add a comment.
4680 (c_parser_declarator): Don't allow _Alignas here.
4681
0645c1a2
AM
46822013-10-17 Andrew MacLeod <amacleod@redhat.com>
4683
4684 * c-parser.c: Include omp-low.h.
4685 * c-typeck.c: Likewise.
4686
568a31f2
MP
46872013-10-17 Marek Polacek <polacek@redhat.com>
4688
4689 PR c/58267
4690 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
4691 Document syntax of the array-declarator.
4692 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
4693 are not permitted.
4694 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
4695 (c_parser_struct_declaration): Likewise.
4696 (c_parser_declarator): Likewise.
4697 (c_parser_direct_declarator_inner): Likewise.
4698 (c_parser_parameter_declaration): Likewise.
4699 (c_parser_type_name): Likewise.
4700
acf0174b
JJ
47012013-10-11 Jakub Jelinek <jakub@redhat.com>
4702
4703 * c-lang.h (current_omp_declare_target_attribute): New extern
4704 decl.
4705 * c-parser.c: Include c-lang.h.
4706 (struct c_parser): Change tokens to c_token *.
4707 Add tokens_buf field. Change tokens_avail type to unsigned int.
4708 (c_parser_consume_token): If parser->tokens isn't
4709 &parser->tokens_buf[0], increment parser->tokens.
4710 (c_parser_consume_pragma): Likewise.
4711 (enum pragma_context): Add pragma_struct and pragma_param.
4712 (c_parser_external_declaration): Adjust
4713 c_parser_declaration_or_fndef caller.
4714 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
4715 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
4716 Adjust recursive call.
4717 (c_parser_struct_or_union_specifier): Use pragma_struct instead
4718 of pragma_external.
4719 (c_parser_parameter_declaration): Use pragma_param instead of
4720 pragma_external.
4721 (c_parser_compound_statement_nostart, c_parser_label,
4722 c_parser_for_statement): Adjust
4723 c_parser_declaration_or_fndef callers.
4724 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
4725 it through to c_parser_conditional_expression.
4726 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
4727 pass it through to c_parser_binary_expression. Adjust recursive
4728 call.
4729 (c_parser_binary_expression): Remove prec argument, add
4730 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
4731 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
4732 binop matches it, use build2 instead of parser_build_binary_op.
4733 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
4734 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
4735 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
4736 Handle pragma_struct and pragma_param the same as pragma_external.
4737 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
4738 (c_parser_omp_variable_list): Parse array sections for
4739 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
4740 (c_parser_omp_clause_collapse): Fully fold collapse expression.
4741 (c_parser_omp_clause_reduction): Handle user defined reductions.
4742 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
4743 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
4744 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
4745 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
4746 c_parser_omp_clause_depend, c_parser_omp_clause_map,
4747 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
4748 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
4749 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
4750 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
4751 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
4752 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
4753 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
4754 (c_parser_omp_for_loop): Add CODE argument, pass it through
4755 to c_finish_omp_for. Change last argument to cclauses,
4756 and adjust uses to grab parallel clauses from the array of all
4757 the split clauses. Adjust c_parser_binary_expression,
4758 c_parser_declaration_or_fndef and c_finish_omp_for callers.
4759 (omp_split_clauses): New function.
4760 (c_parser_omp_simd): New function.
4761 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
4762 Allow the function to be called also when parsing combined constructs,
4763 and call c_parser_omp_simd when parsing for simd.
4764 (c_parser_omp_sections_scope): If section-sequence doesn't start with
4765 #pragma omp section, require exactly one structured-block instead of
4766 sequence of statements.
4767 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
4768 Allow the function to be called also when parsing combined constructs.
4769 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
4770 Allow the function to be called also when parsing combined
4771 constructs.
4772 (c_parser_omp_taskgroup, c_parser_omp_cancel,
4773 c_parser_omp_cancellation_point, c_parser_omp_distribute,
4774 c_parser_omp_teams, c_parser_omp_target_data,
4775 c_parser_omp_target_update, c_parser_omp_target,
4776 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
4777 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
4778 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
4779 (c_parser_omp_construct): Add p_name and mask vars. Handle
4780 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
4781 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
4782 and c_parser_omp_sections callers.
4783 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
4784 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
4785 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
4786 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
4787 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
4788 OMP_CLAUSE_DEPEND.
4789 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
4790 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
4791 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
4792 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
4793 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
4794 * c-typeck.c: Include tree-inline.h.
4795 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
4796 handle_omp_array_sections_1, handle_omp_array_sections,
4797 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
4798 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
4799 user defined reductions.
4800 (c_tree_equal): New function.
4801 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
4802 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
4803 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
4804 c_check_omp_declare_reduction_r): New prototypes.
4805 * c-decl.c (current_omp_declare_target_attribute): New variable.
4806 (c_decl_attributes): New function.
4807 (start_decl, start_function): Use it instead of decl_attributes.
4808 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
4809 c_omp_reduction_decl, c_omp_reduction_lookup,
4810 c_check_omp_declare_reduction_r): New functions.
4811
0a6c2227
TT
48122013-09-25 Tom Tromey <tromey@redhat.com>
4813
4814 * Make-lang.in (c/gccspec.o): Remove.
4815 (CFLAGS-c/gccspec.o): New variable.
4816 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
4817 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
4818 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
4819
f3bc55f0
TT
48202013-09-25 Tom Tromey <tromey@redhat.com>
4821
4822 * Make-lang.in (c/gccspec.o): Don't use subshell.
4823
a24d975c
MP
48242013-09-18 Marek Polacek <polacek@redhat.com>
4825
4826 PR sanitize/58443
4827 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
4828 Remove unnecessary check.
4829
ce6923c5
MP
48302013-09-18 Marek Polacek <polacek@redhat.com>
4831
4832 PR sanitizer/58411
4833 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
4834 no_sanitize_undefined attribute.
4835
a1e51df9
KT
48362013-09-13 Kai Tietz <ktietz@redhat.com>
4837
4838 PR target/57848
4839 * c-decl.c (c_builtin_function_ext_scope): Remove
4840 wrong assumption that it is never called on prexisting
4841 symbol.
4842
0af94e6f
JR
48432013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
4844
4845 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
4846
20059c8b
GDR
48472013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
4848
4849 * c-objc-common.c (c_tree_printer): Tidy.
4850
de5a5fa1
MP
48512013-08-30 Marek Polacek <polacek@redhat.com>
4852
4853 * c-typeck.c (build_binary_op): Add division by zero and shift
4854 instrumentation.
4855
2531a1d9 48562013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 4857 Joseph Myers <joseph@codesourcery.com>
2531a1d9 4858
6e2bcc98 4859 PR c/35649
2531a1d9
JR
4860 * c-typeck.c (c_common_type): Prefer double_type_node over
4861 other REAL_TYPE types with the same precision.
4862 (convert_arguments): Likewise.
4863
025311c4
GDR
48642013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
4865
4866 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
4867 (c_initialize_diagnostics): Call a destructor for the early printer.
4868
da6ca2b5
GDR
48692013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
4870
4871 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
4872 printer initialization.
4873
318cda85 48742013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 4875
318cda85
BI
4876 PR c/57490
4877 * c-array-notation.c (fix_conditional_array_notations_1): Added a
4878 check for truth values.
4879 (expand_array_notation_exprs): Added truth values case. Removed an
4880 unwanted else. Added for-loop to walk through subtrees in default
4881 case.
4882
b066401f
GDR
48832013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
4884
4885 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
4886
fb48aadc
JM
48872013-07-23 Joseph Myers <joseph@codesourcery.com>
4888
4889 * c-parser.c (struct c_generic_association): Fix typo.
4890
433cc7b0
TT
48912013-07-23 Tom Tromey <tromey@redhat.com>
4892 Joseph Myers <joseph@codesourcery.com>
4893
4894 * c-parser.c (struct c_generic_association): New.
4895 (c_generic_association_d): New typedef.
4896 (c_parser_generic_selection): New function.
4897 (c_parser_postfix_expression): Handle RID_GENERIC.
4898
26d40c3d
JM
48992013-07-13 Jason Merrill <jason@redhat.com>
4900
4901 PR c++/57793
4902 * c-decl.c (finish_struct): Check for too-large class.
4903
ecdbd01a 49042013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
4905
4906 PR c/57821
4907 * c-typeck.c (set_init_index): When folding, check for index overflow.
4908
1141ed3f
BI
49092013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
4910
4911 * c-parser.c (c_parser_array_notation): Removed rejection of array
4912 notations in an array of function pointers.
4913
713b46fa
BI
49142013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
4915
4916 * c-array-notation.c (make_triplet_val_inv): New function.
4917 (create_cmp_incr): Likewise.
4918 (create_array_refs): Likewise.
4919 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
4920 Also modularized common parts between functions and called the function.
4921 (build_array_notation_expr): Likewise.
4922 (fix_conditional_array_notations_1): Likewise.
4923 (fix_array_notation_expr): Likewise.
4924 (fix_array_notation_call_expr): Likewise.
4925
92f20202
MP
49262013-06-18 Marek Polacek <polacek@redhat.com>
4927
4928 PR c/57630
4929 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
4930
73a23b06
BI
49312013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
4932
4933 * c-array-notation.c (build_array_notation_expr): Reject array notation
4934 mismatch between LHS and RHS even inside a call_expr. Also, removed
4935 a couple while statements that were dead code.
4936
00b8517d
BI
49372013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
4938
4939 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
4940 excessive precision expressions in function parameters. Also removed
4941 couple unwanted while statements.
4942
1509bdda
BI
49432013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
4944
4945 * c-array-notation.c (expand_array_notation_exprs): Added
4946 ARRAY_NOTATION_REF case.
4947
d60f1706
BI
49482013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
4949
4950 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
4951 function to c-family/array-notation-common.c.
4952 (is_cilkplus_reduce_builtin): Likewise.
4953 (find_rank): Likewise.
4954 (extract_array_notation_exprs): Likewise.
4955 (replace_array_notations): Likewise.
4956 (find_inv_trees): Likewise.
4957 (replace_inv_trees): Likewise.
4958 (contains_array_notation_expr): Likewise.
4959 (find_correct_array_notation_type): Likewise.
4960 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
4961 (struct inv_list): Moved this to c-family/array-notation-common.c.
4962 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
4963
6d6efbb3
BI
49642013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
4965
4966 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
4967 reduction functions outside the for-loop. Added a check if the fundecl
4968 is non-NULL. Finally, removed an unwanted if-statement, and made the
4969 body unconditional.
4970
25c22937
BI
49712013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
4972
4973 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
4974 condition of the if-statement matches the rank of else-block and then-
4975 block when array notations are used.
4976 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
4977 expression after the entire function body is parsed.
4978 (c_parser_expr_no_commas): Delayed creating array notation expressions
4979 to the end of function parsing.
4980 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
4981 whole if-statement instead of just the condition.
4982 (expand_array_notation_exprs): Added MODIFY_EXPR case.
4983
edd25645
BI
49842013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
4985
4986 PR c/57474
4987 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
4988 array to NULL_TREE if they are unused. Also added a check for the
4989 field to be NULL before its fields are used in future.
4990
065ce7f1
RO
49912013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4992
4993 PR bootstrap/57450
4994 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
4995 (build_array_notation_expr): Likewise.
4996
36536d79
BI
49972013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
4998
4999 * c-typeck.c (build_array_ref): Added a check to see if array's
5000 index is greater than one. If true, then emit an error.
5001 (build_function_call_vec): Exclude error reporting and checking
5002 for builtin array-notation functions.
5003 (convert_arguments): Likewise.
5004 (c_finish_return): Added a check for array notations as a return
5005 expression. If true, then emit an error.
5006 (c_finish_loop): Added a check for array notations in a loop
5007 condition. If true then emit an error.
5008 (lvalue_p): Added a ARRAY_NOTATION_REF case.
5009 (build_binary_op): Added a check for array notation expr inside
5010 op1 and op0. If present, we call another function to find correct
5011 type.
5012 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
5013 * c-parser.c (c_parser_compound_statement): Check if array
5014 notation code is used in tree, if so, then transform them into
5015 appropriate C code.
5016 (c_parser_expr_no_commas): Check if array notation is used in LHS
5017 or RHS, if so, then build array notation expression instead of
5018 regular modify.
5019 (c_parser_postfix_expression_after_primary): Added a check for
5020 colon(s) after square braces, if so then handle it like an array
5021 notation. Also, break up array notations in unary op if found.
5022 (c_parser_direct_declarator_inner): Added a check for array
5023 notation.
5024 (c_parser_compound_statement): Added a check for array notation in
5025 a stmt. If one is present, then expand array notation expr.
5026 (c_parser_if_statement): Likewise.
5027 (c_parser_switch_statement): Added a check for array notations in
5028 a switch statement's condition. If true, then output an error.
5029 (c_parser_while_statement): Similarly, but for a while.
5030 (c_parser_do_statement): Similarly, but for a do-while.
5031 (c_parser_for_statement): Similarly, but for a for-loop.
5032 (c_parser_unary_expression): Check if array notation is used in a
5033 pre-increment or pre-decrement expression. If true, then expand
5034 them.
5035 (c_parser_array_notation): New function.
5036 * c-array-notation.c: New file.
5037 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
5038
cd192ccc
MS
50392013-05-23 Mike Stump <mikestump@comcast.net>
5040
5041 * c-typeck.c (convert_for_assignment): Handle references to memory
5042 spaces better.
5043
427b248d
JM
50442013-05-16 Jason Merrill <jason@redhat.com>
5045
5046 * Make-lang.in (cc1$(exeext)): Use link mutex.
5047
44d90fe1
PC
50482013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
5049
5050 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
5051 to simply use OPT_Wpointer_arith.
5052 (build_unary_op): Likewise.
5053
4e7d7b3d
JJ
50542013-04-03 Jakub Jelinek <jakub@redhat.com>
5055
5056 PR c/19449
5057 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
5058 argument. If set, or it temporarily for parsing of the first
5059 argument into force_folding_builtin_constant_p.
5060 (c_parser_postfix_expression): Adjust callers.
5061
839b422f
RB
50622013-03-21 Richard Biener <rguenther@suse.de>
5063
5064 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
5065 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
5066
2ee028f1
MP
50672013-02-12 Marek Polacek <polacek@redhat.com>
5068
5069 PR c/44938
5070 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
5071 origtypes to NULL.
5072
8824edff
JJ
50732013-01-24 Jakub Jelinek <jakub@redhat.com>
5074
5075 PR c/56078
5076 * c-typeck.c (set_nonincremental_init_from_string): If
5077 constructor_max_index is NULL, treat it as if tree_int_cst_lt
5078 returned false.
5079 (process_init_element): Likewise.
5080
eadd3d0d
JJ
50812012-12-20 Jakub Jelinek <jakub@redhat.com>
5082
5083 PR c++/55619
5084 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
5085 argument, don't call default_function_array_conversion
5086 nor c_fully_fold here.
5087 (c_parser_asm_statement): Adjust callers.
5088 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
5089 and outputs here, and call default_function_array_conversion
5090 on inputs that don't need to be addressable.
5091
f8a93a2e
JJ
50922012-12-18 Jakub Jelinek <jakub@redhat.com>
5093
5094 PR c/39464
5095 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
5096 warning require that both c_common_unsigned_type as well as
5097 c_common_signed_type is the same for both mvl and mvr types.
5098
9771b263
DN
50992012-11-16 Diego Novillo <dnovillo@google.com>
5100
5101 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
5102
5103 * c-common.c: Use new vec API in vec.h.
5104 * c-common.h: Likewise.
5105 * c-gimplify.c: Likewise.
5106 * c-pragma.c: Likewise.
5107 * c-pretty-print.c: Likewise.
5108 * c-pretty-print.h: Likewise.
5109 * c-semantics.c: Likewise.
5110 * c-decl.c: Likewise.
5111 * c-parser.c: Likewise.
5112 * c-tree.h: Likewise.
5113 * c-typeck.c: Likewise.
5114
880661a4
JW
51152012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
5116
5117 PR c++/54930
5118 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
5119
077d1abe
MLI
51202012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5121
5122 PR c/53066
5123 * c-decl.c (warn_if_shadowing): Do not warn if a variable
5124 shadows a function, unless the variable is a function or a
5125 pointer-to-function.
5126
3a785c97
JJ
51272012-10-12 Jakub Jelinek <jakub@redhat.com>
5128
5129 PR c/54381
5130 * c-parser.c (struct c_tree_loc_pair): Removed.
5131 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
5132 add location_t * and tree * arguments, fill in array of 3
5133 sizeof_arg trees and corresponding locs.
5134 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
5135 c_parser_expr_list callers.
5136 (c_parser_postfix_expression_after_primary): Likewise. Pass
5137 array of 3 sizeof_arg trees and locs (corresponding to first
5138 3 arguments) to sizeof_pointer_memaccess_warning.
5139
703c8606
LC
51402012-10-09 Lawrence Crowl <crowl@google.com>
5141
5142 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
5143 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
5144 hash table.
5145
5d9de0d0
PC
51462012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
5147
5148 PR c++/54194
5149 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
5150 call.
5151
a212e43f
MG
51522012-10-09 Marc Glisse <marc.glisse@inria.fr>
5153
5154 PR c++/54427
5155 * c-typeck.c: Include c-common.h.
5156 (enum stv_conv): Moved to c-common.h.
5157 (scalar_to_vector): Moved to c-common.c.
5158 (build_binary_op): Adapt to scalar_to_vector's new prototype.
5159 * Make-lang.in: c-typeck.c depends on c-common.h.
5160
3b78de56
AC
51612012-10-04 Arnaud Charlet <charlet@adacore.com>
5162
5163 * c-decl.c (c_write_global_declarations): Fix handling of
5164 -fdump-ada-spec*.
5165
78c60e3d
SS
51662012-09-30 Sharad Singhai <singhai@google.com>
5167
5168 * c-decl.c (c_write_global_declarations): Use a different method
5169 to determine if the dump has ben initialized.
5170
9f33203d
JM
51712012-09-14 Joseph Myers <joseph@codesourcery.com>
5172
5173 PR c/54552
5174 * c-typeck.c (c_cast_expr): When casting to a type requiring
5175 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
5176 c_fully_fold first.
5177
a27d595d
JM
51782012-09-14 Joseph Myers <joseph@codesourcery.com>
5179
5180 PR c/54103
5181 * c-typeck.c (build_unary_op): Pass original argument of
5182 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
5183 any C_MAYBE_CONST_EXPR, if it has integer operands.
5184 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
5185 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
5186 to c_objc_common_truthvalue_conversion, then remove any
5187 C_MAYBE_CONST_EXPR, if they have integer operands. Use
5188 c_objc_common_truthvalue_conversion not
5189 c_common_truthvalue_conversion.
5190 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
5191 call note_integer_operands for arguments with integer operands
5192 that are not integer constants.
5193
9feb29df
JJ
51942012-09-13 Jakub Jelinek <jakub@redhat.com>
5195
5196 PR c/54559
5197 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
5198 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
5199
d409320c
JJ
52002012-08-31 Jakub Jelinek <jakub@redhat.com>
5201
5202 PR c/54428
5203 * c-convert.c (convert): Don't call fold_convert_loc if
5204 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
5205 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
5206 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
5207
6265d07c
JJ
52082012-08-24 Jakub Jelinek <jakub@redhat.com>
5209
5210 PR c/54355
5211 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
5212 for nested and empty_ok arguments in the call to
5213 c_parser_declaration_or_fndef.
5214
1a4049e7
JJ
52152012-08-17 Jakub Jelinek <jakub@redhat.com>
5216
5217 * c-tree.h (c_last_sizeof_arg): Declare.
5218 * c-parser.c (struct c_tree_loc_pair): New type.
5219 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
5220 non-NULL.
5221 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
5222 (c_parser_postfix_expression_after_primary): Likewise. Call
5223 sizeof_pointer_memaccess_warning if needed.
5224 (sizeof_ptr_memacc_comptypes): New function.
5225 * c-typeck.c (c_last_sizeof_arg): New global variable.
5226 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
5227
0229aee9
UB
52282012-07-24 Uros Bizjak <ubizjak@gmail.com>
5229
5230 * c-lang.h (lang_decl): Add variable_size GTY option.
5231
7ee2468b
SB
52322012-07-16 Steven Bosscher <steven@gcc.gnu.org>
5233
5234 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
5235 * Make-lang.in: Fix dependencies.
5236
d4a10d0a
SB
52372012-06-29 Steven Bosscher <steven@gcc.gnu.org>
5238
5239 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
5240 and add language Makefile hooks.
5241 * config-lang.in: New file.
5242 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
5243 add the required "normal" config-lang.in rules.
5244 * c-lang.h: Moved from gcc/ to here.
5245 * c-tree.h: Likewise.
5246 * c-objc-common.c: Likewise.
5247 * c-objc-common.h: Likewise.
5248 * c-typeck.c: Likewise.
5249 * c-convert.c: Likewise.
5250 * c-lang.c: Likewise.
5251 * c-aux-info.c: Likewise.
5252 * c-errors.c: Likewise.
5253 * gccspec.c: Likewise.
5254 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
5255 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
5256\f
cbe34bb5 5257Copyright (C) 2012-2017 Free Software Foundation, Inc.
d4a10d0a
SB
5258
5259Copying and distribution of this file, with or without modification,
5260are permitted in any medium without royalty provided the copyright
5261notice and this notice are preserved.