]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
re PR target/82641 (Unable to enable crc32 for a certain function with target attribu...
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
c79144f8
DM
12017-12-06 David Malcolm <dmalcolm@redhat.com>
2
3 PR c/83236
4 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
5 reserved for use by the implementation.
6
613bc14f
DM
72017-12-06 David Malcolm <dmalcolm@redhat.com>
8
9 * c-decl.c: Include "c-family/c-spellcheck.h".
10
05abad4c
ML
112017-12-05 Martin Liska <mliska@suse.cz>
12 Jakub Jelinek <jakub@redhat.com>
13
14 * c-typeck.c (pointer_diff): Add new argument and instrument
15 pointer subtraction.
16 (build_binary_op): Similar for pointer comparison.
17
cc6534d4
JJ
182017-12-01 Jakub Jelinek <jakub@redhat.com>
19
65791f42
JJ
20 PR c/79153
21 * c-parser.c: Include tree-iterator.h.
22 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
23 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
24 on it.
25
cc6534d4
JJ
26 PR c/83222
27 * c-tree.h (decl_constant_value_1): Declare.
28 * c-typeck.c (decl_constant_value_1): New function.
29 (decl_constant_value): Use it.
30 * c-fold.c (c_fully_fold_internal): If in_init, use
31 decl_constant_value_1 instead of decl_constant_value.
32
5de73c05
JJ
332017-11-30 Jakub Jelinek <jakub@redhat.com>
34
35 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
36
058f0b9e
JJ
372017-11-28 Jakub Jelinek <jakub@redhat.com>
38
39 PR sanitizer/81275
40 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
41 c_switch_covers_all_cases_p returns true.
42
5e9d6aa4
JK
432017-11-28 Julia Koval <julia.koval@intel.com>
44 Sebastian Peryt <sebastian.peryt@intel.com>
45
46 * Make-lang.in (c/c-array-notation.o): Remove.
47 * c-array-notation.c: Delete.
48 * c-decl.c: Remove cilkplus condition.
49 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
50 c_parser_cilk_verify_simd, c_parser_array_notation,
51 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
52 c_parser_cilk_simd_fn_vector_attrs,
53 c_finish_cilk_simd_fn_tokens): Delete.
54 (c_parser_declaration_or_fndef): Remove cilkplus condition.
55 (c_parser_direct_declarator_inner): Ditto.
56 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
57 (c_parser_attributes, c_parser_compound_statement,
58 c_parser_statement_after_labels, c_parser_if_statement,
59 c_parser_switch_statement, c_parser_while_statement,
60 c_parser_do_statement, c_parser_for_statement,
61 c_parser_unary_expression, c_parser_postfix_expression,
62 c_parser_postfix_expression_after_primary,
63 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
64 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
65 support.
66 * c-typeck.c (build_array_ref, build_function_call_vec,
67 convert_arguments,
68 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
69 c_finish_loop, build_binary_op): Remove cilkplus support.
70
9e851845
JJ
712017-11-28 Jakub Jelinek <jakub@redhat.com>
72
73 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
74 of build3.
75
8c7dbea9
BK
762017-11-14 Boris Kolpackov <boris@codesynthesis.com>
77
78 * Make-lang.in (c.install-plugin): Install backend import library.
79
41521dee
JJ
802017-11-23 Jakub Jelinek <jakub@redhat.com>
81
82 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
83 pragma_stmt context.
84
ac9effed
EB
852017-11-23 Mike Stump <mikestump@comcast.net>
86 Eric Botcazou <ebotcazou@adacore.com>
87
88 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
89 ANNOTATE_EXPR.
90 (c_parser_do_statement): Likewise.
91 (c_parser_for_statement): Likewise.
92
ce95abc4
DM
932017-11-22 David Malcolm <dmalcolm@redhat.com>
94
95 PR c++/62170
96 * c-objc-common.c (c_tree_printer): Convert penultimate param from
97 bool to bool *. Within '%T' handling, if showing an "aka", use
98 "quoted" param to add appropriate quoting.
99
974aedcc
MP
1002017-11-22 Marek Polacek <polacek@redhat.com>
101
102 PR c++/60336
103 PR middle-end/67239
104 PR target/68355
105 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
106
d4300cc6
DM
1072017-11-21 David Malcolm <dmalcolm@redhat.com>
108
109 PR c/83056
110 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
111 earlier failed lookups.
112
1af4ebf5
MG
1132017-11-21 Marc Glisse <marc.glisse@inria.fr>
114
115 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
116 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
117
26edace6
DM
1182017-11-20 David Malcolm <dmalcolm@redhat.com>
119
120 PR c/81404
121 * c-decl.c: Include "c-family/known-headers.h".
122 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
123 to known-headers.cc.
124 (class suggest_missing_header): Move to known-header.h.
125 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
126 than get_c_name_hint.
127
b1212255
DM
1282017-11-20 David Malcolm <dmalcolm@redhat.com>
129
130 * c-decl.c (get_c_name_hint): New function.
131 (class suggest_missing_header): New class.
132 (lookup_name_fuzzy): Call get_c_name_hint and use it to
133 suggest missing headers to the user.
134
6c7a259b
DM
1352017-11-20 David Malcolm <dmalcolm@redhat.com>
136
137 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
138 Include "c-family/name-hint.h"
139 (implicit_decl_warning): Convert "hint" from
140 const char * to name_hint. Pass location to
141 lookup_name_fuzzy. Suppress any deferred diagnostic if the
142 warning was not printed.
143 (undeclared_variable): Likewise for "guessed_id".
144 (lookup_name_fuzzy): Convert return type from const char *
145 to name_hint. Add location_t param.
146 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
147 Include "c-family/name-hint.h"
148 (c_parser_declaration_or_fndef): Convert "hint" from
149 const char * to name_hint. Pass location to lookup_name_fuzzy.
150 (c_parser_parameter_declaration): Likewise.
151
f9c59f7e
JJ
1522017-11-19 Jakub Jelinek <jakub@redhat.com>
153
154 PR c/66618
155 PR c/69960
156 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
157 where needed.
158 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
159 handle_omp_array_sections): Likewise.
160 (digest_init): Don't call decl_constant_value_for_optimization.
161 * c-tree.h (decl_constant_value_for_optimization): Removed.
162 * c-fold.c (c_fold_array_ref): New function.
163 (c_fully_fold_internal): Add LVAL argument, propagate it through
164 recursive calls. For VAR_P call decl_constant_value and
165 unshare if not LVAL and either optimizing or IN_INIT. Remove
166 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
167 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
168 (c_fully_fold): Add LVAL argument, pass it through to
169 c_fully_fold_internal.
170 (decl_constant_value_for_optimization): Removed.
171
3ca0dc60
JM
1722017-11-15 Joseph Myers <joseph@codesourcery.com>
173
174 PR c/81156
175 * c-parser.c (check_tgmath_function): New function.
176 (enum tgmath_parm_kind): New enum.
177 (c_parser_postfix_expression): Handle __builtin_tgmath.
178
64a5912c
DM
1792017-10-31 David Malcolm <dmalcolm@redhat.com>
180
181 * c-decl.c (implicit_decl_warning): Update for renaming of
182 pedwarn_at_rich_loc and warning_at_rich_loc.
183 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
184 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
185 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
186 (c_parser_struct_or_union_specifier): Likewise for renaming of
187 pedwarn_at_rich_loc.
188 (c_parser_parameter_declaration): Likewise for renaming of
189 error_at_rich_loc.
190 * c-typeck.c (build_component_ref): Likewise.
191 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
192 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
193 (set_init_label): Likewise for renaming of error_at_rich_loc.
194
c1136864
RB
1952017-10-30 Richard Biener <rguenther@suse.de>
196
197 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
198 stmts.
199
ee5fd23a
MM
2002017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
201
202 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
203 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
204
1a59ccf2
DM
2052017-10-25 David Malcolm <dmalcolm@redhat.com>
206
207 PR c/7356
208 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
209 semicolons.
210
bc1a75dd
JJ
2112017-10-25 Jakub Jelinek <jakub@redhat.com>
212
213 PR libstdc++/81706
214 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
215 newdecl to corresponding __builtin_ if any.
216
ff1ff960
PC
2172017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
218
219 PR c++/82466
220 * c-decl.c (diagnose_mismatched_decls): Use
221 OPT_Wbuiltin_declaration_mismatch.
222
62e1c678
DM
2232017-10-12 David Malcolm <dmalcolm@redhat.com>
224
225 * c-parser.c (c_parser_require): Add "type_is_unique" param and
226 use it to guard calls to maybe_suggest_missing_token_insertion.
227 (c_parser_parms_list_declarator): Override default value of new
228 "type_is_unique" param to c_parser_require.
229 (c_parser_asm_statement): Likewise.
230 * c-parser.h (c_parser_require): Add "type_is_unique" param,
231 defaulting to true.
232
a92f6726
NS
2332017-10-11 Nathan Sidwell <nathan@acm.org>
234
235 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
236
8e6cdc90
RS
2372017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
238
239 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
240 operating on trees as wide_ints.
241 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
242 (c_tree_equal): Likewise.
243
8139a48e
DM
2442017-10-04 David Malcolm <dmalcolm@redhat.com>
245
246 * c-decl.c (push_parm_decl): Store c_parm's location into the
247 PARAM_DECL.
248 (build_c_parm): Add "loc" param and store it within the c_parm.
249 * c-parser.c (struct c_parser): Add "last_token_location" field.
250 (c_parser_consume_token): Store location of the token into the
251 new field.
252 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
253 when handling a FUNCTION_DECL, if it doesn't already have them.
254 (c_parser_parameter_declaration): Generate a location for the
255 parameter, and pass it to the call to build_c_parm.
256 * c-tree.h (struct c_parm): Add field "loc".
257 (build_c_parm): Add location_t param.
258 * c-typeck.c (get_fndecl_argument_location): New function.
259 (inform_for_arg): New function.
260 (convert_for_assignment): Use inform_for_arg when dealing with
261 ic_argpass.
262
2a389958
JJ
2632017-09-29 Jakub Jelinek <jakub@redhat.com>
264
7d386d45
JJ
265 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
266 width is non-NULL.
267 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
268 don't SET_DECL_C_BIT_FIELD here.
269
2a389958
JJ
270 PR c/82340
271 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
272 instead of trying to set just TREE_READONLY manually.
273
ebc6a85e
TV
2742017-09-16 Tom de Vries <tom@codesourcery.com>
275
276 PR c/81875
277 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
278 cond itself.
279
bb75facd
JM
2802017-09-15 Joseph Myers <joseph@codesourcery.com>
281
282 PR c/82071
283 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
284 for C11.
285 (build_conditional_expr): For C11, generate result with excess
286 precision when one argument is an integer and the other is of a
287 type using excess precision.
288
1d933576
BE
2892017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
290
291 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
292
267bbb6f
MP
2932017-09-13 Marek Polacek <polacek@redhat.com>
294
295 PR c/82167
296 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
297 than expr.original_type.
298
6836632e
NS
2992017-09-12 Nathan Sidwell <nathan@acm.org>
300
301 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
302 resort_sorted_fields): Moved from c-family/c-common.c.
303 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
304
e035be33
JM
3052017-09-01 Joseph Myers <joseph@codesourcery.com>
306
307 PR c/82071
308 * c-typeck.c (build_atomic_assign): Handle argument with excess
309 precision. Ensure any EXCESS_PRECISION_EXPR is present in
310 argument passed to build_binary_op and convert_for_assignment but
311 not for call to c_fully_fold.
312 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
313 Ensure build_binary_op is called with argument with original
314 semantic type. Avoid calling c_fully_fold with an
315 EXCESS_PRECISION_EXPR from build_binary_op.
316
d2e05fcb
JJ
3172017-09-01 Jakub Jelinek <jakub@redhat.com>
318
319 PR c/81887
320 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
321
b397965c
RS
3222017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
323 Alan Hayward <alan.hayward@arm.com>
324 David Sherwood <david.sherwood@arm.com>
325
326 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
327 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
328 m1 and m2 to the signed equivalent of a fixed-point
329 SCALAR_TYPE_MODE.
330
14e18d71
DM
3312017-08-24 David Malcolm <dmalcolm@redhat.com>
332
333 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
334 than CAN_HAVE_LOCATION_P when determining whether to use the
335 location_t value within "value".
336
7f204c0f
DM
3372017-08-21 David Malcolm <dmalcolm@redhat.com>
338
339 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
340 rather than peeking the location of the first token.
341 * c-tree.h (c_expr::get_location): New method.
342
2f687306
DM
3432017-08-21 David Malcolm <dmalcolm@redhat.com>
344
345 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
346 to check_function_arguments.
347
3e7b80d7
MP
3482017-08-18 Marek Polacek <polacek@redhat.com>
349
350 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
351 commentary.
352
00aa1fa2
L
3532017-08-18 H.J. Lu <hongjiu.lu@intel.com>
354
355 PR c/53037
356 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
357 (check_bitfield_type_and_width): Don't allow bit-field with
358 warn_if_not_aligned type.
359
da67acb9
MS
3602017-08-14 Martin Sebor <msebor@redhat.com>
361
362 PR c/81117
363 * c-objc-common.c (c_objc_common_init): Handle 'G'.
364
bb85aa74
MP
3652017-08-11 Marek Polacek <polacek@redhat.com>
366
367 PR c/81795
368 * c-decl.c (pushtag): Only print inform if the warning was printed.
369 (grokdeclarator): Likewise.
370
32129a17
DM
3712017-08-10 David Malcolm <dmalcolm@redhat.com>
372
373 * c-parser.c (c_parser_error): Rename to...
374 (c_parser_error_richloc): ...this, making static, and adding
375 "richloc" parameter, passing it to the c_parse_error call,
376 rather than calling c_parser_set_source_position_from_token.
377 (c_parser_error): Reintroduce, reimplementing in terms of the
378 above, converting return type from void to bool.
379 (class token_pair): New class.
380 (struct matching_paren_traits): New struct.
381 (matching_parens): New typedef.
382 (struct matching_brace_traits): New struct.
383 (matching_braces): New typedef.
384 (get_matching_symbol): New function.
385 (c_parser_require): Add param MATCHING_LOCATION, using it to
386 highlight matching "opening" tokens for missing "closing" tokens.
387 (c_parser_skip_until_found): Likewise.
388 (c_parser_static_assert_declaration_no_semi): Convert explicit
389 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
390 class matching_parens, so that the pertinent open parenthesis is
391 highlighted when there are problems locating the close
392 parenthesis.
393 (c_parser_struct_or_union_specifier): Likewise.
394 (c_parser_typeof_specifier): Likewise.
395 (c_parser_alignas_specifier): Likewise.
396 (c_parser_simple_asm_expr): Likewise.
397 (c_parser_braced_init): Likewise, for matching_braces.
398 (c_parser_paren_condition): Likewise, for matching_parens.
399 (c_parser_switch_statement): Likewise.
400 (c_parser_for_statement): Likewise.
401 (c_parser_asm_statement): Likewise.
402 (c_parser_asm_operands): Likewise.
403 (c_parser_cast_expression): Likewise.
404 (c_parser_sizeof_expression): Likewise.
405 (c_parser_alignof_expression): Likewise.
406 (c_parser_generic_selection): Likewise.
407 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
408 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
409 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
410 In case CPP_OPEN_PAREN, pass loc_open_paren to the
411 c_parser_skip_until_found call.
412 (c_parser_objc_class_definition): Use class matching_parens as
413 above.
414 (c_parser_objc_method_decl): Likewise.
415 (c_parser_objc_try_catch_finally_statement): Likewise.
416 (c_parser_objc_synchronized_statement): Likewise.
417 (c_parser_objc_at_property_declaration): Likewise.
418 (c_parser_oacc_wait_list): Likewise.
419 (c_parser_omp_var_list_parens): Likewise.
420 (c_parser_omp_clause_collapse): Likewise.
421 (c_parser_omp_clause_default): Likewise.
422 (c_parser_omp_clause_if): Likewise.
423 (c_parser_omp_clause_num_threads): Likewise.
424 (c_parser_omp_clause_num_tasks): Likewise.
425 (c_parser_omp_clause_grainsize): Likewise.
426 (c_parser_omp_clause_priority): Likewise.
427 (c_parser_omp_clause_hint): Likewise.
428 (c_parser_omp_clause_defaultmap): Likewise.
429 (c_parser_oacc_single_int_clause): Likewise.
430 (c_parser_omp_clause_ordered): Likewise.
431 (c_parser_omp_clause_reduction): Likewise.
432 (c_parser_omp_clause_schedule): Likewise.
433 (c_parser_omp_clause_num_teams): Likewise.
434 (c_parser_omp_clause_thread_limit): Likewise.
435 (c_parser_omp_clause_aligned): Likewise.
436 (c_parser_omp_clause_linear): Likewise.
437 (c_parser_omp_clause_safelen): Likewise.
438 (c_parser_omp_clause_simdlen): Likewise.
439 (c_parser_omp_clause_depend): Likewise.
440 (c_parser_omp_clause_map): Likewise.
441 (c_parser_omp_clause_device): Likewise.
442 (c_parser_omp_clause_dist_schedule): Likewise.
443 (c_parser_omp_clause_proc_bind): Likewise.
444 (c_parser_omp_clause_uniform): Likewise.
445 (c_parser_omp_for_loop): Likewise.
446 (c_parser_cilk_clause_vectorlength): Likewise.
447 (c_parser_cilk_clause_linear): Likewise.
448 (c_parser_transaction_expression): Likewise.
449 * c-parser.h (c_parser_require): Add param matching_location with
450 default UNKNOWN_LOCATION.
451 (c_parser_error): Convert return type from void to bool.
452 (c_parser_skip_until_found): Add param matching_location with
453 default UNKNOWN_LOCATION.
454
30af3a2b
MP
4552017-08-09 Marek Polacek <polacek@redhat.com>
456
457 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
458 * c-tree.h (build_external_ref): Update declaration.
459 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
460 (build_external_ref): Change the type of a parameter to bool.
461 (parser_build_binary_op): Use true/false instead of 1/0.
462 (pointer_diff): Likewise.
463 (build_modify_expr): Likewise.
464 (set_designator): Change the type of a parameter to bool.
465 (set_init_index): Use true/false instead of 1/0.
466 (set_init_label): Likewise.
467 (output_init_element): Change the type of a parameter to bool.
468 (output_pending_init_elements): Use true/false instead of 1/0.
469 (process_init_element): Likewise.
470 (build_binary_op): Change the type of a parameter to bool.
471
296c53ac
MP
4722017-08-09 Marek Polacek <polacek@redhat.com>
473
474 PR c/81233
475 * c-typeck.c (pedwarn_init): Make the function take a variable list.
476 Call emit_diagnostic_valist instead of pedwarn.
477 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
478 Print the relevant types in diagnostics.
479
a32c8316
MP
4802017-08-09 Marek Polacek <polacek@redhat.com>
481
482 PR c/81417
483 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
484 build_conditional_expr.
485 * c-parser.c (c_parser_conditional_expression): Create locations for
486 EXP1 and EXP2 from their source ranges. Pass the locations down to
487 build_conditional_expr.
488 * c-tree.h (build_conditional_expr): Update declaration.
489 * c-typeck.c (build_conditional_expr): Add location_t parameters.
490 For -Wsign-compare, also print the types.
491
314e6352
ML
4922017-08-08 Martin Liska <mliska@suse.cz>
493
494 * c-convert.c: Include header files.
495 * c-typeck.c: Likewise.
496
577eec56
ML
4972017-08-07 Martin Liska <mliska@suse.cz>
498
499 * c-parser.c (c_parser_attributes): Canonicalize name of an
500 attribute.
501
f7b6353a
MP
5022017-08-02 Marek Polacek <polacek@redhat.com>
503
504 PR c/81289
505 * c-parser.c (c_parser_unary_expression): Use set_error.
506
8a6eab34
MP
507 PR c/81448
508 PR c/81306
509 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
510 warnings. Avoid walking MACRO_MAP_LOCATIONS.
511
7fef86d3
JH
5122017-07-31 Jan Hubicka <hubicka@ucw.cz>
513 Martin Liska <mliska@suse.cz>
514
515 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 516 statement.
7fef86d3 517
f34ebeb2
ML
5182017-07-31 Martin Liska <mliska@suse.cz>
519
520 PR sanitize/81530
521 * c-convert.c (convert): Guard condition with flag_sanitize_p
522 also with current_function_decl non-null equality.
523 * c-decl.c (grokdeclarator): Likewise.
524 * c-typeck.c (build_binary_op): Likewise.
525
8595f67b
MP
5262017-07-25 Marek Polacek <polacek@redhat.com>
527
528 * c-decl.c (grokfield): Remove local variable.
529
d49718d6
MP
5302017-07-25 Marek Polacek <polacek@redhat.com>
531
532 PR c/81364
533 * c-parser.c (c_parser_else_body): Don't warn about multistatement
534 macro expansion if the body is in { }.
535 (c_parser_while_statement): Likewise.
536 (c_parser_for_statement): Likewise.
537
ff22eb12
NS
5382017-07-18 Nathan Sidwell <nathan@acm.org>
539
540 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
541
eea77d1f
DM
5422017-07-14 David Malcolm <dmalcolm@redhat.com>
543
544 * c-decl.c (implicitly_declare): When suggesting a missing
545 #include, provide a fix-it hint.
546
b6f43128
DM
5472017-07-06 David Malcolm <dmalcolm@redhat.com>
548
549 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
550 and call that instead.
551 * c-tree.h (selftest::run_c_tests): New decl.
552
3e2becc4
MP
5532017-06-26 Marek Polacek <polacek@redhat.com>
554
555 PR c/80116
556 * c-parser.c (c_parser_if_body): Set the location of the
557 body of the conditional after parsing all the labels. Call
558 warn_for_multistatement_macros.
559 (c_parser_else_body): Likewise.
560 (c_parser_switch_statement): Likewise.
561 (c_parser_while_statement): Likewise.
562 (c_parser_for_statement): Likewise.
563 (c_parser_statement): Add a default argument. Save the location
564 after labels have been parsed.
565 (c_parser_c99_block_statement): Likewise.
566
343ae898
RB
5672017-06-19 Richard Biener <rguenther@suse.de>
568
569 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
570 negated _Literals to parse _Literal (int) -1.
571
45b2222a
ML
5722017-06-13 Martin Liska <mliska@suse.cz>
573
574 PR sanitize/78204
575 * c-convert.c (convert): Use sanitize_flags_p.
576 * c-decl.c (grokdeclarator): Likewise.
577 * c-typeck.c (convert_for_assignment): Likewise.
578 (c_finish_return): Likewise.
579 (build_binary_op): Likewise.
580
8ab7005b
JJ
5812017-06-08 Jakub Jelinek <jakub@redhat.com>
582
583 PR c/81006
584 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
585 to sizetype before size_binop.
586
363dc72c
JJ
5872017-06-07 Jakub Jelinek <jakub@redhat.com>
588
589 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
590 of TDI_generic.
591
dc949728
MP
5922017-06-06 Marek Polacek <polacek@redhat.com>
593
594 PR c/79983
595 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
596 ref.
597 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
598
40ffd95f
BE
5992017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
600
601 * c-parser.c (c_parser_binary_expression): Implement the
602 -Wsizeof_pointer_div warning.
603 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
604 from a parenthesized expression.
605 (c_parser_expr_list): Use c_last_sizeof_loc.
606 * c-tree.h (c_last_sizeof_loc): New external.
607 * c-typeck.c (c_last_sizeof_loc): New variable.
608 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
609
9fc5e7a4
MM
6102017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
611
612 PR testsuite/80580
613 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
614
f012c8ef
DM
6152017-05-30 David Malcolm <dmalcolm@redhat.com>
616
617 * c-objc-common.c (c_tree_printer): Gain bool and const char **
618 parameters.
619
3cd211af
MS
6202017-05-24 Martin Sebor <msebor@redhat.com>
621
622 PR c/80731
623 * c-fold.c (c_fully_fold_internal): Adjust.
624 * c-typeck.c (parser_build_unary_op): Adjust.
625
fd71a9a2
TS
6262017-05-23 Thomas Schwinge <thomas@codesourcery.com>
627
628 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
629 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
630 "VECTOR_LENGTH".
631
92fa0f9e
MP
6322017-05-23 Marek Polacek <polacek@redhat.com>
633
634 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
635 quotes.
636
d11c168a
JJ
6372017-05-22 Jakub Jelinek <jakub@redhat.com>
638
639 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
640 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
641 it returned invariant. Call tree_invariant_p unconditionally
642 afterwards to decide whether to return expr or op0.
643
58aca9d9
NS
6442017-05-22 Nathan Sidwell <nathan@acm.org>
645
646 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
647
7fd549d2
TS
6482017-05-19 Thomas Schwinge <thomas@codesourcery.com>
649
650 * c-parser.c (c_parser_omp_clause_default): Handle
651 "OMP_CLAUSE_DEFAULT_PRESENT".
652
6ecd2339
BE
6532017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
654
655 * config-lang.in (gtfiles): Add c-family/c-format.c.
656
8a57ecff
NS
6572017-05-18 Nathan Sidwell <nathan@acm.org>
658
659 * c-decl.c (pushdecl_top_level): Delete unused function.
660
6574d78e
MP
6612017-05-18 Marek Polacek <polacek@redhat.com>
662
663 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
664 (check_earlier_gotos): Likewise.
665 (define_label): Likewise.
666 (pending_xref_error): Likewise.
667 (smallest_type_quals_location): Likewise.
668 (grokdeclarator): Likewise.
669 (grokparms): Likewise.
670 (identifier_global_value): Likewise.
671 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
672 (find_init_member): Likewise.
673
e3455240
MP
6742017-05-18 Marek Polacek <polacek@redhat.com>
675
676 * c-decl.c (start_decl): Use false/true instead of 0/1.
677 (grokdeclarator): Likewise.
678 (finish_struct): Likewise.
679 (start_function): Change the return type to bool. Use false/true
680 instead of 0/1.
681 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
682 * c-tree.h (start_function): Update.
683 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
684 (set_designator): Change the return type to bool. Use false/true
685 instead of 0/1.
686
3fa8871b
MP
6872017-05-17 Marek Polacek <polacek@redhat.com>
688
689 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
690 * c-typeck.c: Likewise.
691
142473df
MP
6922017-05-17 Marek Polacek <polacek@redhat.com>
693
694 PR sanitizer/80659
695 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
696 DECL_IGNORED_P even for non-static compound literals.
697
1a817418
ML
6982017-05-17 Martin Liska <mliska@suse.cz>
699
700 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
701 use it instead of int type.
702
b2fa0a8b
MP
7032017-05-17 Marek Polacek <polacek@redhat.com>
704
705 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
706 call c_fully_fold.
707 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
708 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
709 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
710 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
711 save_expr.
712 (c_parser_conditional_expression): Likewise.
713 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
714 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
715 (process_init_element): Likewise.
716 (build_binary_op): Likewise.
717 (handle_omp_array_sections_1): Likewise.
718
1e47f02b
TS
7192017-05-12 Thomas Schwinge <thomas@codesourcery.com>
720
721 * c-parser.c (c_parser_omp_clause_num_gangs)
722 (c_parser_omp_clause_num_workers)
723 (c_parser_omp_clause_vector_length): Merge functions into...
724 (c_parser_oacc_single_int_clause): ... this new function. Adjust
725 all users.
726
c24e924f
NS
7272017-05-11 Nathan Sidwell <nathan@acm.org>
728
729 * gimple-parser.c: Don't #include tree-dump.h.
730
c587104e
MM
7312017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
732
733 PR testsuite/80580
734 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
735
67ac9a9d
MM
7362017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
737
738 PR testsuite/80580
739 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
740 incorrect __MEM syntax.
741
ac4eb40f
MM
7422017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
743
744 PR testsuite/80580
745 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
746 type of unary '*'.
747
641da50a
NS
7482017-05-09 Nathan Sidwell <nathan@acm.org>
749
750 * c-tree.h (pushdecl): Declare.
751
56d35585
DM
7522017-05-05 David Malcolm <dmalcolm@redhat.com>
753
754 * c-decl.c (warn_defaults_to): Replace report_diagnostic
755 with diagnostic_report_diagnostic.
756 * c-errors.c (pedwarn_c99): Likewise.
757 (pedwarn_c90): Likewise.
758
815d9cc6
XR
7592017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
760
761 PR c++/80038
762 * c-gimplify.c (c_gimplify_expr): Remove calls to
763 cilk_gimplifY_call_params_in_spawned_fn.
764
1c4ea66f
DM
7652017-04-25 David Malcolm <dmalcolm@redhat.com>
766
767 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
768 hint for removing extra semicolon.
769
666f7903
JJ
7702017-04-21 Jakub Jelinek <jakub@redhat.com>
771
772 PR c/80468
773 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
774 enabled, set specs->type to integer_type_node.
775
5764ee3c
JW
7762017-04-03 Jonathan Wakely <jwakely@redhat.com>
777
778 * c-array-notation.c: Fix typo in comment.
779
10fa8dfb
MP
7802017-03-29 Marek Polacek <polacek@redhat.com>
781
782 PR c/79730
783 * c-decl.c (finish_decl): Check VAR_P.
784
a9e4a1a5
JJ
7852017-03-27 Jakub Jelinek <jakub@redhat.com>
786
787 PR middle-end/80162
788 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
789 * c-typeck.c (c_mark_addressable): Likewise. Look through
790 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
791 to ARRAY_TYPE.
792 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
793
ee3ff394
MP
7942017-03-23 Marek Polacek <polacek@redhat.com>
795
796 * c-tree.h: Remove a C_RID_YYCODE reference.
797
4d1b8e70
JJ
7982017-03-21 Jakub Jelinek <jakub@redhat.com>
799
800 PR c/80097
801 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
802 optional COMPOUND_EXPR with ubsan instrumentation.
803
31dc71a8
MP
8042017-03-17 Marek Polacek <polacek@redhat.com>
805
806 * c-parser.c: Add C11 references.
807
d579c385
MP
8082017-03-15 Marek Polacek <polacek@redhat.com>
809
810 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
811
85059a38
MP
8122017-03-11 Marek Polacek <polacek@redhat.com>
813
814 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
815
2f6f187a
DM
8162017-03-10 David Malcolm <dmalcolm@redhat.com>
817
818 PR translation/79848
819 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
820 "%qs".
821 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
822
36618428
MP
8232017-03-09 Marek Polacek <polacek@redhat.com>
824
825 PR sanitizer/79757
826 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
827 parameter declarations with initializers.
828
01e5af5a
JJ
8292017-03-09 Jakub Jelinek <jakub@redhat.com>
830
831 PR c/79969
832 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
833 TYPE_STUB_DECL.
834
a71dbc63
JJ
8352017-03-07 Jakub Jelinek <jakub@redhat.com>
836
837 PR c/79834
838 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
839 for "may only be used in compound statements" diagnostics, change it
840 such that the same translatable string is used for all pragmas. For
841 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
842 diagnostics.
843 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
844 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
845 "may only be used in compound statements" diagnostics, such that the
846 same translatable string is used for all pragmas.
847
1ff4bae6
MP
8482017-03-04 Marek Polacek <polacek@redhat.com>
849
850 PR c/79847
851 * c-decl.c (implicit_decl_warning): Add missing space.
852
7f5a7d78
MP
8532017-03-03 Marek Polacek <polacek@redhat.com>
854
855 PR c/79758
856 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
857 current_function_prototype_arg_types is error_mark_node. Fix
858 formatting. Use TREE_VALUE instead of TREE_TYPE.
859
883c8f06
JJ
8602017-03-03 Jakub Jelinek <jakub@redhat.com>
861
79c9b7a8
JJ
862 PR c/79837
863 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
864 %<min%> or %<max%> in the diagnostics, instead mention identifier.
865 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
866 diagnostics.
867
883c8f06
JJ
868 PR c/79836
869 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
870 instead of %<_Generic>.
871 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
872 (c_parser_omp_target_exit_data): Use %<release%> instead of
873 %<release>.
874
324ff1a0
JJ
8752017-02-28 Jakub Jelinek <jakub@redhat.com>
876
877 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
878 instead of just cond ? "..." : "...".
879 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
880 for "enter"/"exit" keyword.
881 (c_finish_oacc_routine): Don't use %s to supply portions of the
882 message.
883
4227c9ad
JJ
8842017-02-24 Jakub Jelinek <jakub@redhat.com>
885
886 PR c++/79588
887 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
888 handle -Wrestrict here.
889 * c-typeck.c (build_function_call_vec): Adjust
890 check_function_arguments caller.
891
5d972e66
RB
8922017-02-23 Richard Biener <rguenther@suse.de>
893
894 PR c/79684
895 * gimple-parser.c (c_parser_gimple_statement): Use set_error
896 to initialize c_exprs to return.
897 (c_parser_gimple_binary_expression): Likewise.
898 (c_parser_gimple_unary_expression): Likewise.
899 (c_parser_gimple_postfix_expression): Likewise.
900
61ac5ebe
MP
9012017-02-22 Marek Polacek <polacek@redhat.com>
902
903 PR c/79662
904 * c-typeck.c (convert_arguments): Handle error_mark_node.
905
41d1b0b1
PK
9062017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
907
908 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
909 value of c_parser_parse_ssa_name against error_mark_node and emit
910 error if ssa name is anonymous and written as default definition.
911
eab1f169
PK
9122017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
913
914 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
915 FMA_EXPR.
916
bcac0b4d
JJ
9172017-02-16 Jakub Jelinek <jakub@redhat.com>
918
919 PR c++/79512
920 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
921 ignore #pragma omp target even when not followed by identifier.
922
1be33173
PK
9232017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
924
925 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
926 (c_parser_gimple_unary_expression): Likewise.
927
aa326bfb
JJ
9282017-02-13 Jakub Jelinek <jakub@redhat.com>
929
930 * c-parser.c (c_parser_oacc_declare): Add missing space in
931 diagnostics.
932
8a398bc5
PK
9332017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
934
935 PR c/79478
936 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
937 set_c_expr_source_range when parsing ssa-name.
938
3dcde5ef
PG
9392017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
940 Richard Biener <rguenther@suse.de>
941
942 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
943 building IL when arguments are error_mark_node.
944 (c_parser_gimple_unary_expression): Likewise.
945 (c_parser_gimple_if_stmt): Likewise.
946 (c_parser_gimple_switch_stmt): Likewise.
947 (c_parser_gimple_return_stmt): Likewise.
948 (c_parser_parse_ssa_name): When name lookup fails do not build
949 an SSA name. Use undeclared rather than not declared in error
950 reporting.
951
192b048b
MP
9522017-02-09 Marek Polacek <polacek@redhat.com>
953
954 PR c/79428
955 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
956 instead of c_parser_skip_until_found.
957
56f71478
JJ
9582017-02-09 Jakub Jelinek <jakub@redhat.com>
959
960 PR c/79431
961 * c-parser.c (c_parser_omp_declare_target): Don't invoke
962 symtab_node::get on automatic variables.
963
02889d23
CLT
9642016-02-09 Nathan Sidwell <nathan@codesourcery.com>
965 Chung-Lin Tang <cltang@codesourcery.com>
966
967 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
968 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
969 semantic checking.
970 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
971
7af4b20d
RB
9722017-02-07 Richard Biener <rguenther@suse.de>
973
974 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
975 (c_parser_gimple_postfix_expression_after_primary):
976 Do not use c_build_function_call_vec to avoid folding and promotion.
977 Simplify.
978
e5e391d6
MO
9792017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
980
981 PR lto/79061
982 * c-decl.c (pop_scope): Pass main_input_filename to
983 build_translation_unit_decl.
984
c2e84327
DM
9852017-01-24 David Malcolm <dmalcolm@redhat.com>
986
987 * c-parser.c: Include "read-rtl-function.h" and
988 "run-rtl-passes.h".
989 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
990 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
991 production. Update for renaming of field "gimple_pass" to
992 "gimple_or_rtl_pass". If __RTL was seen, call
993 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
994 to an auto_timevar, to cope with early exit.
995 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
996 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
997 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
998 Handle RID_RTL.
999 (c_parser_parse_rtl_body): New function.
1000 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
1001 (struct c_declspecs): Rename field "gimple_pass" to
1002 "gimple_or_rtl_pass". Add field "rtl_p".
1003 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
1004 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
1005 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
1006 (c_parser_gimple_or_rtl_pass_list): ...this.
1007
2ebd93e1
MP
10082017-01-20 Marek Polacek <polacek@redhat.com>
1009
1010 PR c/64279
1011 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
1012
b1c95bb5
RB
10132017-01-13 Richard Biener <rguenther@suse.de>
1014
1015 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
1016 nops.
1017
25329913
RB
10182017-01-13 Richard Biener <rguenther@suse.de>
1019
1020 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1021 _Literal ( type-name ) number.
1022
6bb4ea5c
RB
10232017-01-12 Richard Biener <rguenther@suse.de>
1024
1025 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1026 __MEM.
1027
6b5b4e9c
JJ
10282017-01-11 Jakub Jelinek <jakub@redhat.com>
1029
1030 PR c++/72813
1031 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
1032 PCH file.
1033
e3252775
RB
10342017-01-11 Richard Biener <rguenther@suse.de>
1035
1036 PR bootstrap/79052
1037 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
1038 returns on parse errors.
1039
a9342885
MP
10402017-01-04 Marek Polacek <polacek@redhat.com>
1041
1042 PR c++/64767
1043 * c-parser.c (c_parser_postfix_expression): Mark zero character
1044 constants by setting original_type in c_expr.
1045 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
1046 with a zero character constant.
1047 (char_type_p): New function.
1048
5dd9a9d0
DM
10492017-01-04 David Malcolm <dmalcolm@redhat.com>
1050
1051 * c-parser.c (c_parser_declaration_or_fndef): Create a
1052 rich_location at init_loc and parse it to start_init.
1053 (last_init_list_comma): New global.
1054 (c_parser_braced_init): Update last_init_list_comma when parsing
1055 commas. Pass it to pop_init_level. Pass location of closing
1056 brace to pop_init_level.
1057 (c_parser_postfix_expression_after_paren_type): Create a
1058 rich_location at type_loc and parse it to start_init.
1059 (c_parser_omp_declare_reduction): Likewise for loc.
1060 * c-tree.h (start_init): Add rich_location * param.
1061 (pop_init_level): Add location_t param.
1062 * c-typeck.c (struct initializer_stack): Add field
1063 "missing_brace_richloc".
1064 (start_init): Add richloc param, use it to initialize
1065 the stack node's missing_brace_richloc.
1066 (last_init_list_comma): New decl.
1067 (finish_implicit_inits): Pass last_init_list_comma to
1068 pop_init_level.
1069 (push_init_level): When finding missing open braces, add fix-it
1070 hints to the richloc.
1071 (pop_init_level): Add "insert_before" param and pass it
1072 when calling pop_init_level. Add fixits about missing
1073 close braces to any richloc. Use the richloc for the
1074 -Wmissing-braces warning.
1075 (set_designator): Pass last_init_list_comma to pop_init_level.
1076 (process_init_element): Likewise.
1077
cbe34bb5
JJ
10782017-01-01 Jakub Jelinek <jakub@redhat.com>
1079
1080 Update copyright years.
1081
d17680f3
JJ
10822016-12-21 Jakub Jelinek <jakub@redhat.com>
1083
0dba7960
JJ
1084 PR bootstrap/78817
1085 * c-typeck.c (build_function_call_vec): If check_function_arguments
1086 returns true, set TREE_NO_WARNING on CALL_EXPR.
1087
d17680f3
JJ
1088 PR c/77767
1089 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
1090 to *expr instead of overwriting it.
1091
aa90531e
RB
10922016-12-20 Richard Biener <rguenther@suse.de>
1093
1094 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
1095 error recovery.
1096 (c_parser_gimple_statement): Only build assigns for non-error
1097 stmts.
1098 (c_parser_gimple_postfix_expression_after): Improve error recovery.
1099
629b3d75
MJ
11002016-12-14 Martin Jambor <mjambor@suse.cz>
1101
1102 * c-parser.c: Include omp-general.h and omp-offload.h instead of
1103 omp-low.h.
1104 (c_finish_oacc_routine): Adjusted call to
1105 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
1106 to use their new names.
1107 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
1108 use its new name.
1109 (c_parser_oacc_update): Likewise.
1110 (c_parser_omp_simd): Likewise.
1111 (c_parser_omp_target_update): Likewise.
1112 * c-typeck.c: Include omp-general.h instead of omp-low.h.
1113 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
1114 name.
1115 (c_finish_omp_cancellation_point): Likewise.
1116 * gimple-parser.c: Do not include omp-low.h
1117
c5af52eb
CP
11182016-12-02 Cesar Philippidis <cesar@codesourcery.com>
1119 James Norris <jnorris@codesourcery.com>
1120
1121 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
1122 EXIT_DATA,WAIT} are not used in compound statements.
1123 (c_parser_oacc_enter_exit_data): Update diagnostics.
1124
48330c93
BE
11252016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
1126
1127 PR c++/71973
1128 * c-decl.c (diagnose_mismatched_decls): Use
1129 OPT_Wbuiltin_declaration_mismatch here too.
1130
899ca90e 11312016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
1132 Alan Hayward <alan.hayward@arm.com>
1133 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
1134
1135 * c-decl.c (merge_decls): Use SET_DECL_MODE.
1136 (make_label, finish_struct): Likewise.
1137
1ee62b92 11382016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 1139 Richard Biener <rguenther@suse.de>
22b15758 1140
8e745a17
JJ
1141 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
1142 * config-lang.in (gtfiles): Add c/c-parser.h.
1143 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
1144 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
1145 * c-parser.c (enum c_id_kind, struct c_token,
1146 c_parser_next_token_is, c_parser_next_token_is_not,
1147 c_parser_next_token_is_keyword,
1148 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
1149 Split out to ...
1150 * c-parser.h: ... new header.
1151 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 1152 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
1153 c_token_starts_typename, c_parser_next_token_starts_declspecs,
1154 c_parser_next_tokens_start_declaration, c_parser_consume_token,
1155 c_parser_error, c_parser_require, c_parser_skip_until_found,
1156 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1157 c_parser_type_name): Export.
1158 (c_parser_tokens_buf): New function.
1159 (c_parser_error): Likewise.
1160 (c_parser_set_error): Likewise.
1161 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
1162 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
1163 via c_parser_parse_gimple_body.
8e745a17
JJ
1164 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
1165 c_token_starts_typename, c_parser_next_token_starts_declspecs,
1166 c_parser_next_tokens_start_declaration, c_parser_consume_token,
1167 c_parser_error, c_parser_require, c_parser_skip_until_found,
1168 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1169 c_parser_type_name): Declare.
1ee62b92
PG
1170 (struct c_parser): Declare forward.
1171 (c_parser_tokens_buf): Declare.
8e745a17
JJ
1172 (c_parser_error): Likewise.
1173 (c_parser_set_error): Likewise.
1174 * gimple-parser.c: New file.
1175 * gimple-parser.h: Likewise.
1ee62b92 1176
22b15758
UB
11772016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1178
1179 PR c/35503
1180 * c-parser.c (c_parser_postfix_expression_after_primary): Call
1181 warn_for_restrict.
1182
84ff4775
LCW
11832016-09-11 Le-Chun Wu <lcwu@google.com>
1184 Mark Wielaard <mjw@redhat.com>
1185
1186 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
1187 to the given -Wshadow= variant.
1188
4d0cdd0c
TP
11892016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
1190
1191 * c-typeck.c: Include memmodel.h.
1192
1202f33e
JJ
11932016-10-13 Jakub Jelinek <jakub@redhat.com>
1194
1195 PR target/77957
1196 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
1197 instead of lhd_return_null_tree_v.
1198
8a14afd0
BS
11992016-10-07 Bernd Schmidt <bschmidt@redhat.com>
1200
1201 PR c++/69733
1202 * c-decl.c (smallest_type_quals_location): New static function.
1203 (grokdeclarator): Try to find the correct location for an ignored
1204 qualifier.
1205
81fea426
MP
12062016-09-26 Marek Polacek <polacek@redhat.com>
1207
1208 PR c/7652
1209 * c-decl.c (pop_scope): Add gcc_fallthrough.
1210
12112016-09-26 Marek Polacek <polacek@redhat.com>
1212
1213 PR c/7652
1214 * c-parser.c (struct c_token): Add flags field.
1215 (c_lex_one_token): Pass it to c_lex_with_flags.
1216 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
1217 into IFN_FALLTHROUGH.
1218 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
1219 attribute fallthrough after a case label or default label.
1220 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
1221
9a2300e9
MP
12222016-09-24 Marek Polacek <polacek@redhat.com>
1223
1224 PR c/77490
1225 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
1226 have boolean value. Warn about ++/-- on booleans.
1227
7de76362
JJ
12282016-09-23 Jakub Jelinek <jakub@redhat.com>
1229
1230 * c-parser.c (incomplete_record_decls): Remove unnecessary
1231 = vNULL initialization of file scope vec.
1232
5b73d2ab
MP
12332016-09-16 Marek Polacek <polacek@redhat.com>
1234
1235 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
1236
e51fbec3
MP
12372016-09-14 Marek Polacek <polacek@redhat.com>
1238
1239 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
1240 (fix_array_notation_expr): Likewise.
1241 * c-decl.c (finish_decl): Likewise.
1242 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1243 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
1244 (function_to_pointer_conversion): Use false instead of 0.
1245 (convert_lvalue_to_rvalue): Likewise.
1246 (parser_build_unary_op): Likewise.
1247 (build_atomic_assign): Likewise.
1248 (build_unary_op): Change nonconvert parameter type to bool, use
1249 true/false instead of 1/0.
1250 (build_binary_op): Use true instead of 1.
1251
254830ba
DM
12522016-09-13 David Malcolm <dmalcolm@redhat.com>
1253
1254 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
1255 of add_fixit_insert to add_fixit_insert_before.
1256
4c13ba17
MP
12572016-09-13 Marek Polacek <polacek@redhat.com>
1258
1259 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
1260 it.
1261
54dcdb88
BE
12622016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
1263
1264 PR c++/77496
1265 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
1266 COMPOUND_EXPR to warn_for_omitted_condop.
1267
e5106e27
DM
12682016-09-07 David Malcolm <dmalcolm@redhat.com>
1269
1270 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
1271 c_get_substring_location for this new langhook.
1272
9dc5773f
JJ
12732016-09-02 Jakub Jelinek <jakub@redhat.com>
1274
1275 PR c/65467
1276 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
1277 flag_openmp.
1278 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
1279 instead of mark_exp_read on low_bound/length expression.
1280 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
1281 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
1282 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
1283 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
1284 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
1285 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
1286 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
1287 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
1288 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
1289 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
1290 instead of mark_expr_read.
1291 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
1292 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
1293 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
1294 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
1295 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
1296 array section bases outside of depend clause, for depend clause
1297 use convert_lvalue_to_rvalue on the base.
1298 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
1299 linear, aligned, map, to and from clauses.
1300 (c_omp_clause_copy_ctor): New function.
1301
295844f6
MP
13022016-09-01 Marek Polacek <polacek@redhat.com>
1303
1304 PR c/7652
1305 * c-typeck.c (composite_type): Add FALLTHRU comment.
1306
089af25c
DM
13072016-08-31 David Malcolm <dmalcolm@redhat.com>
1308
1309 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
1310 to the insertion fixits for "struct", "union", and "enum".
1311
f9087798
DM
13122016-08-30 David Malcolm <dmalcolm@redhat.com>
1313
1314 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
1315 rather than add_fixit_misspelled_id.
1316 (undeclared_variable): Likewise.
1317 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
1318 now-redundant "here" params from add_fixit_insert method calls.
1319 (c_parser_parameter_declaration): Likewise.
1320 * c-typeck.c (build_component_ref): Remove now-redundant range
1321 param from add_fixit_replace method calls.
1322
ebef225f
MP
13232016-08-25 Marek Polacek <polacek@redhat.com>
1324
1325 * c-typeck.c (parser_build_binary_op): Pass LHS to
1326 warn_logical_not_parentheses.
1327
fe377a48
MP
13282016-08-25 Marek Polacek <polacek@redhat.com>
1329
1330 PR c/77323
1331 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
1332 or _FloatN or _FloatNx is not supported.
1333 (finish_declspecs): Set type to integer_type_node when _FloatN or
1334 _FloatNx is not supported.
1335
c65699ef
JM
13362016-08-19 Joseph Myers <joseph@codesourcery.com>
1337
1338 PR c/32187
1339 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
1340 (struct c_declspecs): Add field floatn_nx_idx.
1341 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
1342 and _FloatNx type specifiers.
1343 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
1344 (c_parser_declspecs, c_parser_attribute_any_word)
1345 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
1346 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
1347 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
1348 narrower than double.
1349
2f1364c2
JJ
13502016-08-12 Jakub Jelinek <jakub@redhat.com>
1351 Martin Liska <mliska@suse.cz>
1352
1353 PR c/67410
1354 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
1355 % to determine val element to change. Assert that
1356 wchar_bytes * charwidth fits into val array.
1357
191816a3
MP
13582016-08-12 Marek Polacek <polacek@redhat.com>
1359
1360 PR c/7652
1361 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
1362 (c_parser_postfix_expression): Likewise.
1363 * c-typeck.c (build_unary_op): Adjust fall through comment.
1364 (c_mark_addressable): Likewise.
1365
b95a64bb
JJ
13662016-08-11 Jakub Jelinek <jakub@redhat.com>
1367
1368 PR c/72816
1369 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
1370 array member through typedef, for orig_qual_indirect == 0 clear
1371 orig_qual_type.
1372
895aa8e1
DM
13732016-08-08 David Malcolm <dmalcolm@redhat.com>
1374
1375 PR c/64955
1376 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
1377 this up to selftest::run_c_tests.
1378 (selftest::run_c_tests): New function.
1379
0b212d8c
TS
13802016-08-04 Thomas Schwinge <thomas@codesourcery.com>
1381
ae9281fc
TS
1382 * c-parser.c (struct oacc_routine_data): Add error_seen and
1383 fndecl_seen members.
1384 (c_finish_oacc_routine): Use these.
1385 (c_parser_declaration_or_fndef): Adjust.
1386 (c_parser_oacc_routine): Likewise. Support more C language
1387 constructs, and improve diagnostics. Move pragma context
1388 checking...
1389 (c_parser_pragma): ... here.
1390
0b212d8c
TS
1391 * c-parser.c (struct oacc_routine_data): New.
1392 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
1393 Simplify code.
1394 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
1395 declare target" attribute.
1396
76e2c821
JB
13972016-08-01 Jan Beulich <jbeulich@suse.com>
1398
1399 * c-fold.c (c_fully_fold_internal): Also emit shift count
1400 warnings for vector types.
1401 * c-typeck.c (build_binary_op): Likewise.
1402
f618a472
MP
14032016-07-29 Marek Polacek <polacek@redhat.com>
1404
1405 PR c/71742
1406 * c-decl.c (finish_struct): Rephrase an error message.
1407
efd0786f
MP
1408 PR c/71853
1409 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
1410 to error node for invalid code.
1411
e00dceaf
MP
1412 PR c/71573
1413 * c-decl.c (implicitly_declare): Return decl early not only for
1414 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
1415
673a107a
JJ
14162016-07-29 Jakub Jelinek <jakub@redhat.com>
1417
1418 PR c/71969
1419 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
1420 on GNU extern inline functions.
1421
a5b5c8b6
MP
14222016-07-29 Marek Polacek <polacek@redhat.com>
1423
1424 PR c/71583
1425 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
1426 check expr.value.
1427
e3fe09c1
UB
14282016-07-22 Uros Bizjak <ubizjak@gmail.com>
1429
1430 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
1431
7c8f7eaa
DM
14322016-07-20 David Malcolm <dmalcolm@redhat.com>
1433
1434 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
1435 spellcheck-tree.h
1436 (best_macro_match): Likewise, converting from a typedef to a
1437 subclass.
1438 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
1439 (lookup_name_fuzzy): Update for change of best_macro_match to a
1440 subclass with a ctor that calls cpp_forall_identifiers.
1441
de6a69ee
DM
14422016-07-20 David Malcolm <dmalcolm@redhat.com>
1443
1444 * c-decl.c (implicit_decl_warning): Update for conversion of
1445 return type of lookup_name_fuzzy to const char *.
1446 (undeclared_variable): Likewise.
1447 (lookup_name_fuzzy): Convert return type from tree to
1448 const char *.
1449 * c-parser.c (c_parser_declaration_or_fndef): Update for
1450 conversion of return type of lookup_name_fuzzy to const char *.
1451 (c_parser_parameter_declaration): Likewise.
1452
b1c9c068
CP
14532016-07-15 Cesar Philippidis <cesar@codesourcery.com>
1454
1455 * c-parser.c (c_parser_oacc_declare): Don't scan for
1456 GOMP_MAP_POINTER.
1457 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
1458 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
1459 zero-length subarrays.
1460
ddbbcb19
JJ
14612016-07-15 Jakub Jelinek <jakub@redhat.com>
1462
1463 PR c/71858
1464 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
1465 instead of FUZZY_LOOKUP_NAME.
1466 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
1467 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
1468
dd36b877
JJ
14692016-07-14 Jakub Jelinek <jakub@redhat.com>
1470
1471 PR c/71858
1472 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
1473
8c681247
TS
14742016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1475
1476 * c-parser.c (c_parser_generic_selection): Make type of variable
1477 auto_vec.
1478 (c_parser_omp_declare_simd): Likewise.
1479
bf4fa671
TS
14802016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1481
1482 * c-decl.c (struct c_struct_parse_info): Change member types
1483 from vec to auto_vec.
1484 (start_struct): Adjust.
1485 (finish_struct): Likewise.
1486
557e8c49
JJ
14872016-07-02 Jakub Jelinek <jakub@redhat.com>
1488
1489 PR c/71719
1490 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
1491
54d19c3b
TS
14922016-06-29 Thomas Schwinge <thomas@codesourcery.com>
1493
1494 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
1495 Move pragma context checking into...
1496 (c_parser_omp_cancellation_point): ... here, and improve
1497 diagnostic messages.
1498 * c-typeck.c (c_finish_omp_cancel)
1499 (c_finish_omp_cancellation_point): Improve diagnostic messages.
1500
152ef731
JJ
15012016-06-29 Jakub Jelinek <jakub@redhat.com>
1502
1503 PR c/71685
1504 * c-typeck.c (c_build_qualified_type): Don't clear
1505 C_TYPE_INCOMPLETE_VARS for the main variant.
1506
15072016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
1508
1509 PR c/71552
1510 * c-typeck.c (output_init_element): Diagnose incompatible types
1511 before non-constant initializers.
1512
e9ac1f86
JJ
15132016-06-28 Jakub Jelinek <jakub@redhat.com>
1514
1515 * Make-lang.in: Don't cat ../stage_current if it does not exist.
1516
277d7ee0
AK
15172016-06-23 Andi Kleen <ak@linux.intel.com>
1518
1519 * Make-lang.in: Add support for autofdo.
1520
1a4f11c8
DM
15212016-06-22 David Malcolm <dmalcolm@redhat.com>
1522
1523 PR c/70339
1524 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
1525 (implicit_decl_warning): When issuing warnings for implicit
1526 declarations, attempt to provide a suggestion via
1527 lookup_name_fuzzy.
1528 (undeclared_variable): Likewise when issuing errors.
1529 (lookup_name_in_scope): Likewise.
1530 (struct edit_distance_traits<cpp_hashnode *>): New struct.
1531 (best_macro_match): New typedef.
1532 (find_closest_macro_cpp_cb): New function.
1533 (lookup_name_fuzzy): New function.
1534 * c-parser.c: Include gcc-rich-location.h.
1535 (c_token_starts_typename): Split out case CPP_KEYWORD into...
1536 (c_keyword_starts_typename): ...this new function.
1537 (c_parser_declaration_or_fndef): When issuing errors about
1538 missing "struct" etc, add a fixit. For other kinds of errors,
1539 attempt to provide a suggestion via lookup_name_fuzzy.
1540 (c_parser_parms_declarator): When looking ahead to detect typos in
1541 type names, also reject CPP_KEYWORD.
1542 (c_parser_parameter_declaration): When issuing errors about
1543 unknown type names, attempt to provide a suggestion via
1544 lookup_name_fuzzy.
1545 * c-tree.h (c_keyword_starts_typename): New prototype.
1546
5a578671
JM
15472016-06-20 Joseph Myers <joseph@codesourcery.com>
1548
1549 PR c/71601
1550 * c-typeck.c (build_conditional_expr): Return error_mark_node if
1551 c_common_type returns error_mark_node.
1552
3f8257db 15532016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
1554
1555 PR c/69507
1556 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
1557 __alignof__ (expression).
1558
6a3f203c
DM
15592016-06-14 David Malcolm <dmalcolm@redhat.com>
1560
1561 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
1562
264757fb
DM
15632016-06-14 David Malcolm <dmalcolm@redhat.com>
1564
1565 * c-typeck.c (build_component_ref): Simplify fixit code by
1566 using gcc_rich_location::add_fixit_misspelled_id.
1567 (set_init_label): Likewise.
1568
f7e4f2e3
DM
15692016-06-13 David Malcolm <dmalcolm@redhat.com>
1570
1571 * c-parser.c (c_parser_initelt): Provide location of name for new
1572 location_t param of set_init_label.
1573 * c-tree.h (set_init_label): Add location_t param.
1574 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
1575 param and use it when issuing error messages about unrecognized
1576 field names. Attempt to provide a fixit hint if appropriate,
1577 otherwise update the error message to provide the type name.
1578
4b1ffdb1
TS
15792016-06-10 Thomas Schwinge <thomas@codesourcery.com>
1580
1581 PR c/71381
1582 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
1583 Loosen checking.
1584
44a845ca
MS
15852016-06-08 Martin Sebor <msebor@redhat.com>
1586 Jakub Jelinek <jakub@redhat.com>
1587
1588 PR c++/70507
1589 PR c/68120
1590 * c-typeck.c (convert_arguments): Don't promote last argument
1591 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
1592
92a5f2ba
MP
15932016-06-08 Marek Polacek <polacek@redhat.com>
1594
1595 PR c/71418
1596 * c-decl.c (grokdeclarator): Check TYPE_P.
1597
08203f73
MP
1598 PR c/71426
1599 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
1600 code.
1601
6ffd47b7
DM
16022016-06-07 David Malcolm <dmalcolm@redhat.com>
1603
1604 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
1605 and structure element reference, capture the location of the
1606 element name token and pass it to build_component_ref.
1607 (c_parser_postfix_expression_after_primary): Likewise for
1608 structure element dereference.
1609 (c_parser_omp_variable_list): Likewise for
1610 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
1611 * c-tree.h (build_component_ref): Add location_t param.
1612 * c-typeck.c (build_component_ref): Add location_t param
1613 COMPONENT_LOC. Use it, if available, when issuing hints about
1614 mispelled member names to provide a fixit replacement hint.
1615
1f40cff3
MP
16162016-06-06 Marek Polacek <polacek@redhat.com>
1617
1618 PR c/71362
1619 * c-parser.c (c_parser_direct_declarator): Set location.
1620
5545a907
MP
16212016-06-06 Marek Polacek <polacek@redhat.com>
1622
1623 * c-typeck.c (comptypes_internal): Handle comparisons of
1624 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
1625 TYPE_REF_CAN_ALIAS_ALL.
1626
b605f663
CLT
16272016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
1628
1629 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
1630 arguments as addressable when async clause exists.
1631
00631022
JJ
16322016-05-30 Jakub Jelinek <jakub@redhat.com>
1633
1634 PR c++/71349
1635 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
1636 when combined with target construct.
1637
7211a097
JJ
16382016-05-26 Jakub Jelinek <jakub@redhat.com>
1639
1640 * c-parser.c (c_parser_omp_clause_schedule): Warn if
1641 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
1642
95efe6b6
MP
16432016-05-25 Marek Polacek <polacek@redhat.com>
1644
1645 PR c/71265
1646 * c-decl.c (c_make_fname_decl): Don't check seen_error.
1647
a23faf7a
MP
1648 PR c/71266
1649 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
1650
e46c7770
CP
16512016-05-24 Cesar Philippidis <cesar@codesourcery.com>
1652
1653 * c-parser.c (c_parser_oacc_declare): Add support for
1654 GOMP_MAP_FIRSTPRIVATE_POINTER.
1655 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
1656 argument with enum c_omp_region_type ort.
1657 (handle_omp_array_sections): Likewise. Update call to
1658 handle_omp_array_sections_1.
1659 (c_finish_omp_clauses): Add specific errors and warning messages for
1660 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
1661 call to handle_omp_array_sections.
1662
a04e69c0
TS
16632016-05-24 Thomas Schwinge <thomas@codesourcery.com>
1664
1665 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
1666
f17a223d
RB
16672016-05-24 Richard Biener <rguenther@suse.de>
1668
1669 PR middle-end/70434
1670 PR c/69504
1671 * c-typeck.c (build_array_ref): Do not complain about indexing
1672 non-lvalue vectors. Adjust for function name change.
1673
79063edd
MS
16742016-05-20 Martin Sebor <msebor@redhat.com>
1675
1676 PR c/71115
1677 * c-typeck.c (error_init): Use
1678 expansion_point_location_if_in_system_header.
1679 (warning_init): Same.
1680
8a40fef3
DM
16812016-05-19 David Malcolm <dmalcolm@redhat.com>
1682
1683 PR c/71171
1684 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
1685 in error-handling.
1686 (c_parser_postfix_expression): Likewise.
1687 * c-tree.h (c_expr::set_error): New method.
1688 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
1689 that result's range is initialized.
1690
e9892350
JG
16912016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
1692
1693 * c-typeck.c (parser_build_unary_op): Fix formatting.
1694
8fad45f5
MW
16952016-05-16 Matthew Wahab <matthew.wahab@arm.com>
1696
1697 * c-decl.c (grokdeclarator): Remove errmsg and use of
1698 targetm.invalid_return_type.
1699 (grokparms): Remove errmsg and use of
1700 targetm.invalid_parameter_type.
1701
aa4b467b
JM
17022016-05-13 Joseph Myers <joseph@codesourcery.com>
1703
1704 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
1705 function return type.
1706
4f2e1536
MP
17072016-05-12 Marek Polacek <polacek@redhat.com>
1708
1709 PR c/70756
1710 * c-decl.c (build_compound_literal): Pass LOC down to
1711 c_incomplete_type_error.
1712 * c-tree.h (require_complete_type): Adjust declaration.
1713 (c_incomplete_type_error): Likewise.
1714 * c-typeck.c (require_complete_type): Add location parameter, pass it
1715 down to c_incomplete_type_error.
1716 (c_incomplete_type_error): Add location parameter, pass it down to
1717 error_at.
1718 (build_component_ref): Pass location down to c_incomplete_type_error.
1719 (default_conversion): Pass location down to require_complete_type.
1720 (build_array_ref): Likewise.
1721 (build_function_call_vec): Likewise.
1722 (convert_arguments): Likewise.
1723 (build_unary_op): Likewise.
1724 (build_c_cast): Likewise.
1725 (build_modify_expr): Likewise.
1726 (convert_for_assignment): Likewise.
1727 (c_finish_omp_clauses): Likewise.
1728
d6e83a8d
MM
17292016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1730
1731 PR c/43651
1732 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
1733 is enabled.
1734 * c-errors.c (pedwarn_c90): Return true if warned.
1735 * c-tree.h (pedwarn_c90): Change return type to bool.
1736 (enum c_declspec_word): Add new enumerator cdw_atomic.
1737
5c3a10fb
MP
17382016-05-11 Marek Polacek <polacek@redhat.com>
1739
1740 PR c++/71024
1741 * c-decl.c (diagnose_mismatched_decls): Factor out code to
1742 diagnose_mismatched_attributes and call it.
1743
cf68d92c
MP
17442016-05-10 Marek Polacek <polacek@redhat.com>
1745
1746 PR c/70255
1747 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
1748 on a declaration following the definition.
1749
351f85c5
JJ
17502016-05-05 Jakub Jelinek <jakub@redhat.com>
1751
1752 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
1753 parse it through to c_parser_c99_block_statement.
1754 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
1755 caller.
1756
deef7113
MP
17572016-05-04 Marek Polacek <polacek@redhat.com>
1758
1759 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
1760 OPT_Wdangling_else.
1761
de55efd5
MP
17622016-05-04 Marek Polacek <polacek@redhat.com>
1763
1764 PR c/48778
1765 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
1766 for macro expansions.
1767
79ce98bc
MP
17682016-05-03 Marek Polacek <polacek@redhat.com>
1769
1770 PR c/70859
1771 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
1772 check_builtin_function_arguments.
1773
fb2647aa
RB
17742016-05-03 Richard Biener <rguenther@suse.de>
1775
1776 * Make-lang.in (cc1-checksum.c): For stage-final re-use
1777 the checksum from the previous stage.
1778
77886428
CP
17792016-05-02 Cesar Philippidis <cesar@codesourcery.com>
1780
1781 * c-parser.c (c_parser_oacc_all_clauses): Update call to
1782 c_finish_omp_clauses.
1783 (c_parser_omp_all_clauses): Likewise.
1784 (c_parser_oacc_cache): Likewise.
1785 (c_parser_oacc_loop): Likewise.
1786 (omp_split_clauses): Likewise.
1787 (c_parser_omp_declare_target): Likewise.
1788 (c_parser_cilk_all_clauses): Likewise.
1789 (c_parser_cilk_for): Likewise.
1790 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
1791 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
1792
7176a4a0
MP
17932016-05-02 Marek Polacek <polacek@redhat.com>
1794
1795 PR c/70851
1796 * c-decl.c (grokdeclarator): Diagnose when array's size has an
1797 incomplete type.
1798
e7ff0319
CP
17992016-04-29 Cesar Philippidis <cesar@codesourcery.com>
1800
1801 PR middle-end/70626
1802 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
1803 OACC_LOOP_CLAUSE_MASK.
1804 (c_parser_oacc_kernels_parallel): Update call to
1805 c_oacc_split_loop_clauses.
1806
9f405ce1
AM
18072016-04-28 Andrew MacLeod <amacleod@redhat.com>
1808
1809 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
1810 argument to build_modify_expr in two cases.
1811
c1e1f433
BS
18122016-04-27 Bernd Schmidt <bschmidt@redhat.com>
1813
1814 * c-parser.c (c_parser_postfix_expression_after_primary): Call
1815 warn_for_memset instead of warning directly here.
1816
2448a956
MP
18172016-04-26 Marek Polacek <polacek@redhat.com>
1818
1819 PR c/67784
1820 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
1821 out of ...
1822 (c_parser_for_statement): ... here.
1823 (c_parser_if_statement): Use it.
1824 (c_parser_switch_statement): Use it.
1825 (c_parser_while_statement): Use it.
1826
b02a5e26
MP
1827 PR c/70791
1828 * c-decl.c (pushdecl): Pass LOCUS down to warning.
1829
477d4906
IV
18302016-04-20 Ilya Verbin <ilya.verbin@intel.com>
1831
1832 PR c++/69363
1833 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
1834 instead of c_finish_cilk_clauses.
1835 * c-tree.h (c_finish_omp_clauses): Add new default argument.
1836 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
1837 floating-point variables in the linear clause for Cilk Plus.
1838
fe37c7af
MM
18392016-04-18 Michael Matz <matz@suse.de>
1840
1841 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
1842 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
1843
949505a9
MP
18442016-04-15 Marek Polacek <polacek@redhat.com>
1845
1846 PR c/70671
1847 * c-typeck.c (build_unary_op): Pass location down to error and
1848 warning call.
1849
dda1bf61
JJ
18502016-04-15 Jakub Jelinek <jakub@redhat.com>
1851
1852 PR c/70436
1853 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
1854 where needed.
1855 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
1856 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
1857 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
1858 Adjust c_parser_pragma callers.
1859 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
1860 caller.
1861 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
1862 c_parser_statement.
1863 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
1864 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
1865 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
1866 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
1867 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
1868 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
1869 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
1870 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
1871 down where needed.
1872 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
1873 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
1874 calls.
1875
99cd9857
MP
18762016-04-13 Marek Polacek <polacek@redhat.com>
1877
1878 PR c/70436
1879 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
1880 adjust callers.
1881 (c_parser_statement): Likewise.
1882 (c_parser_c99_block_statement): Likewise.
1883 (c_parser_while_statement): Likewise.
1884 (c_parser_for_statement): Likewise.
1885 (c_parser_if_body): Don't set IF_P here.
1886 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
1887 about dangling else here.
1888 * c-tree.h (c_finish_if_stmt): Adjust declaration.
1889 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
1890 warn about dangling else here.
1891
f13355da
MP
18922016-04-04 Marek Polacek <polacek@redhat.com>
1893
1894 PR c/70307
1895 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
1896
5fde6a45
MP
18972016-03-31 Marek Polacek <polacek@redhat.com>
1898
1899 PR c/70297
1900 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
1901
4bbf545b
DM
19022016-03-18 David Malcolm <dmalcolm@redhat.com>
1903
1904 PR c/70281
1905 * c-parser.c (c_parser_postfix_expression): Set the source range
1906 for uses of "__builtin_types_compatible_p".
1907
fcc2b74f
JJ
19082016-03-17 Jakub Jelinek <jakub@redhat.com>
1909
1910 PR c/70280
1911 * c-typeck.c (composite_type): Don't count void_list_node
1912 into len, if the list is terminated by void_list_node, start
1913 with void_list_node instead of NULL for newargs. Stop
1914 at void_list_node.
1915
ab4c578f
MP
19162016-03-16 Marek Polacek <polacek@redhat.com>
1917
1918 PR c/70093
1919 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
1920 nested functions returning VM types.
1921
96b3c82d
CP
19222016-03-09 Cesar Philippidis <cesar@codesourcery.com>
1923
1924 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
1925 when calling c_finish_omp_clauses.
1926
29b9828f
BS
19272016-03-04 Bernd Schmidt <bschmidt@redhat.com>
1928
1929 PR c/69824
1930 * c-decl.c (get_parm_info): Don't queue implicit function declarations
1931 for later.
1932
7ff6ca38
MP
19332016-03-04 Marek Polacek <polacek@redhat.com>
1934
1935 PR c/69798
1936 * c-parser.c (c_parser_postfix_expression): Call
1937 c_parser_cast_expression rather than c_parser_postfix_expression.
1938
686e2237
JJ
19392016-03-01 Jakub Jelinek <jakub@redhat.com>
1940
1941 PR c/69796
1942 PR c/69974
1943 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
1944 of incomplete decls to error_mark_node.
1945
0b05329b
MP
19462016-02-24 Marek Polacek <polacek@redhat.com>
1947
1948 PR c/69819
1949 * c-decl.c (finish_decl): Don't update the copy of the type of a
1950 different decl type.
1951
067fbd8b
JJ
19522016-02-23 Jakub Jelinek <jakub@redhat.com>
1953
1954 PR objc/69844
1955 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
1956 in id_kind reclassification.
1957
bf14eba2
JJ
19582016-02-16 Jakub Jelinek <jakub@redhat.com>
1959
1960 PR c/69835
1961 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
1962
ba539195
JN
19632016-02-16 James Norris <jnorris@codesourcery.com>
1964
1965 PR c/64748
1966 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
1967
16595a1f
BS
19682016-02-12 Bernd Schmidt <bschmidt@redhat.com>
1969
f48dfe98
BS
1970 * c-decl.c (build_null_declspecs): Zero the entire struct.
1971
16595a1f
BS
1972 PR c/69522
1973 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
1974 callers changed. If nested_p is true, use it to call
1975 finish_implicit_inits.
1976 * c-tree.h (finish_implicit_inits): Declare.
1977 * c-typeck.c (finish_implicit_inits): New function. Move code
1978 from ...
1979 (push_init_level): ... here.
1980 (set_designator, process_init_element): Call finish_implicit_inits.
1981
66756373
JJ
19822016-02-11 Jakub Jelinek <jakub@redhat.com>
1983
1984 PR c/69768
1985 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
1986 arguments for -Waddress warning.
1987
1066e9b5
JJ
19882016-02-04 Jakub Jelinek <jakub@redhat.com>
1989
1990 PR c/69669
1991 * c-decl.c (finish_enum): When honoring mode attribute,
1992 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
1993
3a5d2ba4
JJ
19942016-01-29 Jakub Jelinek <jakub@redhat.com>
1995
1996 PR debug/69518
1997 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
1998 all type variants, not just TYPE_MAIN_VARIANT.
1999
cbdd8ae0
JJ
20002016-01-27 Jakub Jelinek <jakub@redhat.com>
2001
2002 PR debug/66869
2003 * c-decl.c (c_write_global_declarations_1): Warn with
2004 warn_unused_function if static prototype without definition
2005 is not C_DECL_USED.
2006
fa74a4bc
MP
20072016-01-27 Marek Polacek <polacek@redhat.com>
2008
2009 PR c/68062
2010 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
2011 to unsigned, if needed. Add -Wsign-compare warning.
2012
13f92e8d
JJ
20132016-01-26 Jakub Jelinek <jakub@redhat.com>
2014
2015 PR tree-optimization/69483
2016 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
2017
cd8e73dc 20182016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
2019
2020 PR c/24293
2021 * c-tree.h (incomplete_record_decls): Declare.
2022 * c-parser.c (incomplete_record_decls): Define.
2023 (c_parser_translation_unit): Iterate through incomplete_record_decls and
2024 report error if any decl has zero size.
2025 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
2026 or enum type to incomplete_record_decls.
2027
e6d6ec9e
TV
20282016-01-14 Tom de Vries <tom@codesourcery.com>
2029
2030 PR tree-optimization/68773
2031 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
2032 set force_output.
2033
00083992
MP
20342016-01-14 Marek Polacek <polacek@redhat.com>
2035
2036 PR c/69262
2037 * c-decl.c (grokdeclarator): Provide more information for invalid
2038 array declarations.
2039
7443cf13
DM
20402016-01-06 David Malcolm <dmalcolm@redhat.com>
2041
2042 * c-parser.c (c_parser_unary_expression): For dereferences, build
2043 a combined location before calling build_indirect_ref, so that
2044 error reports cover the full range, manually updating the c_expr
2045 src_range.
2046
6b131d5b
MP
20472016-01-06 Marek Polacek <polacek@redhat.com>
2048
2049 PR sanitizer/69099
2050 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
2051 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
2052 NULL.
2053
818ab71a
JJ
20542016-01-04 Jakub Jelinek <jakub@redhat.com>
2055
2056 Update copyright years.
2057
2fe0a208
MP
20582016-01-04 Marek Polacek <polacek@redhat.com>
2059
2060 PR c/68908
2061 * c-typeck.c (build_atomic_assign): Improve commentary. Add
2062 optimization to use __atomic_fetch_* built-in if possible.
2063
c7b48c8a
TS
20642015-12-23 Thomas Schwinge <thomas@codesourcery.com>
2065
2066 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
2067 into...
2068 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
2069 all users.
2070
fda5652f
MP
20712015-12-22 Marek Polacek <polacek@redhat.com>
2072
2073 PR c/69002
2074 * c-typeck.c (build_component_ref): Warn when acessing elements of
2075 atomic structures or unions.
2076
745e411d
DM
20772015-12-21 David Malcolm <dmalcolm@redhat.com>
2078
2079 * c-typeck.c: Include "gcc-rich-location.h".
2080 (build_binary_op): In the two places that call binary_op_error,
2081 create a gcc_rich_location and populate it with the location of
2082 the binary op and its two operands.
2083
94c40e19
DM
20842015-12-16 David Malcolm <dmalcolm@redhat.com>
2085
2086 * c-parser.c (c_parser_statement_after_labels): When calling
2087 c_finish_return, Use the return expression's location if it has
2088 one, falling back to the location of the first token within it.
2089 * c-typeck.c (c_finish_return): When issuing warnings about
2090 the incorrect presence/absence of a return value, issue a note
2091 showing the declaration of the function.
2092
de67c4c3
DM
20932015-12-16 David Malcolm <dmalcolm@redhat.com>
2094
2095 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
2096 to 4.
2097 (c_parser_peek_nth_token): New function.
2098 (c_parser_peek_conflict_marker): New function.
2099 (c_parser_error): Detect conflict markers and report them as such.
2100
a10704e1
DM
21012015-12-16 David Malcolm <dmalcolm@redhat.com>
2102
2103 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
2104 to preserve range information for the primary expression
2105 in the call to c_parser_postfix_expression_after_primary.
2106
8062bca6
DM
21072015-12-16 David Malcolm <dmalcolm@redhat.com>
2108
2109 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
2110 expression location, falling back on the first token location,
2111 rather than always using the latter.
2112
d06f8b75
MP
21132015-12-16 Marek Polacek <polacek@redhat.com>
2114
2115 PR c/64637
2116 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
2117 available.
2118
2994fb91
MP
21192015-12-15 Marek Polacek <polacek@redhat.com>
2120
2121 PR c/68907
2122 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
2123 artificial decl.
2124
a1b93f8d
DM
21252015-12-08 David Malcolm <dmalcolm@redhat.com>
2126
2127 * c-parser.c (c_parser_alignof_expression): Capture location of
2128 closing parenthesis (if any), or of end of unary expression, and
2129 use it to build a src_range for the expression.
2130
46c6e1e2
DM
21312015-12-08 David Malcolm <dmalcolm@redhat.com>
2132
2133 PR c/68757
2134 * c-parser.c (c_parser_get_builtin_args): Add
2135 "out_close_paren_loc" param, and write back to it.
2136 (c_parser_postfix_expression): Capture the closing
2137 parenthesis location for RID_CHOOSE_EXPR,
2138 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
2139 RID_BUILTIN_SHUFFLE and use it to set the source range
2140 for such expressions; within RID_BUILTIN_COMPLEX set
2141 the underlying location.
2142
66189108
MP
21432015-12-07 Marek Polacek <polacek@redhat.com>
2144
2145 PR c/68668
2146 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
2147 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
2148
f187980b
EB
21492015-12-04 Eric Botcazou <ebotcazou@adacore.com>
2150
2151 * c-tree.h (c_build_va_arg): Adjust prototype.
2152 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
2153 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
2154 parameter, adjust throughout and issue an error if EXPR is a component
2155 with reverse storage order.
2156
4250754e
JM
21572015-12-02 Jason Merrill <jason@redhat.com>
2158
2159 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
2160 (c_fully_fold_internal, decl_constant_value_for_optimization):
2161 Move from c-common.c.
2162 * c-tree.h: Declare decl_constant_value_for_optimization.
2163 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
2164
e9e32ee6
JM
21652015-12-02 Joseph Myers <joseph@codesourcery.com>
2166
2167 PR c/68162
2168 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
2169 following link from declarator to next declarator. Track original
2170 qualified type and pass it to c_build_qualified_type.
2171 * c-typeck.c (c_build_qualified_type): Add arguments
2172 orig_qual_type and orig_qual_indirect.
2173
ff7a55bf
TS
21742015-12-02 Thomas Schwinge <thomas@codesourcery.com>
2175
2176 * c-parser.c (c_parser_omp_clause_name)
2177 (c_parser_oacc_all_clauses): Alphabetical sorting.
2178
657e4e47
JJ
21792015-12-02 Jakub Jelinek <jakub@redhat.com>
2180
2181 PR c/68533
2182 * c-decl.c (get_parm_info): Use b->locus instead of input_location
2183 for diagnostics.
2184
37d5ad46
JB
21852015-12-01 Julian Brown <julian@codesourcery.com>
2186 Cesar Philippidis <cesar@codesourcery.com>
2187 James Norris <James_Norris@mentor.com>
2188
2189 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
2190 (c_parser_oacc_clause_use_device): New function.
2191 (c_parser_oacc_all_clauses): Add use_device support.
2192 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
2193 (c_parser_oacc_host_data): New function.
2194 (c_parser_omp_construct): Add host_data support.
2195 * c-tree.h (c_finish_oacc_host_data): Add prototype.
2196 * c-typeck.c (c_finish_oacc_host_data): New function.
2197 (c_finish_omp_clauses): Add use_device support.
2198
a4850ce9
JH
21992015-11-29 Jan Hubicka <hubicka@ucw.cz>
2200
2201 PR c/67106
2202 * c-decl.c: Set TYPE_PACKED in variants.
2203
b58d3df2
ML
22042015-11-27 Martin Liska <mliska@suse.cz>
2205
2206 PR c++/68312
2207 * c-array-notation.c (fix_builtin_array_notation_fn):
2208 Use release_vec_vec instead of vec::release.
2209 (build_array_notation_expr): Likewise.
2210 (fix_conditional_array_notations_1): Likewise.
2211 (fix_array_notation_expr): Likewise.
2212 (fix_array_notation_call_expr): Likewise.
2213
aec17bfe
JJ
22142015-11-27 Jakub Jelinek <jakub@redhat.com>
2215
2216 PR c/63326
2217 * c-parser.c (c_parser_compound_statement_nostart): If
2218 last_label is true, use pragma_stmt instead of pragma_compound
2219 as second c_parser_pragma argument.
2220 (c_parser_omp_ordered, c_parser_omp_target_update,
2221 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
2222 false as second argument to c_parser_skip_to_pragma_eol after
2223 diagnosing standalone directives used in pragma_stmt context.
2224
688c4de0
IV
22252015-11-24 Ilya Verbin <ilya.verbin@intel.com>
2226
2227 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
2228 with "if (ENABLE_OFFLOADING)".
2229
cbd03aee
DM
22302015-11-23 David Malcolm <dmalcolm@redhat.com>
2231
2232 PR objc/68438
2233 * c-parser.c (c_parser_postfix_expression): Set up source ranges
2234 for various Objective-C constructs: Class.name syntax,
2235 @selector(), @protocol(), @encode(), and [] message syntax.
2236
a87a86e1
DM
22372015-11-20 David Malcolm <dmalcolm@redhat.com>
2238
2239 PR 62314
2240 * c-typeck.c (should_suggest_deref_p): New function.
2241 (build_component_ref): Special-case POINTER_TYPE when
2242 generating a "not a structure of union" error message, and
2243 suggest a "->" rather than a ".", providing a fix-it hint.
2244
8ece8dfb
DM
22452015-11-19 David Malcolm <dmalcolm@redhat.com>
2246
2247 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
2248 candidate into a new function, find_closest_identifier.
2249
433068cc
MP
22502015-11-19 Marek Polacek <polacek@redhat.com>
2251
2252 PR c/68412
2253 * c-typeck.c (parser_build_binary_op): Properly handle
2254 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
2255
bef08b71
DM
22562015-11-17 David Malcolm <dmalcolm@redhat.com>
2257
2258 * c-parser.c (set_c_expr_source_range): Bulletproof both
2259 overloaded implementations against NULL expr->value.
2260 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
2261 values.
2262 (c_parser_unary_expression): Likewise when handling addresses of
2263 labels.
2264 (c_parser_postfix_expression): Likewise for statement expressions,
2265 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
2266 __builtin_va_arg, and for __builtin_offset_of.
2267 (c_parser_postfix_expression_after_paren_type): Initialize expr's
2268 src_range using the range of the braced initializer.
2269 (c_parser_transaction_expression): Set src_range for "ret" to a
2270 sane pair of values.
2271
fff77217
KY
22722015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
2273
2274 * c-parser.c (c_finish_omp_declare_simd): Look for
2275 "simd" attribute as well. Update error message.
2276
1d899da2
TS
22772015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2278
2279 * c-parser.c (c_parser_omp_declare_target): Adjust.
2280
e4606348
JJ
22812015-11-14 Jakub Jelinek <jakub@redhat.com>
2282
2283 * c-typeck.c (c_finish_omp_clauses): Don't mark
2284 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
2285
3e636daf
MP
22862015-11-14 Marek Polacek <polacek@redhat.com>
2287
2288 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
2289 * c-typeck.c: Likewise.
2290
ebedc9a3
DM
22912015-11-13 David Malcolm <dmalcolm@redhat.com>
2292
2293 * c-decl.c (warn_defaults_to): Pass line_table to
2294 rich_location ctor.
2295 * c-errors.c (pedwarn_c99): Likewise.
2296 (pedwarn_c90): Likewise.
2297 * c-parser.c (set_c_expr_source_range): New functions.
2298 (c_token::get_range): New method.
2299 (c_token::get_finish): New method.
2300 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
2301 based on the range from the start of the LHS to the end of the
2302 RHS.
2303 (c_parser_conditional_expression): Likewise, based on the range
2304 from the start of the cond.value to the end of exp2.value.
2305 (c_parser_binary_expression): Call set_c_expr_source_range on
2306 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
2307 (c_parser_cast_expression): Call set_c_expr_source_range on ret
2308 based on the cast_loc through to the end of the expr.
2309 (c_parser_unary_expression): Likewise, based on the
2310 op_loc through to the end of op.
2311 (c_parser_sizeof_expression) Likewise, based on the start of the
2312 sizeof token through to either the closing paren or the end of
2313 expr.
2314 (c_parser_postfix_expression): Likewise, using the token range,
2315 or from the open paren through to the close paren for
2316 parenthesized expressions.
2317 (c_parser_postfix_expression_after_primary): Likewise, for
2318 various kinds of expression.
2319 * c-tree.h (struct c_expr): Add field "src_range".
2320 (c_expr::get_start): New method.
2321 (c_expr::get_finish): New method.
2322 (set_c_expr_source_range): New decls.
2323 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
2324 on ret for prefix unary ops.
2325 (parser_build_binary_op): Likewise, running from the start of
2326 arg1.value through to the end of arg2.value.
2327
ec8b536f
MP
23282015-11-13 Marek Polacek <polacek@redhat.com>
2329
2330 PR c/68320
2331 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
2332
277fe616
DM
23332015-11-13 David Malcolm <dmalcolm@redhat.com>
2334
2335 * c-typeck.c: Include spellcheck.h.
2336 (lookup_field_fuzzy_find_candidates): New function.
2337 (lookup_field_fuzzy): New function.
2338 (build_component_ref): If the field was not found, try using
2339 lookup_field_fuzzy and potentially offer a suggestion.
2340
6e232ba4
JN
23412015-11-12 James Norris <jnorris@codesourcery.com>
2342 Joseph Myers <joseph@codesourcery.com>
2343
2344 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
2345 (c_parser_omp_clause_name): Handle 'device_resident' clause.
2346 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
2347 and PRAGMA_OMP_CLAUSE_LINK.
2348 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
2349 and PRAGMA_OACC_CLAUSE_LINK.
2350 (OACC_DECLARE_CLAUSE_MASK): New definition.
2351 (c_parser_oacc_declare): New function.
2352
9be4f715
MP
23532015-11-12 Marek Polacek <polacek@redhat.com>
2354
2355 PR c/67784
2356 * c-parser.c (c_parser_for_statement): Reclassify the token in
2357 a correct scope.
2358
e78bede6
MP
23592015-11-11 Marek Polacek <polacek@redhat.com>
2360
2361 PR c/68107
2362 PR c++/68266
2363 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
2364 checking the size of an array.
2365
69f293c9
AM
23662015-11-11 Andrew MacLeod <amacleod@redhat.com>
2367
2368 * c-array-notation.c: Remove unused header files.
2369 * c-aux-info.c: Likewise.
2370 * c-convert.c: Likewise.
2371 * c-decl.c: Likewise.
2372 * c-errors.c: Likewise.
2373 * c-lang.c: Likewise.
2374 * c-objc-common.c: Likewise.
2375 * c-parser.c: Likewise.
2376 * c-typeck.c: Likewise.
2377 * gccspec.c: Likewise.
2378
3a40d81d
NS
23792015-11-09 Thomas Schwinge <thomas@codesourcery.com>
2380 Cesar Philippidis <cesar@codesourcery.com>
2381 James Norris <jnorris@codesourcery.com>
2382 Julian Brown <julian@codesourcery.com>
2383 Nathan Sidwell <nathan@codesourcery.com>
2384
2385 c/
2386 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
2387 routine arg.
2388 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
2389 (c_parser_pragma): Parse 'acc routine'.
2390 (OACC_ROUTINE_CLAUSE_MARK): Define.
2391 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
2392
fc402eec
AA
23932015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
2394
2395 PR debug/67192
2396 * c-typeck.c (c_finish_loop): For unconditional loops, set the
2397 location of the backward-goto to the start of the loop body.
2398
f6b0b3db
AA
23992015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
2400
2401 PR debug/67192
2402 * c-parser.c (c_parser_while_statement): Finish the loop before
2403 parsing ahead for misleading indentation.
2404 (c_parser_for_statement): Likewise.
2405
ee45a32d
EB
24062015-11-08 Eric Botcazou <ebotcazou@adacore.com>
2407
2408 * c-decl.c (finish_struct): If the structure has reverse storage
2409 order, rewrite the type of array fields with scalar component. Call
2410 maybe_apply_pragma_scalar_storage_order on entry.
2411 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
2412 errors on bit-fields and reverse SSO here and not...
2413 (c_mark_addressable): ...here.
2414 (output_init_element): Adjust call to initializer_constant_valid_p.
2415 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
2416
8a645150
DM
24172015-11-06 David Malcolm <dmalcolm@redhat.com>
2418
2419 * c-decl.c (warn_defaults_to): Update for change in signature
2420 of diagnostic_set_info.
2421 * c-errors.c (pedwarn_c99): Likewise.
2422 (pedwarn_c90): Likewise.
2423 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
2424 for textinfo::set_location.
2425
7a5e4956
CP
24262015-11-05 Cesar Philippidis <cesar@codesourcery.com>
2427 Thomas Schwinge <thomas@codesourcery.com>
2428 James Norris <jnorris@codesourcery.com>
2429
2430 * c-parser.c (c_parser_omp_clause_name): Add support for
2431 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
2432 (c_parser_omp_clause_default): Add is_oacc argument. Handle
2433 default(none) in OpenACC.
2434 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
2435 arguments.
2436 (c_parser_oacc_clause_tile): New function.
2437 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
2438 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
2439 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
2440 TILE}.
2441 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
2442 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
2443 FIRSTPRIVATE}.
2444 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
2445 (c_parser_oacc_update): Update the error message for missing clauses.
2446 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
2447 and OMP_CLAUSE_INDEPENDENT.
2448
bfcfbfa0
MP
24492015-11-05 Marek Polacek <polacek@redhat.com>
2450
2451 PR c/68090
2452 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
2453 deal with pre-evaluation on invalid types.
2454
e01d41e5
JJ
24552015-11-05 Jakub Jelinek <jakub@redhat.com>
2456 Ilya Verbin <ilya.verbin@intel.com>
2457
2458 * c-parser.c: Include context.h and gimple-expr.h.
2459 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
2460 monotonic together with nonmonotonic.
2461 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
2462 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
2463 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
2464 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
2465 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
2466 expressions on combined target teams before the target.
2467 (c_parser_omp_declare_target): If decl has "omp declare target" or
2468 "omp declare target link" attribute, and cgraph or varpool node already
2469 exists, then set corresponding flags. Call c_finish_omp_clauses
2470 in the parenthesized extended-list syntax case.
2471 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
2472 declare target.
2473 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
2474 on OMP_CLAUSE_REDUCTION array sections.
2475 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
2476 into the constant offset, or for variable low-bound using
2477 POINTER_PLUS_EXPR. For structure element based array sections use
2478 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
2479 (c_finish_omp_clauses): Drop generic_field_head, structure
2480 elements are now always mapped even as array section bases,
2481 diagnose same var in data sharing and mapping clauses. Diagnose if
2482 linear step on declare simd is neither a constant nor a uniform
2483 parameter. Look through POINTER_PLUS_EXPR for array section
2484 reductions. Diagnose the same var or function appearing multiple
2485 times on the same directive. Fix up wording for the to clause if t
2486 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
2487 modifier on kinds other than dynamic or guided or nonmonotonic
2488 modifier together with ordered clause.
2489
4bf9e5a8
TS
24902015-11-03 Thomas Schwinge <thomas@codesourcery.com>
2491 Chung-Lin Tang <cltang@codesourcery.com>
2492
2493 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
2494
2adfab87
AM
24952015-10-29 Andrew MacLeod <amacleod@redhat.com>
2496
2497 * c-array-notation.c: Reorder #include's and remove duplicates.
2498 * c-aux-info.c: Likewise.
2499 * c-convert.c: Likewise.
2500 * c-decl.c: Likewise.
2501 * c-errors.c: Likewise.
2502 * c-lang.c: Likewise.
2503 * c-objc-common.c: Likewise.
2504 * c-parser.c: Likewise.
2505 * c-typeck.c: Likewise.
2506
e922069e
JW
25072015-10-26 Jim Wilson <jim.wilson@linaro.org>
2508
2509 PR debug/66068
2510 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
2511 after calling build_qualified_type.
2512
765dd391
CP
25132015-10-27 Cesar Philippidis <cesar@codesourcery.com>
2514 Thomas Schwinge <thomas@codesourcery.com>
2515 James Norris <jnorris@codesourcery.com>
2516 Joseph Myers <joseph@codesourcery.com>
2517 Julian Brown <julian@codesourcery.com>
2518 Bernd Schmidt <bschmidt@redhat.com>
2519
2520 * c-parser.c (c_parser_oacc_shape_clause): New.
2521 (c_parser_oacc_simple_clause): New.
2522 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
2523 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
2524
88bae6f4
TS
25252015-10-27 Thomas Schwinge <thomas@codesourcery.com>
2526 James Norris <jnorris@codesourcery.com>
2527 Cesar Philippidis <cesar@codesourcery.com>
2528
2529 PR c/64765
2530 PR c/64880
2531 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
2532 parameters, and handle these. Adjust all users.
2533 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
2534 into...
2535 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
2536 all users.
2537 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
2538 declare functions.
2539 (c_finish_omp_construct): Declare function.
2540 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
2541 Merge functions into...
2542 (c_finish_omp_construct): ... this new function.
2543
a8fc2579
RB
25442015-10-22 Richard Biener <rguenther@suse.de>
2545
2546 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
2547 before folding a MINUS_EXPR.
2548
e9122ef6
MP
25492015-10-21 Marek Polacek <polacek@redhat.com>
2550
2551 PR c/68024
2552 * c-decl.c (start_function): Warn about vararg functions without
2553 a prototype.
2554
9f47c7e5
IE
25552015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
2556
2557 * c-typeck.c (build_conditional_expr): Use boolean vector
2558 type for vector comparison.
2559 (build_vec_cmp): New.
2560 (build_binary_op): Use build_vec_cmp for comparison.
2561
fa60eeb9
MP
25622015-10-20 Marek Polacek <polacek@redhat.com>
2563
2564 * c-parser.c (is_cilkplus_vector_p): Don't define here.
2565
2c7020eb
MP
25662015-10-20 Marek Polacek <polacek@redhat.com>
2567
2568 PR c/67964
2569 * c-parser.c (c_parser_attributes): Break out of the loop if the
2570 token after an attribute isn't a comma.
2571
d9a6bd32
JJ
25722015-10-13 Jakub Jelinek <jakub@redhat.com>
2573 Aldy Hernandez <aldyh@redhat.com>
2574
2575 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
2576 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
2577 (c_parser_omp_variable_list): Handle structure elements for
2578 map, to and from clauses. Handle array sections in reduction
2579 clause. Formatting fixes.
2580 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
2581 if clause modifiers.
2582 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
2583 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
2584 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
2585 c_parser_omp_clause_is_device_ptr): New functions.
2586 (c_parser_omp_clause_ordered): Parse optional parameter.
2587 (c_parser_omp_clause_reduction): Handle array reductions.
2588 (c_parser_omp_clause_schedule): Parse optional simd modifier.
2589 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
2590 functions.
2591 (c_parser_omp_clause_linear): Parse linear clause modifiers.
2592 (c_parser_omp_clause_depend_sink): New function.
2593 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
2594 (c_parser_omp_clause_map): Parse release/delete map kinds and
2595 optional always modifier.
2596 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
2597 and c_finish_omp_clauses callers.
2598 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
2599 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
2600 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
2601 (OMP_CRITICAL_CLAUSE_MASK): Define.
2602 (c_parser_omp_critical): Parse critical clauses.
2603 (c_parser_omp_for_loop): Handle doacross loops, adjust
2604 c_finish_omp_for and c_finish_omp_clauses callers.
2605 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
2606 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
2607 (OMP_FOR_CLAUSE_MASK): Add linear clause.
2608 (c_parser_omp_for): Disallow ordered clause when combined with
2609 distribute. Disallow linear clause when combined with distribute
2610 and not combined with simd.
2611 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
2612 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
2613 parse clauses and if depend clause is found, don't parse a body.
2614 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
2615 Allow target parallel without for after it.
2616 (OMP_TASK_CLAUSE_MASK): Add priority clause.
2617 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
2618 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
2619 invalid kinds.
2620 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
2621 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
2622 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
2623 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
2624 functions.
2625 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
2626 defaultmap and is_device_ptr clauses.
2627 (c_parser_omp_target): Parse target parallel and target simd. Set
2628 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
2629 and target exit data. Diagnose invalid map kinds.
2630 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
2631 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
2632 construct.
2633 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
2634 &omp_priv.
2635 (OMP_TASKLOOP_CLAUSE_MASK): Define.
2636 (c_parser_omp_taskloop): New function.
2637 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
2638 handle PRAGMA_OMP_TASKLOOP.
2639 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
2640 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
2641 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
2642 Add IS_OMP argument, handle structure element bases, diagnose
2643 bitfields, pass IS_OMP recursively, diagnose known zero length
2644 array sections in depend clauses, handle array sections in reduction
2645 clause, diagnose negative length even for pointers.
2646 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
2647 types, pass IS_OMP down to handle_omp_array_sections_1, handle
2648 array sections in reduction clause, set
2649 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
2650 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
2651 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
2652 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
2653
21ba0cea
MP
26542015-10-06 Marek Polacek <polacek@redhat.com>
2655
2656 * c-parser.c (c_parser_statement_after_labels): Use
2657 protected_set_expr_location.
2658 (c_parser_omp_clause_num_gangs): Likewise.
2659 (c_parser_omp_clause_num_threads): Likewise.
2660 (c_parser_omp_clause_num_workers): Likewise.
2661 (c_parser_omp_clause_vector_length): Likewise.
2662 (c_parser_omp_clause_num_teams): Likewise.
2663 (c_parser_omp_clause_thread_limit): Likewise.
2664 * c-typeck.c (build_c_cast): Likewise.
2665 (c_cast_expr): Likewise.
2666
624d31fe
RS
26672015-10-05 Richard Sandiford <richard.sandiford@arm.com>
2668
2669 * c-typeck.c (c_tree_equal): Use real_equal instead of
2670 REAL_VALUES_EQUAL.
2671
b8fd7909
JM
26722015-10-04 Jason Merrill <jason@redhat.com>
2673
2674 * c-parser.c (c_lex_one_token): Handle @synchronized.
2675 * c-decl.c (match_builtin_function_types): A declaration of a built-in
2676 can change whether the function is transaction_safe.
2677
1c7485af
MP
26782015-10-02 Marek Polacek <polacek@redhat.com>
2679
2680 PR c/67730
2681 * c-typeck.c (convert_for_assignment): Use the expansion point
2682 location throughout.
2683
3e3b8d63
MP
26842015-10-02 Marek Polacek <polacek@redhat.com>
2685
2686 PR c/64249
2687 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
2688 and pass it down to c_parser_if_statement.
2689 (c_parser_else_body): Add CHAIN parameter and pass it down to
2690 c_parser_statement_after_labels.
2691 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
2692 duplicated if-else-if conditions.
2693
aabef2de
MP
26942015-10-01 Marek Polacek <polacek@redhat.com>
2695
2696 * c-typeck.c (convert_for_assignment): Improve commentary.
2697
de8ddd5f
MP
26982015-09-30 Marek Polacek <polacek@redhat.com>
2699
2700 PR c/67730
2701 * c-typeck.c (c_finish_return): Use the expansion point location for
2702 certain "return with value" warnings.
2703
c4914de6
MLI
27042015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
2705
2706 * c-parser.c (pragma_lex): Add loc argument.
2707
0e36f5c7
MP
27082015-09-15 Marek Polacek <polacek@redhat.com>
2709
2710 PR c/67580
2711 * c-decl.c (tag_exists_p): New function.
2712 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
2713 struct/union/enum keywords are missing.
2714 * c-tree.h (tag_exists_p): Declare.
2715
2f3bb934
MP
27162015-09-15 Marek Polacek <polacek@redhat.com>
2717
2718 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
2719 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
2720 Return NULL_TREE instead of 0.
2721 (lookup_name): Return NULL_TREE instead of 0.
2722 (lookup_name_in_scope): Likewise.
2723 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
2724 (parser_xref_tag): Use false instead of 0.
2725 (start_struct): Use true instead of 1.
2726 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
2727
aa256c4a
MP
27282015-09-14 Marek Polacek <polacek@redhat.com>
2729
2730 * c-typeck.c (set_nonincremental_init_from_string): Use
2731 HOST_WIDE_INT_M1U when shifting a negative value.
2732
dbb68221
MW
27332015-09-09 Mark Wielaard <mjw@redhat.com>
2734
2735 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
2736 parm against NULL.
2737
a8a098ac
JJ
27382015-09-10 Jakub Jelinek <jakub@redhat.com>
2739
2740 PR c/67502
2741 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
2742 into OMP_FOR_PRE_BODY rather than before the loop.
2743
f4b189d5
JJ
27442015-09-09 Jakub Jelinek <jakub@redhat.com>
2745
0bb99c11
JJ
2746 PR c/67501
2747 * c-parser.c (c_parser_oacc_all_clauses,
2748 c_parser_omp_all_clauses): Remove invalid clause from
2749 list of clauses even if parser->error is set.
2750
fce5e5e3
JJ
2751 PR c/67500
2752 * c-parser.c (c_parser_omp_clause_aligned,
2753 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
2754 test for errors.
2755 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
2756 error_mark_node.
2757
f4b189d5
JJ
2758 PR c/67495
2759 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
2760 instead of c_parser_unary_expression. If the result is !lvalue_p,
2761 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
2762
b2aaf235
MP
27632015-09-04 Marek Polacek <polacek@redhat.com>
2764
2765 PR sanitizer/67279
2766 * c-typeck.c (build_binary_op): Don't instrument static initializers.
2767
1807ffc1
MS
27682015-09-03 Martin Sebor <msebor@redhat.com>
2769
2770 PR c/66516
8b652e65
JJ
2771 * c-typeck.c (convert_arguments, parser_build_unary_op,
2772 build_conditional_expr, c_cast_expr, convert_for_assignment,
2773 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
2774 reject_gcc_builtin.
2775 (c_decl_implicit): Define.
2776
d04ff417
MP
27772015-09-02 Marek Polacek <polacek@redhat.com>
2778
2779 PR c/67432
2780 * c-parser.c (c_parser_enum_specifier): Give a better error for
2781 an empty enum.
2782
a79683d5
TS
27832015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
2784
2785 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
2786
191a6b94
MP
27872015-08-12 Marek Polacek <polacek@redhat.com>
2788
2789 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
2790 LOC to it.
2791
420a9d9b
MP
27922015-08-03 Marek Polacek <polacek@redhat.com>
2793
2794 PR c/67088
2795 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
2796 Use it.
2797 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
2798
992118a1
PP
27992015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
2800
2801 * c-parser.c (c_parser_if_body): Take token_indent_info
2802 argument. Call warn_for_misleading_indentation even when the
2803 body is a semicolon. Extract token_indent_infos corresponding
2804 to the guard, body and next tokens. Adjust call to
2805 warn_for_misleading_indentation accordingly.
2806 (c_parser_else_body): Likewise.
2807 (c_parser_if_statement): Likewise.
2808 (c_parser_while_statement): Likewise.
2809 (c_parser_for_statement): Likewise.
2810
46308474
LFSM
28112015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
2812 Manuel López-Ibáñez <manu@gcc.gnu.org>
2813
2814 * c-decl.c (get_parm_info): Remove static var. Update warning
2815 message.
2816
05b28fd6
MP
28172015-07-27 Marek Polacek <polacek@redhat.com>
2818
2819 PR c++/66555
2820 PR c/54979
2821 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
2822
451b5e48
MP
28232015-07-20 Marek Polacek <polacek@redhat.com>
2824
2825 PR c++/55095
2826 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
2827 (build_binary_op): Warn about left shift overflows.
2828
1916bcb5
AM
28292015-07-09 Andrew MacLeod <amacleod@redhat.com>
2830
2831 * c-array-notation.c: Adjust includes for flags.h changes.
2832 * c-objc-common.c: Likewise.
2833
c7131fb2
AM
28342015-07-07 Andrew MacLeod <amacleod@redhat.com>
2835
2836 * c-array-notation.c: Adjust includes.
2837 * c-aux-info.c: Likewise.
2838 * c-convert.c: Likewise.
2839 * c-decl.c: Likewise.
2840 * c-errors.c: Likewise.
2841 * c-lang.c: Likewise.
2842 * c-objc-common.c: Likewise.
2843 * c-parser.c: Likewise.
2844 * c-typeck.c: Likewise.
2845
da2e71c9
MLI
28462015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
2847
2848 PR fortran/66605
2849 * c-decl.c (finish_function): Call do_warn_unused_parameter.
2850
b155cfd9
MP
28512015-06-29 Marek Polacek <polacek@redhat.com>
2852
2853 PR c/66322
2854 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
2855 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
2856 about -Wswitch-bool here.
2857 (do_case): Update c_add_case_label call.
2858 (c_finish_case): Update c_do_switch_warnings call.
2859
31521951
MP
28602015-06-27 Marek Polacek <polacek@redhat.com>
2861
2862 * c-typeck.c: Use VECTOR_TYPE_P throughout.
2863
22d03525
MP
28642015-06-26 Marek Polacek <polacek@redhat.com>
2865
2866 * c-array-notation.c (fix_builtin_array_notation_fn): Use
2867 INDIRECT_REF_P.
2868 * c-typeck.c (array_to_pointer_conversion): Likewise.
2869 (build_unary_op): Likewise.
2870 (c_finish_return): Likewise.
2871
f0889939
AM
28722015-06-25 Andrew MacLeod <amacleod@redhat.com>
2873
2874 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
2875 * c-parser.c: Likewise.
2876
8d67ee55
RS
28772015-06-25 Richard Sandiford <richard.sandiford@arm.com>
2878
2879 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
2880 instead of pointer_hash.
2881 (detect_field_duplicates): Likewise.
2882
0ae9bd27
MP
28832015-06-25 Marek Polacek <polacek@redhat.com>
2884
2885 * c-array-notation.c: Use VAR_P throughout.
2886 * c-decl.c: Likewise.
2887 * c-objc-common.c: Likewise.
2888 * c-parser.c: Likewise.
2889 * c-typeck.c: Likewise.
2890
62f9079a
MP
28912015-06-25 Marek Polacek <polacek@redhat.com>
2892
2893 * c-decl.c: Use is_global_var throughout.
2894 * c-parser.c: Likewise.
2895 * c-typeck.c: Likewise.
2896
abb226c9
AM
28972015-06-17 Andrew MacLeod <amacleod@redhat.com>
2898
2899 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
2900 * c-aux-info.c: Likewise.
2901 * c-convert.c: Likewise.
2902 * c-decl.c: Likewise.
2903 * c-errors.c: Likewise.
2904 * c-lang.c: Likewise.
2905 * c-objc-common.c: Likewise.
2906 * c-parser.c: Likewise.
2907 * c-typeck.c: Likewise.
2908
8cbababc
JH
29092015-06-11 Jan Hubicka <hubicka@ucw.cz>
2910
2911 PR middle-end/66325
2912 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
2913 variants.
2914
a0349665
PMR
29152015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
2916
2917 * c-decl.c (pop_scope): Register the main translation unit
2918 through the new debug hook.
2919
13fdf2e2
AM
29202015-06-08 Andrew MacLeod <amacleod@redhat.com>
2921
2922 * c-array-notation.c : Adjust include files.
2923 * c-aux-info.c : Likewise.
2924 * c-convert.c : Likewise.
2925 * c-decl.c : Likewise.
2926 * c-errors.c : Likewise.
2927 * c-lang.c : Likewise.
2928 * c-lang.h : Likewise.
2929 * c-objc-common.c : Likewise.
2930 * c-parser.c : Likewise.
2931 * c-typeck.c : Likewise.
2932
d7438551
AH
29332015-06-05 Aldy Hernandez <aldyh@redhat.com>
2934
2935 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
2936 immediately clobber it.
2937 (c_write_global_declarations_1): Remove call to
2938 check_global_declaration_1.
2939 (c_write_global_declarations_2): Remove.
2940 (c_write_final_cleanups): Rename from c_write_global_declarations.
2941 Remove call to finalize_compilation_unit.
2942 Remove calls to debugging hooks.
2943 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
2944 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
2945 * c-tree.h: Remove c_write_global_declarations.
2946
ecb9f223
AM
29472015-06-04 Andrew MacLeod <amacleod@redhat.com>
2948
2949 * c-array-notation.c: Adjust includes for restructured coretypes.h.
2950 * c-aux-info.c: Likewise.
2951 * c-convert.c: Likewise.
2952 * c-decl.c: Likewise.
2953 * c-errors.c: Likewise.
2954 * c-lang.c: Likewise.
2955 * c-objc-common.c: Likewise.
2956 * c-parser.c: Likewise.
2957 * c-typeck.c: Likewise.
2958
9482b620
MP
29592015-06-04 Marek Polacek <polacek@redhat.com>
2960
2961 PR c/66341
2962 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
2963 it is a lvalue.
2964
bc51ace3
PK
29652015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2966
2967 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
2968 Warn for empty struct.
2969 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
2970
ea5b45b6
AT
29712015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
2972
2973 * c-decl.c (start_function): Call plugin before parsing.
2974 (finish_function): Call plugin after parsing.
2975
c2d47482
PK
29762015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2977
2978 PR c/49551
2979 * c-decl.c (merge_decls): Merge DECL_COMMON.
2980
a95492ab
JW
29812015-05-22 Jim Wilson <jim.wilson@linaro.org>
2982
2983 * Make-lang.in (check_gcc_pallelize): Define.
2984
fd5c817a
MP
29852015-05-22 Marek Polacek <polacek@redhat.com>
2986
2987 PR c/47043
2988 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
2989 attributes.
2990
c7b70a3c
MP
29912015-05-21 Marek Polacek <polacek@redhat.com>
2992
2993 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
2994 DECL_BUILT_IN.
2995
21b634ae
MP
29962015-05-20 Marek Polacek <polacek@redhat.com>
2997
2998 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
2999 * c-typeck.c: Likewise.
3000
296a8c2f
MP
30012015-05-19 Marek Polacek <polacek@redhat.com>
3002
3003 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
3004
41b37d5e
JJ
30052015-05-19 Jakub Jelinek <jakub@redhat.com>
3006
3007 PR middle-end/66199
3008 * c-parser.c (c_parser_omp_for_loop): Don't add
3009 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
3010 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
3011 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
3012 constructs.
3013
fab27f52
MM
30142015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
3015
3016 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 3017 swaps.
fab27f52 3018
40de31cf
MLI
30192015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
3020
3021 PR fortran/44054
3022 * c-objc-common.c (c_tree_printer): Replace locus pointer with
3023 accessor function.
3024
3aa3c9fc
MP
30252015-05-14 Marek Polacek <polacek@redhat.com>
3026
3027 PR c/66066
3028 PR c/66127
3029 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
3030 rather than with 0.
3031
c3388e62
DM
30322015-05-12 David Malcolm <dmalcolm@redhat.com>
3033
3034 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
3035 to add a call to warn_for_misleading_indentation.
3036 (c_parser_else_body): Likewise, adding param "else_loc".
3037 (c_parser_if_statement): Check for misleading indentation.
3038 (c_parser_while_statement): Likewise.
3039 (c_parser_for_statement): Likewise.
3040
755e528f
MP
30412015-05-08 Marek Polacek <polacek@redhat.com>
3042
3043 PR c/64918
3044 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
3045 (output_init_element): Likewise.
3046
0173bd2a
MP
30472015-05-07 Marek Polacek <polacek@redhat.com>
3048
3049 PR c/65179
3050 * c-typeck.c (build_binary_op): Warn when left shifting a negative
3051 value.
3052
9babc352
MP
30532015-04-30 Marek Polacek <polacek@redhat.com>
3054
3055 * c-typeck.c (set_init_label): Call error_at instead of error and
3056 pass LOC to it.
3057
ac9f18db
MP
3058 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
3059 the type of a decl.
3060
ec3fba51
MP
3061 * c-typeck.c (c_build_va_arg): Clarify the error message.
3062
b811915d
TS
30632015-04-29 Thomas Schwinge <thomas@codesourcery.com>
3064
3065 * c-parser.c (c_parser_oacc_enter_exit_data): Use
3066 OMP_STANDALONE_CLAUSES.
3067
f3075008
MP
30682015-04-28 Marek Polacek <polacek@redhat.com>
3069
3070 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
3071
4e81b788
MP
30722015-04-28 Marek Polacek <polacek@redhat.com>
3073
3074 PR c/65901
3075 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
3076
6c1db78e
MP
30772015-04-25 Marek Polacek <polacek@redhat.com>
3078
3079 PR c/52085
3080 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
3081 attribute.
3082
5c4abbb8
MP
30832015-04-23 Marek Polacek <polacek@redhat.com>
3084
3085 PR c/65345
3086 * c-decl.c (set_labels_context_r): New function.
3087 (store_parm_decls): Call it via walk_tree_without_duplicates.
3088 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
3089 instead of create_tmp_var. Build TARGET_EXPR instead of
3090 COMPOUND_EXPR.
3091 (build_atomic_assign): Use create_tmp_var_raw instead of
3092 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
3093
06aca1d5
IV
30942015-04-20 Ilya Verbin <ilya.verbin@intel.com>
3095
3096 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
3097 (c_parser_omp_target_update): Add missed %> to error_at ().
3098
8fba1830
BRF
30992015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
3100
3101 PR target/55143
3102 * c-decl.c (c_default_pointer_mode): Remove definition.
3103 * c-tree.h (c_default_pointer_mode): Remove declaration.
3104
62021f64
TB
31052015-03-27 Tobias Burnus <burnus@net-b.de>
3106
3107 PR c/65586
3108 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
3109 error out.
3110 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
3111 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
3112 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
3113
9b65e171
JJ
31142015-03-19 Jakub Jelinek <jakub@redhat.com>
3115
3116 * c-decl.c (c_decl_attributes): Also add "omp declare target"
3117 attribute for DECL_EXTERNAL VAR_DECLs.
3118
17958621
JJ
31192015-03-11 Jakub Jelinek <jakub@redhat.com>
3120
3121 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
3122 argument.
3123
7ccb1a11
JJ
31242015-03-10 Jakub Jelinek <jakub@redhat.com>
3125
3126 PR c/65120
3127 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
3128 before preparing arguments to warn_logical_not_parentheses.
3129
01177669
JJ
31302015-03-09 Jakub Jelinek <jakub@redhat.com>
3131
3132 PR c/65120
3133 * c-typeck.c (parser_build_binary_op): Don't warn for
3134 !!x == y or !b == y where b is _Bool.
3135
802ac282
MP
31362015-03-09 Marek Polacek <polacek@redhat.com>
3137
3138 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
3139 * c-decl.c (grokdeclarator): Likewise.
3140 * c-typeck.c (build_binary_op): Likewise.
3141
e5165b60
MP
31422015-02-27 Marek Polacek <polacek@redhat.com>
3143
3144 PR c/65228
3145 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
3146
065d214c
MP
31472015-02-14 Marek Polacek <polacek@redhat.com>
3148
3149 PR c/64768
3150 * c-decl.c (grokdeclarator): Set the range of a flexible array member
3151 declared through a typedef name.
3152
e5d9235b
MP
31532015-02-13 Marek Polacek <polacek@redhat.com>
3154
3155 PR c/65050
3156 * c-decl.c (grokdeclarator): Print also the type when giving
3157 the error message about array's incomplete element type.
3158
fa01ffcc
JJ
31592015-02-11 Jakub Jelinek <jakub@redhat.com>
3160
3161 PR c/64824
3162 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
3163 check in the POP macro.
3164
c3e38a03
MP
31652015-02-09 Marek Polacek <polacek@redhat.com>
3166
3167 PR c/64856
3168 * c-typeck.c (process_init_element): Don't always wrap
3169 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
3170 initializing a range of elements.
3171
4886ec8e
JJ
31722015-02-04 Jakub Jelinek <jakub@redhat.com>
3173
3174 PR c/64824
3175 PR c/64868
3176 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
3177
c3e38a03 31782015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
3179
3180 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
3181 processing enum declaration.
3182
7b33f0c8
MP
31832015-01-29 Marek Polacek <polacek@redhat.com>
3184
3185 PR c/64709
3186 * c-typeck.c (pop_init_level): If constructor_elements has
3187 exactly one element with integer_zerop value, set constructor_zeroinit
3188 to 1. Remove braces around warning_init call.
3189
dea63e49
JJ
31902015-01-27 Jakub Jelinek <jakub@redhat.com>
3191
3192 PR c/64766
3193 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
3194 of FUNCTION_DECLs with error_mark_node.
3195
d38f7dce
JJ
31962015-01-26 Jakub Jelinek <jakub@redhat.com>
3197
3198 PR c/64778
3199 * c-typeck.c (convert_arguments): Return -1 if there are
3200 error_args, even if we've diagnosed too many arguments.
3201
cbf5d0e7
RB
32022015-01-21 Richard Biener <rguenther@suse.de>
3203
3204 PR middle-end/64313
3205 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
3206 for builtins the user declared correctly.
3207
41dbbb37
TS
32082015-01-15 Thomas Schwinge <thomas@codesourcery.com>
3209 Bernd Schmidt <bernds@codesourcery.com>
3210 Cesar Philippidis <cesar@codesourcery.com>
3211 James Norris <jnorris@codesourcery.com>
3212 Jakub Jelinek <jakub@redhat.com>
3213 Ilmir Usmanov <i.usmanov@samsung.com>
3214
3215 * c-parser.c: Include "gomp-constants.h".
3216 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
3217 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
3218 Use OMP_CLAUSE_SET_MAP_KIND.
3219 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
3220 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
3221 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
3222 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
3223 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
3224 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
3225 "copyout", "create", "delete", "deviceptr", "gang", "host",
3226 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
3227 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
3228 "present_or_create", "pcreate", "seq", "self", "vector",
3229 "vector_length", "wait", "worker".
3230 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
3231 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
3232 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
3233 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
3234 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
3235 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
3236 (c_parser_oacc_data_clause_deviceptr)
3237 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
3238 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
3239 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
3240 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
3241 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
3242 (c_parser_oacc_parallel, c_parser_oacc_update)
3243 (c_parser_oacc_wait): New functions.
3244 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
3245 (c_finish_oacc_data): New prototypes.
3246 * c-typeck.c: Include "gomp-constants.h".
3247 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
3248 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
3249 OMP_CLAUSE_SET_MAP_KIND.
3250 (c_finish_oacc_parallel, c_finish_oacc_kernels)
3251 (c_finish_oacc_data): New functions.
3252 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
3253 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
3254 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
3255 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
3256 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
3257 GOMP_MAP_FORCE_DEVICEPTR.
3258
adfac8df
JJ
32592015-01-09 Michael Collison <michael.collison@linaro.org>
3260
3261 * c-array-notation.c: Include hash-set.h, machmode.h,
3262 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3263 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
3264 * c-aux-info.c: Ditto.
3265 * c-convert.c: Ditto.
3266 * c-decl.c: Ditto.
3267 * c-errors.c: Ditto.
3268 * c-lang.c: Dittoxs.
3269 * c-objc-common.c: Ditto.
3270 * c-parser.c: Ditto.
3271 * c-typeck.c: Include hash-set.h, machmode.h,
3272 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3273 fold-const.h, wide-int.h, inchash.h, real.h and
3274 fixed-value.h due to flattening of tree.h.
3275
2cc901dc
MP
32762015-01-07 Marek Polacek <polacek@redhat.com>
3277
3278 PR c/64417
3279 * c-typeck.c (process_init_element): Disallow initialization of
3280 a flexible array member with a string constant if the structure
3281 is in an array.
3282
5624e564
JJ
32832015-01-05 Jakub Jelinek <jakub@redhat.com>
3284
e5341100
JJ
3285 PR sanitizer/64344
3286 * c-typeck.c (convert_for_assignment, c_finish_return): For
3287 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
3288 types also set in_late_binary_op around convert call.
3289 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
3290 to integral type casts, if not in_late_binary_op, pass c_fully_fold
3291 result on expr as last argument to ubsan_instrument_float_cast,
3292 if in_late_binary_op, don't use c_save_expr but save_expr.
3293
5624e564
JJ
3294 Update copyright years.
3295
5bd012f8
MP
32962015-01-05 Marek Polacek <polacek@redhat.com>
3297
3298 PR c/64423
3299 * c-typeck.c (build_array_ref): Pass loc down to
3300 warn_array_subscript_with_type_char.
3301
3f8257db 33022014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
3303
3304 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 3305 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 3306 element type.
8e745a17 3307 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 3308 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 3309 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 3310 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 3311 to PEDWARN_FOR_QUALIFIERS.
768952be 3312
8f94a8c4
JJ
33132014-12-17 Jakub Jelinek <jakub@redhat.com>
3314
3315 PR sanitizer/64289
3316 * c-convert.c: Include ubsan.h.
3317 (convert): For real -> integral casts and
3318 -fsanitize=float-cast-overflow don't call convert_to_integer, but
3319 instead instrument the float cast directly.
3320
b731b390
JJ
33212014-11-29 Jakub Jelinek <jakub@redhat.com>
3322
3323 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
3324 c_finish_stmt_expr): Remove NULL last argument from
3325 create_tmp_var_raw and create_tmp_var calls.
3326 * c-array-notation.c (fix_builtin_array_notation_fn,
3327 build_array_notation_expr, fix_conditional_array_notations_1,
3328 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
3329
541e35a6
MP
33302014-11-28 Marek Polacek <polacek@redhat.com>
3331
3332 PR c/63862
3333 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
3334 convert the right operand to integer type.
3335
b286be94
MP
33362014-11-25 Marek Polacek <polacek@redhat.com>
3337
3338 PR c/63877
3339 * c-decl.c (start_function): Disable -Wmissing-declarations warning
3340 for inline functions.
3341
aa7da51a
JJ
33422014-11-21 Jakub Jelinek <jakub@redhat.com>
3343
3344 PR target/63764
3345 * c-typeck.c (build_array_ref): Adjust
3346 convert_vector_to_pointer_for_subscript caller. If it returns true,
3347 call non_lvalue_loc on the result.
3348
d876207f
RB
33492014-11-11 Richard Biener <rguenther@suse.de>
3350
3351 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
3352 to true.
3353
e5e44252
AK
33542014-11-10 Andi Kleen <ak@linux.intel.com>
3355
3356 PR c/60804
3357 * c-parser.c (c_parser_statement_after_labels): Call
3358 check_no_cilk.
3359 (c_parser_if_statement): Dito.
3360 (c_parser_switch_statement): Dito.
3361 (c_parser_while_statement): Dito.
3362 (c_parser_do_statement): Dito.
3363 (c_parser_for_statement): Dito.
3364 * c-typeck.c (c_finish_loop): Dito.
3365
13c21655
PC
33662014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
3367
3368 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
3369 OPT_Wshift_count_overflow in the warnings.
3370
2d51fcef
MP
33712014-10-30 Marek Polacek <polacek@redhat.com>
3372
3373 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
3374 print the stripped version as well, if they're not the same.
3375
ef4bddc2
RS
33762014-10-29 Richard Sandiford <richard.sandiford@arm.com>
3377
3378 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
3379 machine_mode.
3380
c582198b
AM
33812014-10-28 Andrew MacLeod <amacleod@redhat.com>
3382
3383 * c-decl.c: Adjust include files.
3384 * c-parser.c: Ditto.
3385
ddc8de03
PM
33862014-10-27 Phil Muldoon <pmuldoon@redhat.com>
3387 Tom Tromey <tromey@redhat.com>
3388
3389 * c-tree.h (enum c_oracle_request): New.
3390 (c_binding_oracle_function): New typedef.
3391 (c_binding_oracle, c_pushtag, c_bind): Declare.
3392 * c-decl.c (c_binding_oracle): New global.
3393 (I_SYMBOL_CHECKED): New macro.
3394 (i_symbol_binding): New function.
3395 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
3396 (I_TAG_CHECKED): New macro.
3397 (i_tag_binding): New function.
3398 (I_TAG_BINDING, I_TAG_DECL): Redefine.
3399 (I_LABEL_CHECKED): New macro.
3400 (i_label_binding): New function.
3401 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
3402 (c_print_identifier): Save and restore c_binding_oracle.
3403 (c_pushtag, c_bind): New functions.
3404
60393bbc
AM
34052014-10-27 Andrew MacLeod <amacleod@redhat.com>
3406
3407 * c-typeck.c: Adjust include files.
3408
d723bb7c
MLI
34092014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
3410
3411 PR c++/53061
3412 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
3413 initialization here...
3414 (c_initialize_diagnostics): ... but here. Set defaults after
3415 building pretty-printer.
3416
1bc5a451
MP
34172014-10-23 Marek Polacek <polacek@redhat.com>
3418
3419 PR c/63626
3420 * c-decl.c (pop_scope): Don't print warning in external_scope.
3421
4435bb92
MP
34222014-10-19 Marek Polacek <polacek@redhat.com>
3423
3424 PR c/63567
3425 * c-typeck.c (output_init_element): Allow initializing objects with
3426 static storage duration with compound literals even in C99 and add
3427 pedwarn for it.
3428
7278465e
MP
34292014-10-17 Marek Polacek <polacek@redhat.com>
3430
3431 PR c/63567
3432 * c-typeck.c (digest_init): Allow initializing objects with static
3433 storage duration with compound literals even in C99 and add pedwarn
3434 for it.
3435
d9b7be2e
MP
34362014-10-17 Marek Polacek <polacek@redhat.com>
3437
3438 PR c/63543
3439 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
3440 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
3441 error multiple times. Print the type.
3442
f406ae1f
MP
34432014-10-17 Marek Polacek <polacek@redhat.com>
3444
3445 PR c/63549
3446 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
3447 type.
3448
92574c7c
MP
34492014-10-17 Marek Polacek <polacek@redhat.com>
3450
3451 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
3452 (start_function): Use OPT_Wimplicit_int instead of 0.
3453 (store_parm_decls_oldstyle): Likewise.
3454
1bc4a978
MT
34552014-10-17 Alan Modra <amodra@gmail.com>
3456
3457 PR middle-end/61848
3458 * c-decl.c (merge_decls): Don't merge section name or tls model
3459 to newdecl symtab node, instead merge to olddecl. Override
3460 existing olddecl section name. Set tls_model for all thread-local
3461 vars, not just OMP thread-private ones. Remove incorrect comment.
3462
83685514
AM
34632014-10-16 Andrew MacLeod <amacleod@redhat.com>
3464
3465 * c-decl.c: Adjust include files.
3466
78a7c317
DD
34672014-10-14 DJ Delorie <dj@redhat.com>
3468
3469 * c-parser.c (c_parse_init): Add RID entries for each __intN.
3470 (c_token_starts_typename): Check all __intN, not just __int128.
3471 (c_token_starts_declspecs): Likewise.
3472 (c_parser_declspecs): Likewise.
3473 (c_parser_attribute_any_word): Likewise.
3474 (c_parser_objc_selector): Likewise.
3475 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
3476 (struct c_declspecs): Add int_n_idx field to record *which* __intN
3477 is specified.
3478 * c-decl.c (declspecs_add_type): Check for all __intN, not just
3479 __int128.
3480 (finish_declspecs): Likewise.
3481
74d98c1e
AB
34822014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
3483
8e745a17 3484 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 3485 the duplicate code.
8e745a17 3486 (c_parser_statement): Call the new function.
74d98c1e 3487
84937de2
MP
34882014-10-09 Marek Polacek <polacek@redhat.com>
3489
3490 PR c/63480
3491 * c-typeck.c (pop_init_level): Don't warn about initializing
3492 with { }.
3493
0382aaa0
MP
34942014-10-07 Marek Polacek <polacek@redhat.com>
3495
3496 PR c/59717
3497 * c-decl.c (header_for_builtin_fn): New function.
3498 (implicitly_declare): Suggest which header to include.
3499
7a0ca710
MP
35002014-10-07 Marek Polacek <polacek@redhat.com>
3501
3502 * c-convert.c (convert): Use error_operand_p.
3503 * c-typeck.c (require_complete_type): Likewise.
3504 (really_atomic_lvalue): Likewise.
3505 (digest_init): Likewise.
3506 (handle_omp_array_sections_1): Likewise.
3507
6bc8a126
MP
35082014-10-03 Marek Polacek <polacek@redhat.com>
3509
3510 PR c/63453
3511 * c-decl.c (pop_scope): Don't warn about "inline function declared
3512 but never defined" for functions marked with gnu_inline attribute.
3513
d90c0a59
JJ
35142014-09-25 Jakub Jelinek <jakub@redhat.com>
3515
3516 PR c++/63249
3517 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
3518 on low_bound and length.
3519
083e891e
MP
35202014-09-24 Marek Polacek <polacek@redhat.com>
3521
3522 PR c/61405
3523 PR c/53874
3524 * c-parser.c: Don't define CPP_KEYWORD.
3525 (c_parser_switch_statement): Pass original type to c_finish_case.
3526 * c-tree.h (c_finish_case): Update declaration.
3527 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
3528 conditionally to c_do_switch_warnings.
3529
8d95fe25
MP
35302014-09-03 Marek Polacek <polacek@redhat.com>
3531
3532 PR c/62024
3533 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
3534 conversions.
3535
9a771876
JJ
35362014-09-02 Jakub Jelinek <jakub@redhat.com>
3537 Balaji V. Iyer <balaji.v.iyer@intel.com>
3538 Igor Zamyatin <igor.zamyatin@intel.com>
3539
3540 * c-parser.c (c_parser_cilk_for): New function.
3541 (c_parser_cilk_grainsize): Likewise.
3542 (c_get_temp_regvar): Likewise.
3543 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
3544 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
3545 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
3546 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
3547 case.
3548
b7679d96
CG
35492014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
3550
3551 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
3552 with using HOST_WIDE_INT without truncation to 'int'
3553
59ea0364
MP
35542014-08-22 Marek Polacek <polacek@redhat.com>
3555
3556 PR c++/62199
3557 * c-typeck.c (parser_build_binary_op): Adjust call to
3558 warn_logical_not_parentheses.
3559
671a475e
IZ
35602014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
3561
3562 PR other/62008
3563 * c-parser.c (c_parser_array_notation): Check for correct
3564 type of an array added.
3565
04159acf
MP
35662014-08-19 Marek Polacek <polacek@redhat.com>
3567
3568 PR c++/62153
3569 * c-typeck.c (build_binary_op): If either operand of a comparison
3570 is a boolean expression, call maybe_warn_bool_compare.
3571
c77935ee
PP
35722014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
3573
3574 PR c/45584
3575 * c-typeck.c (build_c_cast): Do a conversion even when the
3576 TYPE_MAIN_VARIANTs are the same.
3577
35aff4fb
MP
35782014-08-19 Marek Polacek <polacek@redhat.com>
3579
3580 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
3581 pedwarn_c99 instead of pedwarn.
3582 (grokfield): Likewise.
3583 (warn_defaults_to): New function.
3584 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
3585 Unconditionally call pedwarn_c99 instead of pedwarn.
3586 (start_function): Call warn_defaults_to instead of pedwarn_c99.
3587 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
3588 check flag_isoc11 before.
3589 * c-errors.c (pedwarn_c99): Change the return type to bool.
3590 Handle -Wc99-c11-compat.
3591 * c-parser.c (disable_extension_diagnostics): Handle
3592 warn_c99_c11_compat.
3593 (restore_extension_diagnostics): Likewise.
3594 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
3595 instead of pedwarn, don't check flag_isoc11 before.
3596 (c_parser_declspecs): Likewise.
3597 (c_parser_alignas_specifier): Likewise.
3598 (c_parser_alignof_expression): Likewise.
3599 (c_parser_generic_selection): Likewise.
3600 * c-tree.h (pedwarn_c99): Update declaration.
3601 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
3602 of pedwarn_c99.
3603
177cce46
MP
36042014-08-19 Marek Polacek <polacek@redhat.com>
3605
3606 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
3607 to pedwarn_c90.
3608 * c-errors.c: Include "opts.h".
3609 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
3610 * c-parser.c (disable_extension_diagnostics): Handle negative value
3611 of warn_c90_c99_compat, too.
3612 (restore_extension_diagnostics): Likewise.
3613 (c_parser_compound_statement_nostart): Pass
3614 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
3615
6dc99c33
MP
36162014-08-12 Marek Polacek <polacek@redhat.com>
3617
3618 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
3619 Add pedwarn.
3620 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
3621 Likewise.
3622 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
3623
3f8257db 36242014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
3625
3626 PR c/51849
3627 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
3628 Call pedwarn_c90 instead of pedwarn.
3629 (check_bitfield_type_and_width): Likewise.
3630 (declspecs_add_qual): Likewise.
3631 (declspecs_add_type): Likewise.
3632 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
3633 Adjust to only call pedwarn_c90.
3634 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
3635 pedwarn_c90 instead of pedwarn.
3636 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
3637 * c-parser.c (disable_extension_diagnostics): Handle
3638 warn_c90_c99_compat.
3639 (restore_extension_diagnostics): Likewise.
3640 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
3641 pedwarn_c90 instead of pedwarn.
3642 (c_parser_initelt): Likewise.
3643 (c_parser_postfix_expression): Likewise.
3644 (c_parser_postfix_expression_after_paren_type): Likewise.
3645 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
3646 * c-tree.h: Fix formatting.
3647 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
3648 pedwarn_c90 instead of pedwarn.
3649
9f25a338
TS
36502014-08-07 Trevor Saunders <tsaunders@mozilla.com>
3651
3652 * c-typeck.c: Remove include of pointer-set.h.
3653
044331a8
MP
36542014-08-07 Marek Polacek <polacek@redhat.com>
3655
3656 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
3657
b787e7a2
TS
36582014-08-02 Trevor Saunders <tsaunders@mozilla.com>
3659
3660 * c-typeck.c: Use hash_map instead of pointer_map.
3661
6e2830c3
TS
36622014-08-02 Trevor Saunders <tsaunders@mozilla.com>
3663
3664 * c-decl.c: Use hash_set instead of pointer_set.
3665
a7ee52fb
IZ
36662014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
3667
3668 PR middle-end/61455
3669 * c-array-notation.c (expand_array_notations): Handling
3670 of DECL_EXPR added.
3671
b4dfdc11
MG
36722014-07-31 Marc Glisse <marc.glisse@inria.fr>
3673
3674 PR c++/60517
3675 * c-typeck.c (c_finish_return): Return 0 instead of the address of
3676 a local variable.
3677
976d5a22
TT
36782014-07-30 Tom Tromey <tromey@redhat.com>
3679
3680 * c-typeck.c (struct constructor_stack) <designator_depth>: New
3681 field.
3682 (really_start_incremental_init, push_init_level): Initialize
3683 designator_depth.
3684 (pop_init_level): Set global designator_depth.
3685 (process_init_element): Check for designated_init attribute.
3686
30281de2
MP
36872014-07-20 Marek Polacek <polacek@redhat.com>
3688
3689 PR c/61852
3690 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
3691 (implicitly_declare): Pass location to implicit_decl_warning.
3692
b108f48f
JJ
36932014-07-14 Jakub Jelinek <jakub@redhat.com>
3694
3695 PR middle-end/61294
3696 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
3697 If non-NULL, call c_parser_check_literal_zero.
3698 (c_parser_check_literal_zero): New function.
3699 (c_parser_postfix_expression_after_primary): Adjust
3700 c_parser_expr_list caller, handle -Wmemset-transposed-args.
3701
773ec47f
MP
37022014-07-06 Marek Polacek <polacek@redhat.com>
3703
3704 PR c/6940
3705 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
3706 * c-tree.h (C_ARRAY_PARAMETER): Define.
3707 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
3708 function parameter.
3709
22e1cf1c 37102014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 3711 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
3712
3713 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
3714 releasing symbol.
3715
52ec0ea3
MP
37162014-07-01 Marek Polacek <polacek@redhat.com>
3717
3718 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
3719 instead of 0 to WARN_FOR_ASSIGNMENT.
3720
d5c3d343
MP
37212014-07-01 Marek Polacek <polacek@redhat.com>
3722
3723 PR c/58286
3724 * c-typeck.c (convert_for_assignment): Pass
3725 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
3726
6a7253a4
MP
37272014-06-30 Marek Polacek <polacek@redhat.com>
3728
3729 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
3730 has no_sanitize_undefined attribute.
3731
5e88a8f4
IZ
37322014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
3733
3734 PR middle-end/57541
3735 * c-array-notation.c (fix_builtin_array_notation_fn):
3736 Check for 0 arguments in builtin call. Check that bultin argument is
3737 correct.
3738 * c-parser.c (c_parser_array_notation): Check for incorrect initial
3739 index.
3740
9698b078
SH
37412014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
3742
3743 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
3744 qualifiers in __auto_type for atomic types.
3745 (c_parser_typeof_specifier): Discard all type qualifiers in
3746 __typeof__ for atomic types.
3747
6e07c515
MP
37482014-06-25 Marek Polacek <polacek@redhat.com>
3749
3750 PR c/61162
3751 * c-parser.c (c_parser_statement_after_labels): Pass the location of
3752 the return expression to c_finish_return.
3753
da6f124d
JJ
37542014-06-25 Jakub Jelinek <jakub@redhat.com>
3755
3756 * c-typeck.c (c_finish_omp_clauses): Make sure
3757 OMP_CLAUSE_LINEAR_STEP has correct type.
3758
c203e8a7
TS
37592014-06-24 Trevor Saunders <tsaunders@mozilla.com>
3760
3761 * c-decl.c: Adjust.
3762
56ad0e38
JJ
37632014-06-24 Jakub Jelinek <jakub@redhat.com>
3764
3765 * c-parser.c (c_parser_omp_for_loop): For
3766 #pragma omp parallel for simd move lastprivate clause from parallel
3767 to for rather than simd.
3768
47c2554f
MP
37692014-06-23 Marek Polacek <polacek@redhat.com>
3770
3771 * c-typeck.c (parser_build_binary_op): Don't call
3772 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
3773
56363ffd
JH
37742014-06-15 Jan Hubicka <hubicka@ucw.cz>
3775
3776 * c-parser.c (c_parser_omp_threadprivate): Likewise.
3777 * c-decl.c (merge_decls): Likewise.
3778
d7ff7ae5
MP
37792014-06-09 Marek Polacek <polacek@redhat.com>
3780
3781 PR c/36446
3782 * c-typeck.c (error_init): Call inform instead of error_at.
3783 (pedwarn_init): Call inform instead of pedwarn.
3784 (warning_init): Call inform instead of warning_at.
3785
24d047a3
JH
37862014-06-07 Jan Hubicka <hubicka@ucw.cz>
3787
3788 * c-decl.c (merge_decls): Use set_decl_section_name.
3789 (duplicate_decls): Remove node if it exists.
3790
9bac5cbb
G
37912014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
3792
3793 PR c/53119
3794 * c-typeck.c (push_init_level, process_init_element,
3795 pop_init_level): Correct check for zero initialization, move
3796 missing brace warning to respect zero initialization.
3797
8ffcdea8
MP
37982014-06-05 Marek Polacek <polacek@redhat.com>
3799
3800 PR c/56724
3801 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
3802
742938c9
MP
38032014-06-05 Marek Polacek <polacek@redhat.com>
3804
3805 PR c/49706
3806 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
3807 on the left hand side operand of a comparison.
3808
6447c55d
MP
38092014-06-05 Marek Polacek <polacek@redhat.com>
3810
3811 PR c/48062
3812 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
3813 Print note only if the warning was printed.
3814
9dc7743c
IZ
38152014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
3816
3817 PR c/58942
3818 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
3819 with a pointer.
3820
fedfecef
MP
38212014-06-03 Marek Polacek <polacek@redhat.com>
3822
3823 PR c/60439
3824 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
3825 c_start_case.
3826 * c-tree.h (c_start_case): Update.
3827 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
3828 switch condition has boolean value.
3829
9b2b7279
AM
38302014-06-02 Andrew MacLeod <amacleod@redhat.com>
3831
3832 * c-decl.c: Include builtins.h.
3833 * c-parser.c: Likewise.
3834
5c1bc275
MP
38352014-05-27 Marek Polacek <polacek@redhat.com>
3836
3837 PR c/56724
3838 * c-typeck.c (convert_arguments): Get location of a parameter. Change
3839 error and warning calls to error_at and warning_at. Pass location of
3840 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
3841 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
3842 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
3843
97563bc8
IZ
38442014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
3845
3846 PR c/61191
3847 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
3848 function parameters.
3849
aede2c10
JH
38502014-05-23 Jan Hubicka <hubicka@ucw.cz>
3851
3852 * c-decl.c (merge_decls): Preserve symtab node pointers.
3853 (duplicate_decls): Free new decl.
3854
edbba2ce
TS
38552014-05-23 Thomas Schwinge <thomas@codesourcery.com>
3856
f3316c6d
TS
3857 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
3858 initialization.
3859
edbba2ce
TS
3860 * c-parser.c (c_parser_omp_target): Return bool values.
3861
68c81f24
TS
38622014-05-22 Thomas Schwinge <thomas@codesourcery.com>
3863
3864 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
3865 num_teams_loc variable to num_thread_limit_loc.
3866
632f2871
RS
38672014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
3868
3869 * c-array-notation.c (expand_array_notations): Use void_node
3870 instead of void_zero_node.
3871
766090c2
TS
38722014-05-17 Trevor Saunders <tsaunders@mozilla.com>
3873
3874 * c-decl.c (finish_struct): Adjust.
3875 (finish_enum): Likewise.
3876 (bind): Adjust.
3877 (record_inline_static): Likewise.
3878 (push_scope): Likewise.
3879 (make_label): Likewise.
3880 (lookup_label_for_goto): Likewise.
3881 (finish_struct): Likewise.
3882 (finish_enum): Likewise.
3883 (store_parm_decls): Likewise.
3884 (c_push_function_context): Likewise.
3885 * c-lang.h: Remove usage of variable_size gty attribute.
3886 * c-parser.c (c_parse_init): Adjust.
3887 (c_parse_file): Likewise.
3888
2b107f6b
MP
38892014-05-13 Marek Polacek <polacek@redhat.com>
3890
3891 PR c/61162
3892 * c-typeck.c (convert_for_assignment): Pass location to
3893 WARN_FOR_ASSIGNMENT instead of input_location.
3894
d033409e
MP
38952014-05-10 Marek Polacek <polacek@redhat.com>
3896
3897 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
3898 maybe_warn_string_init.
3899 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
3900 maybe_warn_string_init.
3901 * c-tree.h (maybe_warn_string_init): Update declaration.
3902 * c-typeck.c (maybe_warn_string_init): Add location parameter.
3903 Call pedwarn_init with loc instead of with input_location.
3904 (digest_init): Pass init_loc to maybe_warn_string_init.
3905 (pop_init_level): Call pedwarn_init with loc instead of with
3906 input_location.
3907 (set_init_index): Likewise.
3908 (process_init_element): Likewise.
3909
ea58ef42
MP
39102014-05-09 Marek Polacek <polacek@redhat.com>
3911
3912 PR c/61096
3913 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
3914 (c_parser_initelt): Pass location to set_init_label. Pass array index
3915 location to set_init_index.
3916 * c-tree.h (push_init_level): Update declaration.
3917 (pop_init_level): Likewise.
3918 (set_init_index): Likewise.
3919 (set_init_label): Likewise.
3920 * c-typeck.c (error_init): Add location parameter. Call error_at
3921 instead of error.
3922 (digest_init): Pass init_loc to error_init.
3923 (really_start_incremental_init):
3924 (push_init_level): Add location parameter. Pass loc to pop_init_level
3925 and error_init.
3926 (pop_init_level): Likewise.
3927 (set_designator): Add location parameter. Pass loc to pop_init_level,
3928 push_init_level, and error_init.
3929 (set_init_index): Add location parameter. Pass loc to error_init and
3930 set_designator.
3931 (set_init_label): Likewise.
3932 (output_init_element): Pass loc to error_init.
3933 (process_init_element): Pass loc to error_init, pop_init_level,
3934 pedwarn_init, and push_init_level.
3935
661a0813
MP
39362014-05-09 Marek Polacek <polacek@redhat.com>
3937
3938 PR c/50459
3939 * c-parser.c (c_parser_attributes): Parse the arguments as an
3940 expression-list if the attribute takes identifier.
3941
2793eeab
MP
39422014-05-08 Marek Polacek <polacek@redhat.com>
3943
3944 PR c/61053
3945 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
3946 TYPE_ALIGN_UNIT.
3947
f827930a
MP
39482014-05-08 Marek Polacek <polacek@redhat.com>
3949
3950 PR c/61077
3951 * c-decl.c (start_function): Warn for _Atomic-qualified return type
3952 of main.
3953
1d60af08
KZ
39542014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
3955 Mike Stump <mikestump@comcast.net>
3956 Richard Sandiford <rdsandiford@googlemail.com>
3957
3958 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
3959 (finish_enum): Use wide-int interfaces.
3960 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
3961 * c-typeck.c (build_c_cast): Likewise.
3962 (set_nonincremental_init_from_string): Likewise.
3963 (c_tree_equal): Likewise.
3964
a0e24419
MP
39652014-05-02 Marek Polacek <polacek@redhat.com>
3966
3967 PR c/25801
3968 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
3969 Return size_one_node when the type is not complete.
3970 (pointer_diff): Remove comment.
3971 (build_unary_op): Improve error messages.
3972
19fc9faa
MP
39732014-05-02 Marek Polacek <polacek@redhat.com>
3974
3975 * c-typeck.c (c_finish_return): Separate warning_at calls.
3976
63bc4e87
MP
39772014-05-02 Marek Polacek <polacek@redhat.com>
3978
3979 * c-tree.h (error_init): Remove declaration.
3980 (pedwarn_init): Likewise.
3981 * c-typeck.c (error_init): Make static and move above.
3982 (pedwarn_init): Likewise.
3983 (warning_init): Move above.
3984 (maybe_warn_string_init): Likewise.
3985
4bd2511b
JL
39862014-05-01 Jeff Law <law@redhat.com>
3987
3988 Revert:
3989
3990 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3991 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
3992 avoid goto.
3993
6a358dcb
MP
39942014-05-02 Marek Polacek <polacek@redhat.com>
3995
3996 PR c/60784
3997 * c-typeck.c (push_init_level): Set constructor_designated to
3998 p->designated for structures.
3999
ae5ebda4
MP
40002014-05-01 Marek Polacek <polacek@redhat.com>
4001
4002 PR c/60915
4003 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
4004 function-definition has an attribute after the declarator.
4005
96b40f8d
MP
40062014-05-01 Marek Polacek <polacek@redhat.com>
4007
4008 PR c/60257
4009 * c-typeck.c (warning_init): Add location_t parameter. Call
4010 warning_at instead of warning.
4011 (push_init_level): Pass input_location to warning_init.
4012 (add_pending_init): Add location_t parameter. Pass loc to
4013 warning_init.
4014 (set_nonincremental_init): Pass input_location to add_pending_init.
4015 (set_nonincremental_init_from_string): Likewise.
4016 (output_init_element): Pass loc to warning_init and to
4017 add_pending_init.
4018
32e00768
MP
40192014-05-01 Marek Polacek <polacek@redhat.com>
4020
4021 PR c/43395
4022 * c-typeck.c (c_finish_return): Distinguish between label and variable
4023 when warning about returning local address.
4024
c9379ce2
MP
40252014-05-01 Marek Polacek <polacek@redhat.com>
4026
4027 PR c/29467
4028 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
4029 in C89 mode.
4030
d00887e8
MP
40312014-05-01 Marek Polacek <polacek@redhat.com>
4032
4033 PR c/43245
4034 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
4035 instead of 0 to WARN_FOR_QUALIFIERS.
4036
5436fa2e
MP
40372014-05-01 Marek Polacek <polacek@redhat.com>
4038
4039 PR c/56989
4040 * c-typeck.c (default_conversion): Use better location for
4041 error call.
4042
f8ed5150
MP
40432014-04-30 Marek Polacek <polacek@redhat.com>
4044
4045 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
4046 also when SANITIZE_FLOAT_DIVIDE is on.
4047
8337d1db
MP
40482014-04-30 Marek Polacek <polacek@redhat.com>
4049
4050 PR c/60139
4051 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
4052 and pedwarn_init. Use loc insted of input_location.
4053
c4bdc42f
MP
40542014-04-30 Marek Polacek <polacek@redhat.com>
4055
4056 PR c/60351
4057 * c-typeck.c (build_binary_op): Use location when warning about
4058 shift count.
4059
45484dcf
MP
40602014-04-25 Marek Polacek <polacek@redhat.com>
4061
4062 PR c/18079
4063 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
4064 always_inline/noinline and hot/cold attributes.
4065
34cf811f
MP
40662014-04-25 Marek Polacek <polacek@redhat.com>
4067
4068 PR c/60114
4069 * c-parser.c (c_parser_initelt): Pass input_location to
4070 process_init_element.
4071 (c_parser_initval): Pass loc to process_init_element.
4072 * c-tree.h (process_init_element): Adjust declaration.
4073 * c-typeck.c (push_init_level): Pass input_location to
4074 process_init_element.
4075 (pop_init_level): Likewise.
4076 (set_designator): Likewise.
4077 (output_init_element): Add location_t parameter. Pass loc to
4078 digest_init.
4079 (output_pending_init_elements): Pass input_location to
4080 output_init_element.
4081 (process_init_element): Add location_t parameter. Pass loc to
4082 output_init_element.
4083
42056eac
JJ
40842014-04-24 Jakub Jelinek <jakub@redhat.com>
4085
4086 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
4087 atomic-clause, allow comma in between atomic-clause and
4088 seq_cst.
4089
e162a134
JJ
40902014-04-22 Jakub Jelinek <jakub@redhat.com>
4091
4092 PR c/59073
4093 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
4094 fails, don't set OM_PARALLEL_COMBINED and return NULL.
4095
2f6babac
IZ
40962014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
4097
4098 PR middle-end/60469
4099 * c-array-notation.c (fix_builtin_array_notation_fn): Use
4100 create_tmp_var instead build_decl for creating temps.
4101 (build_array_notation_expr): Likewise.
4102 (fix_conditional_array_notations_1): Likewise.
4103 (fix_array_notation_expr): Likewise.
4104 (fix_array_notation_call_expr): Likewise.
4105
8edbfaa6
JJ
41062014-03-28 Jakub Jelinek <jakub@redhat.com>
4107
4108 PR c++/60689
4109 * c-tree.h (c_build_function_call_vec): New prototype.
4110 * c-typeck.c (build_function_call_vec): Don't call
4111 resolve_overloaded_builtin here.
4112 (c_build_function_call_vec): New wrapper function around
4113 build_function_call_vec. Call resolve_overloaded_builtin here.
4114 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
4115 Call c_build_function_call_vec instead of build_function_call_vec.
4116 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
4117 * c-decl.c (finish_decl): Likewise.
4118
7485aeea
MLI
41192014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4120
4121 PR c/55383
4122 * c-typeck.c: Use correct format string in cast-qual warning
4123
b17a8b07
TS
41242014-03-07 Thomas Schwinge <thomas@codesourcery.com>
4125
4126 * c-decl.c (c_decl_attributes): Use
4127 lang_hooks.types.omp_mappable_type.
4128 * c-typeck.c (c_finish_omp_clauses): Likewise.
4129
3af9c5e9
MP
41302014-03-06 Marek Polacek <polacek@redhat.com>
4131
4132 PR c/60197
4133 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
4134 of checking tree code.
4135
1c9f5f33
PK
41362014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4137
4138 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
4139 (c_parser_parameter_declaration): Likewise.
4140
cc28fc7f
MP
41412014-02-19 Marek Polacek <polacek@redhat.com>
4142
4143 PR c/60195
4144 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
4145 Call mark_exp_read on exp.value.
4146 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
4147 TREE_ADDRESSABLE on old instead of val.
4148 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
4149
b581c05c
PK
41502014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4151
4152 * c-parser.c (c_parser_get_builtin_args): Replace calls to
4153 C_EXPR_APPEND by vec_safe_push.
4154 * c-tree.h (C_EXPR_APPEND): Remove.
4155
81e5eca8
MP
41562014-01-31 Marek Polacek <polacek@redhat.com>
4157
4158 PR c/59963
4159 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
4160 build_function_call_vec.
4161 (build_function_call): Likewise.
4162 (build_atomic_assign): Likewise.
4163 (build_function_call_vec): Add arg_loc parameter. Use it.
4164 (convert_arguments): Likewise.
4165 (convert_for_assignment): Rename rhs_loc to expr_loc.
4166 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
4167 (c_parser_objc_keywordexpr): Likewise.
4168 (c_parser_postfix_expression_after_primary): Call
4169 build_function_call_vec with expr_loc rather than op_loc.
4170 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
4171 build_function_call_vec.
4172 (c_parser_expr_list): Add locations parameter. Fill it with locations
4173 of function arguments.
4174 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
4175
68fca595
MP
41762014-01-30 Marek Polacek <polacek@redhat.com>
4177
4178 PR c/59940
4179 * c-typeck.c (build_function_call_vec): Use loc parameter.
4180 (convert_arguments): Add location parameter. Use it.
4181 (ep_convert_and_check): Likewise.
4182 (build_atomic_assign): Adjust convert_for_assignment call.
4183 (build_modify_expr): Likewise.
4184 (digest_init): Likewise.
4185 (c_finish_return): Likewise.
4186 (build_conditional_expr): Adjust ep_convert_and_check calls.
4187 (convert_for_assignment): Add rhs_loc parameter. Use it.
4188 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
4189 calls.
4190
fa337f3a
RB
41912014-01-30 Richard Biener <rguenther@suse.de>
4192
4193 PR c/59905
4194 * c-typeck.c (build_function_call_vec): Do not replace calls
4195 to a function via an incompatible type with a runtime abort.
4196
b72271b9
BI
41972014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
4198
4199 * c-parser.c (c_parser_declaration_or_fndef): Replaced
4200 flag_enable_cilkplus with flag_cilkplus.
4201 (c_parser_direct_declarator_inner): Likewise.
4202 (c_parser_attribute_any_word): Likewise.
4203 (c_parser_attributes): Likewise.
4204 (c_parser_compound_statement): Likewise.
4205 (c_parser_statement_after_labels): Likewise.
4206 (c_parser_if_statement): Likewise.
4207 (c_parser_switch_statement): Likewise.
4208 (c_parser_do_statement): Likewise.
4209 (c_parser_for_statement): Likewise.
4210 (c_parser_unary_expression): Likewise.
4211 (c_parser_postfix_expression): Likewise.
4212 (c_parser_postfix_expression_after_primary): Likewise.
4213 (c_parser_postfix_expression_after_primary): Likewise.
4214 (c_parser_omp_clause_name): Likewise.
4215 (c_finish_omp_declare_simd): Likewise.
4216 (c_parser_cilk_verify_simd): Likewise.
4217 * c-typeck.c (build_array_ref): Likewise.
4218 (build_function_call_vec): Likewise.
4219 (convert_arguments): Likewise.
4220 (build_compound_expr): Likewise.
4221 (c_finish_return): Likewise.
4222 (c_finish_if_stmt): Likewise.
4223 (c_finish_loop): Likewise.
4224 (build_binary_op): Likewise.
4225
393e8e8b
MP
42262014-01-23 Marek Polacek <polacek@redhat.com>
4227
4228 PR c/59846
4229 * c-typeck.c (parser_build_binary_op): Use location instead of
4230 input_location.
4231 (build_binary_op): Pass location to shorten_compare.
4232
f04dda30
MP
42332014-01-23 Marek Polacek <polacek@redhat.com>
4234
4235 PR c/58346
4236 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
4237 an empty aggregate.
4238
789eadcd
MP
42392014-01-23 Marek Polacek <polacek@redhat.com>
4240
4241 PR c/59871
4242 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
4243 of a comma expression.
4244 (emit_side_effect_warnings): Likewise.
4245
40f14e9f
BI
42462014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
4247
4248 PR c/59825
4249 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
4250 function to use walk_tree and moved a lot of its functionality to
4251 expand_array_notations.
4252 (expand_array_notations): New function.
4253
74558dd9
BI
42542014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
4255
4256 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
4257 attribute an attribute without value.
4258
652fea39
JJ
42592014-01-23 Jakub Jelinek <jakub@redhat.com>
4260
4261 PR middle-end/58809
4262 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
4263 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
4264
f34f1c87
MP
42652014-01-22 Marek Polacek <polacek@redhat.com>
4266
4267 PR c/59891
4268 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
4269 of remove_c_maybe_const_expr on op1 and op2.
4270
241f845a
JJ
42712014-01-15 Jakub Jelinek <jakub@redhat.com>
4272
4273 PR c/58943
4274 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
4275 effects, preevaluate rhs using SAVE_EXPR first.
4276
9a74f20c
BI
42772014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
4278
4279 PR c++/59631
4280 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
4281 statements with if-elseif statements.
4282
96066ce1
MP
42832014-01-06 Marek Polacek <polacek@redhat.com>
4284
4285 PR c/57773
4286 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
4287 defined bit-field types only in ISO C.
4288
23a5b65a
RS
42892014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
4290
4291 Update copyright years
4292
f9030485
RS
42932014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
4294
4295 * c-array-notation.c: Use the standard form for the copyright notice.
4296
41958c28
BI
42972013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
4298
4299 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
4300 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
4301 field in parser is not empty. If not-empty, call the function
4302 c_parser_finish_omp_declare_simd.
4303 (c_parser_cilk_clause_vectorlength): Modified function to be shared
4304 between SIMD-enabled functions and #pragma simd. Added new parameter.
4305 (c_parser_cilk_all_clauses): Modified the usage of the function
4306 c_parser_cilk_clause_vectorlength as mentioned above.
4307 (c_parser_cilk_simd_fn_vector_attrs): New function.
4308 (c_finish_cilk_simd_fn_tokens): Likewise.
4309 (is_cilkplus_vector_p): Likewise.
4310 (c_parser_omp_clause_name): Added checking for "vectorlength,"
4311 "nomask," and "mask" strings in clause name.
4312 (c_parser_omp_all_clauses): Added 3 new case statements:
4313 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
4314 PRAGMA_CILK_CLAUSE_NOMASK.
4315 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
4316 check for vector attribute and if so call the function
4317 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
4318 called the function c_finish_cilk_simd_fn_tokens.
4319 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
4320 parser field is non-empty. If so, parse them as you would parse
4321 the omp declare simd pragma.
4322 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
4323 Added a check when step is a parameter and flag it as error.
4324 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
4325 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
4326 pragma_omp_clause.
4327
cef0fd0e
TS
43282013-12-17 Thomas Schwinge <thomas@codesourcery.com>
4329
4330 * c-parser.c (c_parser_omp_parallel): Fix description.
4331
12893402
BI
43322013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
4333
4334 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
4335 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
4336 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
4337 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
4338
296674db
JM
43392013-12-04 Joseph Myers <joseph@codesourcery.com>
4340
4341 PR c/52023
4342 * c-parser.c (c_parser_alignas_specifier): Use
4343 c_sizeof_or_alignof_type instead of c_alignof.
4344 (c_parser_alignof_expression): Likewise, with min_alignof
4345 parameter depending on alignof spelling used.
4346
edd28054
MP
43472013-12-04 Marek Polacek <polacek@redhat.com>
4348
4349 PR c/54113
4350 * c-decl.c (start_function): Don't warn for missing prototype for
4351 inline functions.
4352
da0fc454
MP
43532013-12-03 Marek Polacek <polacek@redhat.com>
4354
4355 PR c/59351
4356 * c-decl.c (build_compound_literal): Allow compound literals with
4357 empty initial value.
4358
4c2ecab0
JM
43592013-12-02 Joseph Myers <joseph@codesourcery.com>
4360
4361 PR c/58235
4362 * c-typeck.c (build_modify_expr): Diagnose assignment to
4363 expression with array type.
4364
340baef7
JM
43652013-11-29 Joseph Myers <joseph@codesourcery.com>
4366
4367 PR c/42262
4368 * c-typeck.c (process_init_element): Do not treat a string as
4369 initializing a whole array when used with a designator for an
4370 individual element.
4371
6763b9f7
JM
43722013-11-29 Joseph Myers <joseph@codesourcery.com>
4373
4374 PR c/57574
4375 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
4376 an inline function following a static declaration.
4377
e7bd1de1
JJ
43782013-11-28 Jakub Jelinek <jakub@redhat.com>
4379
4380 PR c/59310
4381 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
4382 to p_name before calling c_parser_omp_teams instead of after.
4383 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
4384 argument. Remove unused p_name variable.
4385
0136f8f0
AH
43862013-11-27 Aldy Hernandez <aldyh@redhat.com>
4387 Jakub Jelinek <jakub@redhat.com>
4388
4389 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
4390 external_scope is NULL.
4391
241b71bb
TV
43922013-11-27 Tom de Vries <tom@codesourcery.com>
4393 Marc Glisse <marc.glisse@inria.fr>
4394
4395 PR c++/59032
4396 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
4397
2fb9a547
AM
43982013-11-22 Andrew MacLeod <amacleod@redhat.com>
4399
4400 * c-typeck.c: Add required include files from gimple.h.
4401
8400e75e
DM
44022013-11-22 David Malcolm <dmalcolm@redhat.com>
4403
4404 * c-decl.c (define_label, shadow_tag_warned)
4405 (check_bitfield_type_and_width, grokdeclarator, grokparms,
4406 store_parm_decls_newstyle, store_parm_decls_oldstyle)
4407 (declspecs_add_type): Remove use of in_system_header macro.
4408 * c-parser.c (c_parser_unary_expression): Likewise.
4409 * c-typeck.c (store_init_value, process_init_element)
4410 (c_start_case): Likewise.
4411
4412 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
4413 macro.
4414
4415 * c-parser.c (c_parser_set_source_position_from_token): Remove
4416 reference to in_system_header from comment.
4417
386b1f1f
RS
44182013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4419
4420 * c-decl.c (grokdeclarator): Update comment to refer to
4421 tree_to_[su]hwi rather than tree_low_cst.
4422
ae7e9ddd
RS
44232013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4424
4425 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
4426 tree_to_uhwi throughout.
4427
9439e9a1
RS
44282013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4429
4430 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
4431 throughout.
4432
9541ffee
RS
44332013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4434
4435 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
4436 throughout.
4437
c02065fc
AH
44382013-11-15 Aldy Hernandez <aldyh@redhat.com>
4439
4440 * c-parser.c (c_parser_cilk_simd): New.
4441 (c_parser_cilk_verify_simd): New.
4442 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
4443 (c_parser_omp_for_loop): Add case for NE_EXPR.
4444 Set c_break_label for CILK_SIMD.
4445 (c_parser_cilk_clause_vectorlength): New.
4446 (c_parser_cilk_clause_linear): New.
4447 (c_parser_cilk_clause_name): New.
4448 (c_parser_cilk_all_clauses): New.
4449 * c-typeck.c (build_unary_op): Pass location argument to
4450 readonly_error.
4451 (build_modify_expr): Same.
4452 (build_asm_expr): Same.
4453 (c_finish_bc_stmt): Error on break/continue in loops.
4454
18f429e2
AM
44552013-11-14 Andrew MacLeod <amacleod@redhat.com>
4456
4457 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
4458
d8a2d370
DN
44592013-11-14 Diego Novillo <dnovillo@google.com>
4460
4461 * c-decl.c: Include print-tree.h.
4462 Include stor-layout.h.
4463 Include varasm.h.
4464 Include attribs.h.
4465 Include stringpool.h.
4466 * c-lang.c: Include fold-const.h.
4467 * c-parser.c: Include stringpool.h.
4468 Include attribs.h.
4469 Include stor-layout.h.
4470 Include varasm.h.
4471 Include trans-mem.h.
4472 * c-typeck.c: Include stor-layout.h.
4473 Include trans-mem.h.
4474 Include varasm.h.
4475 Include stmt.h.
4476
38b7bc7f
JM
44772013-11-13 Joseph Myers <joseph@codesourcery.com>
4478
4479 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
4480 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
4481 __auto_type.
4482 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
4483 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
4484 RID_AUTO_TYPE.
4485 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
4486 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
4487 (c_parser_declarator, c_parser_direct_declarator_inner)
4488 (c_parser_parameter_declaration, c_parser_type_name): All callers
4489 changed.
4490 (c_parser_declaration_or_fndef): Handle declarations with type
4491 determined from the initializer.
4492
45b0be94
AM
44932013-11-12 Andrew MacLeod <amacleod@redhat.com>
4494
18f429e2 4495 * c-typeck.c: Include gimplify.h.
45b0be94 4496
582d9b50
JM
44972013-11-12 Joseph Myers <joseph@codesourcery.com>
4498
4499 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
4500 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
4501 comment.
4502 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
4503 or _Thread_local as appropriate in diagnostics.
4504 (build_null_declspecs): Initialize ret->thread_gnu_p.
4505 (declspecs_add_scspec): Handle either __thread or _Thread_local
4506 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
4507 pedantic. Do not disallow _Thread_local extern and _Thread_local
4508 static.
4509
267bac10
JM
45102013-11-07 Joseph Myers <joseph@codesourcery.com>
4511 Andrew MacLeod <amacleod@redhat.com>
4512
4513 * c-aux-info.c (gen_type): Handle atomic qualifier.
4514 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
4515 qualifiers when compating types.
4516 (shadow_tag_warned): Handle atomic_p in declspecs.
4517 (quals_from_declspecs): Likewise.
4518 (start_decl): Use c_type_promotes_to when promoting argument
4519 types.
4520 (grokdeclarator): Handle _Atomic.
4521 (get_parm_info): Diagnose any qualifier on "void" as only
4522 parameter.
4523 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
4524 comparing types. Use c_type_promotes_to when promoting argument
4525 types.
4526 (finish_function): Use c_type_promotes_to when promoting argument
4527 types.
4528 (build_null_declspecs): Handle atomic_p in declspecs.
4529 (declspecs_add_qual): Handle RID_ATOMIC.
4530 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
4531 (c_token_starts_declspecs): Handle RID_ATOMIC.
4532 (c_parser_declspecs): Handle atomic type specifiers and
4533 qualifiers.
4534 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
4535 from types of expressions with atomic type.
4536 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
4537 (c_parser_attribute_any_word): Handle RID_ATOMIC.
4538 (c_parser_initializer, c_parser_initelt, c_parser_initval)
4539 (c_parser_statement_after_labels, c_parser_switch_statement)
4540 (c_parser_for_statement, c_parser_expr_no_commas)
4541 (c_parser_conditional_expression, c_parser_binary_expression)
4542 (c_parser_cast_expression, c_parser_unary_expression)
4543 (c_parser_postfix_expression)
4544 (c_parser_postfix_expression_after_primary, c_parser_expression):
4545 Use convert_lvalue_to_rvalue.
4546 (c_parser_expression_conv, c_parser_expr_list): Document
4547 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
4548 (c_parser_objc_synchronized_statement): Use
4549 convert_lvalue_to_rvalue.
4550 (c_parser_objc_selector): Handle RID_ATOMIC.
4551 (c_parser_objc_receiver, c_parser_array_notation): Use
4552 convert_lvalue_to_rvalue.
4553 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
4554 _Atomic (type-name).
4555 (struct c_declspecs): Add atomic_p field.
4556 (convert_lvalue_to_rvalue): Declare.
4557 * c-typeck.c (c_type_promotes_to): Promote atomic types to
4558 corresponding atomic types.
4559 (qualify_type): Don't add _Atomic qualifiers from second argument.
4560 (comp_target_types): Do not allow _Atomic mismatches.
4561 (type_lists_compatible_p): Do not remove atomic qualifiers when
4562 comparing types.
4563 (really_atomic_lvalue, convert_lvalue_to_rvalue)
4564 (build_atomic_assign): New functions.
4565 (build_unary_op): Use build_atomic_assign for atomic increment and
4566 decrement.
4567 (build_conditional_expr): Do not treat _Atomic void as a qualified
4568 version of void.
4569 (build_modify_expr): Use build_atomic_assign for atomic LHS.
4570 (find_anonymous_field_with_type, convert_to_anonymous_field)
4571 (convert_for_assignment): Do not remove atomic qualifiers when
4572 comparing types.
4573 (digest_init): Do not accept initialization of arrays of atomic
4574 elements by string constants.
4575 (build_asm_expr): Use convert_lvalue_to_rvalue.
4576 (build_binary_op): Do not treat _Atomic void as a qualified
4577 version of void.
4578
0c249d4b
DD
45792013-11-06 DJ Delorie <dj@redhat.com>
4580
4581 * c-decl.c (locate_old_decl): If a previous conflicting decl is
4582 both explicit and builtin, print the location of the explicit one.
4583
6d7f7e0a
TB
45842013-11-05 Tobias Burnus <burnus@net-b.de>
4585
4586 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
4587 c_parser_omp_distribute, c_parser_omp_teams,
4588 c_parser_omp_target, c_parser_omp_declare): Handle
4589 -fopenmp-simd.
4590
b906f4ca
MP
45912013-11-03 Marek Polacek <polacek@redhat.com>
4592
4593 * c-decl.c (grokdeclarator): Add VLA instrumentation.
4594
ee1d5a02
JJ
45952013-11-01 Jakub Jelinek <jakub@redhat.com>
4596
4597 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
4598 check_dup_generic at the end, unless remove is true.
4599 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
4600 remove = true;.
4601 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
4602
5a9785fb
JJ
46032013-10-31 Jakub Jelinek <jakub@redhat.com>
4604
4605 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
4606 with decl that is not pointer nor array.
4607
939b37da
BI
46082013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
4609
4610 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
4611 a spawning function is found.
4612 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
4613 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
4614 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
4615 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
4616 case.
4617 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
4618 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
4619 expr.
4620 (c_finish_return): Added a check to reject _Cilk_spawn in return
4621 expression.
4622 (build_cilk_spawn): New function.
4623 (build_cilk_sync): Likewise.
4624 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
4625
d4af74d4
TB
46262013-10-27 Tobias Burnus <burnus@net-b.de>
4627
4628 PR other/33426
4629 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
4630 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
4631 (c_parser_statement_after_labels): Update calls.
4632
d73749df 46332013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
4634
4635 PR other/33426
4636 * c-parser.c (c_parser_pragma, c_parser_for_statement):
4637 Handle PRAGMA_IVDEP.
4638 (c_parser_statement_after_labels): Update call.
4639
f28aa681
MP
46402013-10-24 Marek Polacek <polacek@redhat.com>
4641
4642 * c-parser.c (c_parser_struct_declaration): Add a comment.
4643 (c_parser_declarator): Don't allow _Alignas here.
4644
0645c1a2
AM
46452013-10-17 Andrew MacLeod <amacleod@redhat.com>
4646
4647 * c-parser.c: Include omp-low.h.
4648 * c-typeck.c: Likewise.
4649
568a31f2
MP
46502013-10-17 Marek Polacek <polacek@redhat.com>
4651
4652 PR c/58267
4653 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
4654 Document syntax of the array-declarator.
4655 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
4656 are not permitted.
4657 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
4658 (c_parser_struct_declaration): Likewise.
4659 (c_parser_declarator): Likewise.
4660 (c_parser_direct_declarator_inner): Likewise.
4661 (c_parser_parameter_declaration): Likewise.
4662 (c_parser_type_name): Likewise.
4663
acf0174b
JJ
46642013-10-11 Jakub Jelinek <jakub@redhat.com>
4665
4666 * c-lang.h (current_omp_declare_target_attribute): New extern
4667 decl.
4668 * c-parser.c: Include c-lang.h.
4669 (struct c_parser): Change tokens to c_token *.
4670 Add tokens_buf field. Change tokens_avail type to unsigned int.
4671 (c_parser_consume_token): If parser->tokens isn't
4672 &parser->tokens_buf[0], increment parser->tokens.
4673 (c_parser_consume_pragma): Likewise.
4674 (enum pragma_context): Add pragma_struct and pragma_param.
4675 (c_parser_external_declaration): Adjust
4676 c_parser_declaration_or_fndef caller.
4677 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
4678 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
4679 Adjust recursive call.
4680 (c_parser_struct_or_union_specifier): Use pragma_struct instead
4681 of pragma_external.
4682 (c_parser_parameter_declaration): Use pragma_param instead of
4683 pragma_external.
4684 (c_parser_compound_statement_nostart, c_parser_label,
4685 c_parser_for_statement): Adjust
4686 c_parser_declaration_or_fndef callers.
4687 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
4688 it through to c_parser_conditional_expression.
4689 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
4690 pass it through to c_parser_binary_expression. Adjust recursive
4691 call.
4692 (c_parser_binary_expression): Remove prec argument, add
4693 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
4694 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
4695 binop matches it, use build2 instead of parser_build_binary_op.
4696 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
4697 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
4698 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
4699 Handle pragma_struct and pragma_param the same as pragma_external.
4700 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
4701 (c_parser_omp_variable_list): Parse array sections for
4702 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
4703 (c_parser_omp_clause_collapse): Fully fold collapse expression.
4704 (c_parser_omp_clause_reduction): Handle user defined reductions.
4705 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
4706 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
4707 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
4708 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
4709 c_parser_omp_clause_depend, c_parser_omp_clause_map,
4710 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
4711 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
4712 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
4713 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
4714 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
4715 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
4716 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
4717 (c_parser_omp_for_loop): Add CODE argument, pass it through
4718 to c_finish_omp_for. Change last argument to cclauses,
4719 and adjust uses to grab parallel clauses from the array of all
4720 the split clauses. Adjust c_parser_binary_expression,
4721 c_parser_declaration_or_fndef and c_finish_omp_for callers.
4722 (omp_split_clauses): New function.
4723 (c_parser_omp_simd): New function.
4724 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
4725 Allow the function to be called also when parsing combined constructs,
4726 and call c_parser_omp_simd when parsing for simd.
4727 (c_parser_omp_sections_scope): If section-sequence doesn't start with
4728 #pragma omp section, require exactly one structured-block instead of
4729 sequence of statements.
4730 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
4731 Allow the function to be called also when parsing combined constructs.
4732 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
4733 Allow the function to be called also when parsing combined
4734 constructs.
4735 (c_parser_omp_taskgroup, c_parser_omp_cancel,
4736 c_parser_omp_cancellation_point, c_parser_omp_distribute,
4737 c_parser_omp_teams, c_parser_omp_target_data,
4738 c_parser_omp_target_update, c_parser_omp_target,
4739 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
4740 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
4741 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
4742 (c_parser_omp_construct): Add p_name and mask vars. Handle
4743 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
4744 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
4745 and c_parser_omp_sections callers.
4746 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
4747 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
4748 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
4749 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
4750 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
4751 OMP_CLAUSE_DEPEND.
4752 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
4753 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
4754 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
4755 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
4756 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
4757 * c-typeck.c: Include tree-inline.h.
4758 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
4759 handle_omp_array_sections_1, handle_omp_array_sections,
4760 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
4761 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
4762 user defined reductions.
4763 (c_tree_equal): New function.
4764 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
4765 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
4766 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
4767 c_check_omp_declare_reduction_r): New prototypes.
4768 * c-decl.c (current_omp_declare_target_attribute): New variable.
4769 (c_decl_attributes): New function.
4770 (start_decl, start_function): Use it instead of decl_attributes.
4771 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
4772 c_omp_reduction_decl, c_omp_reduction_lookup,
4773 c_check_omp_declare_reduction_r): New functions.
4774
0a6c2227
TT
47752013-09-25 Tom Tromey <tromey@redhat.com>
4776
4777 * Make-lang.in (c/gccspec.o): Remove.
4778 (CFLAGS-c/gccspec.o): New variable.
4779 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
4780 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
4781 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
4782
f3bc55f0
TT
47832013-09-25 Tom Tromey <tromey@redhat.com>
4784
4785 * Make-lang.in (c/gccspec.o): Don't use subshell.
4786
a24d975c
MP
47872013-09-18 Marek Polacek <polacek@redhat.com>
4788
4789 PR sanitize/58443
4790 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
4791 Remove unnecessary check.
4792
ce6923c5
MP
47932013-09-18 Marek Polacek <polacek@redhat.com>
4794
4795 PR sanitizer/58411
4796 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
4797 no_sanitize_undefined attribute.
4798
a1e51df9
KT
47992013-09-13 Kai Tietz <ktietz@redhat.com>
4800
4801 PR target/57848
4802 * c-decl.c (c_builtin_function_ext_scope): Remove
4803 wrong assumption that it is never called on prexisting
4804 symbol.
4805
0af94e6f
JR
48062013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
4807
4808 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
4809
20059c8b
GDR
48102013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
4811
4812 * c-objc-common.c (c_tree_printer): Tidy.
4813
de5a5fa1
MP
48142013-08-30 Marek Polacek <polacek@redhat.com>
4815
4816 * c-typeck.c (build_binary_op): Add division by zero and shift
4817 instrumentation.
4818
2531a1d9 48192013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 4820 Joseph Myers <joseph@codesourcery.com>
2531a1d9 4821
6e2bcc98 4822 PR c/35649
2531a1d9
JR
4823 * c-typeck.c (c_common_type): Prefer double_type_node over
4824 other REAL_TYPE types with the same precision.
4825 (convert_arguments): Likewise.
4826
025311c4
GDR
48272013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
4828
4829 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
4830 (c_initialize_diagnostics): Call a destructor for the early printer.
4831
da6ca2b5
GDR
48322013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
4833
4834 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
4835 printer initialization.
4836
318cda85 48372013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 4838
318cda85
BI
4839 PR c/57490
4840 * c-array-notation.c (fix_conditional_array_notations_1): Added a
4841 check for truth values.
4842 (expand_array_notation_exprs): Added truth values case. Removed an
4843 unwanted else. Added for-loop to walk through subtrees in default
4844 case.
4845
b066401f
GDR
48462013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
4847
4848 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
4849
fb48aadc
JM
48502013-07-23 Joseph Myers <joseph@codesourcery.com>
4851
4852 * c-parser.c (struct c_generic_association): Fix typo.
4853
433cc7b0
TT
48542013-07-23 Tom Tromey <tromey@redhat.com>
4855 Joseph Myers <joseph@codesourcery.com>
4856
4857 * c-parser.c (struct c_generic_association): New.
4858 (c_generic_association_d): New typedef.
4859 (c_parser_generic_selection): New function.
4860 (c_parser_postfix_expression): Handle RID_GENERIC.
4861
26d40c3d
JM
48622013-07-13 Jason Merrill <jason@redhat.com>
4863
4864 PR c++/57793
4865 * c-decl.c (finish_struct): Check for too-large class.
4866
ecdbd01a 48672013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
4868
4869 PR c/57821
4870 * c-typeck.c (set_init_index): When folding, check for index overflow.
4871
1141ed3f
BI
48722013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
4873
4874 * c-parser.c (c_parser_array_notation): Removed rejection of array
4875 notations in an array of function pointers.
4876
713b46fa
BI
48772013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
4878
4879 * c-array-notation.c (make_triplet_val_inv): New function.
4880 (create_cmp_incr): Likewise.
4881 (create_array_refs): Likewise.
4882 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
4883 Also modularized common parts between functions and called the function.
4884 (build_array_notation_expr): Likewise.
4885 (fix_conditional_array_notations_1): Likewise.
4886 (fix_array_notation_expr): Likewise.
4887 (fix_array_notation_call_expr): Likewise.
4888
92f20202
MP
48892013-06-18 Marek Polacek <polacek@redhat.com>
4890
4891 PR c/57630
4892 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
4893
73a23b06
BI
48942013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
4895
4896 * c-array-notation.c (build_array_notation_expr): Reject array notation
4897 mismatch between LHS and RHS even inside a call_expr. Also, removed
4898 a couple while statements that were dead code.
4899
00b8517d
BI
49002013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
4901
4902 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
4903 excessive precision expressions in function parameters. Also removed
4904 couple unwanted while statements.
4905
1509bdda
BI
49062013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
4907
4908 * c-array-notation.c (expand_array_notation_exprs): Added
4909 ARRAY_NOTATION_REF case.
4910
d60f1706
BI
49112013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
4912
4913 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
4914 function to c-family/array-notation-common.c.
4915 (is_cilkplus_reduce_builtin): Likewise.
4916 (find_rank): Likewise.
4917 (extract_array_notation_exprs): Likewise.
4918 (replace_array_notations): Likewise.
4919 (find_inv_trees): Likewise.
4920 (replace_inv_trees): Likewise.
4921 (contains_array_notation_expr): Likewise.
4922 (find_correct_array_notation_type): Likewise.
4923 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
4924 (struct inv_list): Moved this to c-family/array-notation-common.c.
4925 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
4926
6d6efbb3
BI
49272013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
4928
4929 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
4930 reduction functions outside the for-loop. Added a check if the fundecl
4931 is non-NULL. Finally, removed an unwanted if-statement, and made the
4932 body unconditional.
4933
25c22937
BI
49342013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
4935
4936 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
4937 condition of the if-statement matches the rank of else-block and then-
4938 block when array notations are used.
4939 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
4940 expression after the entire function body is parsed.
4941 (c_parser_expr_no_commas): Delayed creating array notation expressions
4942 to the end of function parsing.
4943 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
4944 whole if-statement instead of just the condition.
4945 (expand_array_notation_exprs): Added MODIFY_EXPR case.
4946
edd25645
BI
49472013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
4948
4949 PR c/57474
4950 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
4951 array to NULL_TREE if they are unused. Also added a check for the
4952 field to be NULL before its fields are used in future.
4953
065ce7f1
RO
49542013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4955
4956 PR bootstrap/57450
4957 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
4958 (build_array_notation_expr): Likewise.
4959
36536d79
BI
49602013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
4961
4962 * c-typeck.c (build_array_ref): Added a check to see if array's
4963 index is greater than one. If true, then emit an error.
4964 (build_function_call_vec): Exclude error reporting and checking
4965 for builtin array-notation functions.
4966 (convert_arguments): Likewise.
4967 (c_finish_return): Added a check for array notations as a return
4968 expression. If true, then emit an error.
4969 (c_finish_loop): Added a check for array notations in a loop
4970 condition. If true then emit an error.
4971 (lvalue_p): Added a ARRAY_NOTATION_REF case.
4972 (build_binary_op): Added a check for array notation expr inside
4973 op1 and op0. If present, we call another function to find correct
4974 type.
4975 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
4976 * c-parser.c (c_parser_compound_statement): Check if array
4977 notation code is used in tree, if so, then transform them into
4978 appropriate C code.
4979 (c_parser_expr_no_commas): Check if array notation is used in LHS
4980 or RHS, if so, then build array notation expression instead of
4981 regular modify.
4982 (c_parser_postfix_expression_after_primary): Added a check for
4983 colon(s) after square braces, if so then handle it like an array
4984 notation. Also, break up array notations in unary op if found.
4985 (c_parser_direct_declarator_inner): Added a check for array
4986 notation.
4987 (c_parser_compound_statement): Added a check for array notation in
4988 a stmt. If one is present, then expand array notation expr.
4989 (c_parser_if_statement): Likewise.
4990 (c_parser_switch_statement): Added a check for array notations in
4991 a switch statement's condition. If true, then output an error.
4992 (c_parser_while_statement): Similarly, but for a while.
4993 (c_parser_do_statement): Similarly, but for a do-while.
4994 (c_parser_for_statement): Similarly, but for a for-loop.
4995 (c_parser_unary_expression): Check if array notation is used in a
4996 pre-increment or pre-decrement expression. If true, then expand
4997 them.
4998 (c_parser_array_notation): New function.
4999 * c-array-notation.c: New file.
5000 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
5001
cd192ccc
MS
50022013-05-23 Mike Stump <mikestump@comcast.net>
5003
5004 * c-typeck.c (convert_for_assignment): Handle references to memory
5005 spaces better.
5006
427b248d
JM
50072013-05-16 Jason Merrill <jason@redhat.com>
5008
5009 * Make-lang.in (cc1$(exeext)): Use link mutex.
5010
44d90fe1
PC
50112013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
5012
5013 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
5014 to simply use OPT_Wpointer_arith.
5015 (build_unary_op): Likewise.
5016
4e7d7b3d
JJ
50172013-04-03 Jakub Jelinek <jakub@redhat.com>
5018
5019 PR c/19449
5020 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
5021 argument. If set, or it temporarily for parsing of the first
5022 argument into force_folding_builtin_constant_p.
5023 (c_parser_postfix_expression): Adjust callers.
5024
839b422f
RB
50252013-03-21 Richard Biener <rguenther@suse.de>
5026
5027 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
5028 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
5029
2ee028f1
MP
50302013-02-12 Marek Polacek <polacek@redhat.com>
5031
5032 PR c/44938
5033 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
5034 origtypes to NULL.
5035
8824edff
JJ
50362013-01-24 Jakub Jelinek <jakub@redhat.com>
5037
5038 PR c/56078
5039 * c-typeck.c (set_nonincremental_init_from_string): If
5040 constructor_max_index is NULL, treat it as if tree_int_cst_lt
5041 returned false.
5042 (process_init_element): Likewise.
5043
eadd3d0d
JJ
50442012-12-20 Jakub Jelinek <jakub@redhat.com>
5045
5046 PR c++/55619
5047 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
5048 argument, don't call default_function_array_conversion
5049 nor c_fully_fold here.
5050 (c_parser_asm_statement): Adjust callers.
5051 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
5052 and outputs here, and call default_function_array_conversion
5053 on inputs that don't need to be addressable.
5054
f8a93a2e
JJ
50552012-12-18 Jakub Jelinek <jakub@redhat.com>
5056
5057 PR c/39464
5058 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
5059 warning require that both c_common_unsigned_type as well as
5060 c_common_signed_type is the same for both mvl and mvr types.
5061
9771b263
DN
50622012-11-16 Diego Novillo <dnovillo@google.com>
5063
5064 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
5065
5066 * c-common.c: Use new vec API in vec.h.
5067 * c-common.h: Likewise.
5068 * c-gimplify.c: Likewise.
5069 * c-pragma.c: Likewise.
5070 * c-pretty-print.c: Likewise.
5071 * c-pretty-print.h: Likewise.
5072 * c-semantics.c: Likewise.
5073 * c-decl.c: Likewise.
5074 * c-parser.c: Likewise.
5075 * c-tree.h: Likewise.
5076 * c-typeck.c: Likewise.
5077
880661a4
JW
50782012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
5079
5080 PR c++/54930
5081 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
5082
077d1abe
MLI
50832012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5084
5085 PR c/53066
5086 * c-decl.c (warn_if_shadowing): Do not warn if a variable
5087 shadows a function, unless the variable is a function or a
5088 pointer-to-function.
5089
3a785c97
JJ
50902012-10-12 Jakub Jelinek <jakub@redhat.com>
5091
5092 PR c/54381
5093 * c-parser.c (struct c_tree_loc_pair): Removed.
5094 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
5095 add location_t * and tree * arguments, fill in array of 3
5096 sizeof_arg trees and corresponding locs.
5097 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
5098 c_parser_expr_list callers.
5099 (c_parser_postfix_expression_after_primary): Likewise. Pass
5100 array of 3 sizeof_arg trees and locs (corresponding to first
5101 3 arguments) to sizeof_pointer_memaccess_warning.
5102
703c8606
LC
51032012-10-09 Lawrence Crowl <crowl@google.com>
5104
5105 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
5106 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
5107 hash table.
5108
5d9de0d0
PC
51092012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
5110
5111 PR c++/54194
5112 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
5113 call.
5114
a212e43f
MG
51152012-10-09 Marc Glisse <marc.glisse@inria.fr>
5116
5117 PR c++/54427
5118 * c-typeck.c: Include c-common.h.
5119 (enum stv_conv): Moved to c-common.h.
5120 (scalar_to_vector): Moved to c-common.c.
5121 (build_binary_op): Adapt to scalar_to_vector's new prototype.
5122 * Make-lang.in: c-typeck.c depends on c-common.h.
5123
3b78de56
AC
51242012-10-04 Arnaud Charlet <charlet@adacore.com>
5125
5126 * c-decl.c (c_write_global_declarations): Fix handling of
5127 -fdump-ada-spec*.
5128
78c60e3d
SS
51292012-09-30 Sharad Singhai <singhai@google.com>
5130
5131 * c-decl.c (c_write_global_declarations): Use a different method
5132 to determine if the dump has ben initialized.
5133
9f33203d
JM
51342012-09-14 Joseph Myers <joseph@codesourcery.com>
5135
5136 PR c/54552
5137 * c-typeck.c (c_cast_expr): When casting to a type requiring
5138 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
5139 c_fully_fold first.
5140
a27d595d
JM
51412012-09-14 Joseph Myers <joseph@codesourcery.com>
5142
5143 PR c/54103
5144 * c-typeck.c (build_unary_op): Pass original argument of
5145 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
5146 any C_MAYBE_CONST_EXPR, if it has integer operands.
5147 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
5148 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
5149 to c_objc_common_truthvalue_conversion, then remove any
5150 C_MAYBE_CONST_EXPR, if they have integer operands. Use
5151 c_objc_common_truthvalue_conversion not
5152 c_common_truthvalue_conversion.
5153 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
5154 call note_integer_operands for arguments with integer operands
5155 that are not integer constants.
5156
9feb29df
JJ
51572012-09-13 Jakub Jelinek <jakub@redhat.com>
5158
5159 PR c/54559
5160 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
5161 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
5162
d409320c
JJ
51632012-08-31 Jakub Jelinek <jakub@redhat.com>
5164
5165 PR c/54428
5166 * c-convert.c (convert): Don't call fold_convert_loc if
5167 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
5168 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
5169 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
5170
6265d07c
JJ
51712012-08-24 Jakub Jelinek <jakub@redhat.com>
5172
5173 PR c/54355
5174 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
5175 for nested and empty_ok arguments in the call to
5176 c_parser_declaration_or_fndef.
5177
1a4049e7
JJ
51782012-08-17 Jakub Jelinek <jakub@redhat.com>
5179
5180 * c-tree.h (c_last_sizeof_arg): Declare.
5181 * c-parser.c (struct c_tree_loc_pair): New type.
5182 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
5183 non-NULL.
5184 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
5185 (c_parser_postfix_expression_after_primary): Likewise. Call
5186 sizeof_pointer_memaccess_warning if needed.
5187 (sizeof_ptr_memacc_comptypes): New function.
5188 * c-typeck.c (c_last_sizeof_arg): New global variable.
5189 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
5190
0229aee9
UB
51912012-07-24 Uros Bizjak <ubizjak@gmail.com>
5192
5193 * c-lang.h (lang_decl): Add variable_size GTY option.
5194
7ee2468b
SB
51952012-07-16 Steven Bosscher <steven@gcc.gnu.org>
5196
5197 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
5198 * Make-lang.in: Fix dependencies.
5199
d4a10d0a
SB
52002012-06-29 Steven Bosscher <steven@gcc.gnu.org>
5201
5202 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
5203 and add language Makefile hooks.
5204 * config-lang.in: New file.
5205 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
5206 add the required "normal" config-lang.in rules.
5207 * c-lang.h: Moved from gcc/ to here.
5208 * c-tree.h: Likewise.
5209 * c-objc-common.c: Likewise.
5210 * c-objc-common.h: Likewise.
5211 * c-typeck.c: Likewise.
5212 * c-convert.c: Likewise.
5213 * c-lang.c: Likewise.
5214 * c-aux-info.c: Likewise.
5215 * c-errors.c: Likewise.
5216 * gccspec.c: Likewise.
5217 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
5218 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
5219\f
cbe34bb5 5220Copyright (C) 2012-2017 Free Software Foundation, Inc.
d4a10d0a
SB
5221
5222Copying and distribution of this file, with or without modification,
5223are permitted in any medium without royalty provided the copyright
5224notice and this notice are preserved.