]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
re PR tree-optimization/82945 (add warning for passing non-strings to functions that...
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
1af4ebf5
MG
12017-11-21 Marc Glisse <marc.glisse@inria.fr>
2
3 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
4 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
5
26edace6
DM
62017-11-20 David Malcolm <dmalcolm@redhat.com>
7
8 PR c/81404
9 * c-decl.c: Include "c-family/known-headers.h".
10 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
11 to known-headers.cc.
12 (class suggest_missing_header): Move to known-header.h.
13 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
14 than get_c_name_hint.
15
b1212255
DM
162017-11-20 David Malcolm <dmalcolm@redhat.com>
17
18 * c-decl.c (get_c_name_hint): New function.
19 (class suggest_missing_header): New class.
20 (lookup_name_fuzzy): Call get_c_name_hint and use it to
21 suggest missing headers to the user.
22
6c7a259b
DM
232017-11-20 David Malcolm <dmalcolm@redhat.com>
24
25 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
26 Include "c-family/name-hint.h"
27 (implicit_decl_warning): Convert "hint" from
28 const char * to name_hint. Pass location to
29 lookup_name_fuzzy. Suppress any deferred diagnostic if the
30 warning was not printed.
31 (undeclared_variable): Likewise for "guessed_id".
32 (lookup_name_fuzzy): Convert return type from const char *
33 to name_hint. Add location_t param.
34 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
35 Include "c-family/name-hint.h"
36 (c_parser_declaration_or_fndef): Convert "hint" from
37 const char * to name_hint. Pass location to lookup_name_fuzzy.
38 (c_parser_parameter_declaration): Likewise.
39
f9c59f7e
JJ
402017-11-19 Jakub Jelinek <jakub@redhat.com>
41
42 PR c/66618
43 PR c/69960
44 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
45 where needed.
46 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
47 handle_omp_array_sections): Likewise.
48 (digest_init): Don't call decl_constant_value_for_optimization.
49 * c-tree.h (decl_constant_value_for_optimization): Removed.
50 * c-fold.c (c_fold_array_ref): New function.
51 (c_fully_fold_internal): Add LVAL argument, propagate it through
52 recursive calls. For VAR_P call decl_constant_value and
53 unshare if not LVAL and either optimizing or IN_INIT. Remove
54 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
55 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
56 (c_fully_fold): Add LVAL argument, pass it through to
57 c_fully_fold_internal.
58 (decl_constant_value_for_optimization): Removed.
59
3ca0dc60
JM
602017-11-15 Joseph Myers <joseph@codesourcery.com>
61
62 PR c/81156
63 * c-parser.c (check_tgmath_function): New function.
64 (enum tgmath_parm_kind): New enum.
65 (c_parser_postfix_expression): Handle __builtin_tgmath.
66
64a5912c
DM
672017-10-31 David Malcolm <dmalcolm@redhat.com>
68
69 * c-decl.c (implicit_decl_warning): Update for renaming of
70 pedwarn_at_rich_loc and warning_at_rich_loc.
71 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
72 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
73 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
74 (c_parser_struct_or_union_specifier): Likewise for renaming of
75 pedwarn_at_rich_loc.
76 (c_parser_parameter_declaration): Likewise for renaming of
77 error_at_rich_loc.
78 * c-typeck.c (build_component_ref): Likewise.
79 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
80 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
81 (set_init_label): Likewise for renaming of error_at_rich_loc.
82
c1136864
RB
832017-10-30 Richard Biener <rguenther@suse.de>
84
85 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
86 stmts.
87
ee5fd23a
MM
882017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
89
90 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
91 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
92
1a59ccf2
DM
932017-10-25 David Malcolm <dmalcolm@redhat.com>
94
95 PR c/7356
96 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
97 semicolons.
98
bc1a75dd
JJ
992017-10-25 Jakub Jelinek <jakub@redhat.com>
100
101 PR libstdc++/81706
102 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
103 newdecl to corresponding __builtin_ if any.
104
ff1ff960
PC
1052017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
106
107 PR c++/82466
108 * c-decl.c (diagnose_mismatched_decls): Use
109 OPT_Wbuiltin_declaration_mismatch.
110
62e1c678
DM
1112017-10-12 David Malcolm <dmalcolm@redhat.com>
112
113 * c-parser.c (c_parser_require): Add "type_is_unique" param and
114 use it to guard calls to maybe_suggest_missing_token_insertion.
115 (c_parser_parms_list_declarator): Override default value of new
116 "type_is_unique" param to c_parser_require.
117 (c_parser_asm_statement): Likewise.
118 * c-parser.h (c_parser_require): Add "type_is_unique" param,
119 defaulting to true.
120
a92f6726
NS
1212017-10-11 Nathan Sidwell <nathan@acm.org>
122
123 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
124
8e6cdc90
RS
1252017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
126
127 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
128 operating on trees as wide_ints.
129 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
130 (c_tree_equal): Likewise.
131
8139a48e
DM
1322017-10-04 David Malcolm <dmalcolm@redhat.com>
133
134 * c-decl.c (push_parm_decl): Store c_parm's location into the
135 PARAM_DECL.
136 (build_c_parm): Add "loc" param and store it within the c_parm.
137 * c-parser.c (struct c_parser): Add "last_token_location" field.
138 (c_parser_consume_token): Store location of the token into the
139 new field.
140 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
141 when handling a FUNCTION_DECL, if it doesn't already have them.
142 (c_parser_parameter_declaration): Generate a location for the
143 parameter, and pass it to the call to build_c_parm.
144 * c-tree.h (struct c_parm): Add field "loc".
145 (build_c_parm): Add location_t param.
146 * c-typeck.c (get_fndecl_argument_location): New function.
147 (inform_for_arg): New function.
148 (convert_for_assignment): Use inform_for_arg when dealing with
149 ic_argpass.
150
2a389958
JJ
1512017-09-29 Jakub Jelinek <jakub@redhat.com>
152
7d386d45
JJ
153 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
154 width is non-NULL.
155 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
156 don't SET_DECL_C_BIT_FIELD here.
157
2a389958
JJ
158 PR c/82340
159 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
160 instead of trying to set just TREE_READONLY manually.
161
ebc6a85e
TV
1622017-09-16 Tom de Vries <tom@codesourcery.com>
163
164 PR c/81875
165 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
166 cond itself.
167
bb75facd
JM
1682017-09-15 Joseph Myers <joseph@codesourcery.com>
169
170 PR c/82071
171 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
172 for C11.
173 (build_conditional_expr): For C11, generate result with excess
174 precision when one argument is an integer and the other is of a
175 type using excess precision.
176
1d933576
BE
1772017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
178
179 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
180
267bbb6f
MP
1812017-09-13 Marek Polacek <polacek@redhat.com>
182
183 PR c/82167
184 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
185 than expr.original_type.
186
6836632e
NS
1872017-09-12 Nathan Sidwell <nathan@acm.org>
188
189 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
190 resort_sorted_fields): Moved from c-family/c-common.c.
191 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
192
e035be33
JM
1932017-09-01 Joseph Myers <joseph@codesourcery.com>
194
195 PR c/82071
196 * c-typeck.c (build_atomic_assign): Handle argument with excess
197 precision. Ensure any EXCESS_PRECISION_EXPR is present in
198 argument passed to build_binary_op and convert_for_assignment but
199 not for call to c_fully_fold.
200 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
201 Ensure build_binary_op is called with argument with original
202 semantic type. Avoid calling c_fully_fold with an
203 EXCESS_PRECISION_EXPR from build_binary_op.
204
d2e05fcb
JJ
2052017-09-01 Jakub Jelinek <jakub@redhat.com>
206
207 PR c/81887
208 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
209
b397965c
RS
2102017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
211 Alan Hayward <alan.hayward@arm.com>
212 David Sherwood <david.sherwood@arm.com>
213
214 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
215 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
216 m1 and m2 to the signed equivalent of a fixed-point
217 SCALAR_TYPE_MODE.
218
14e18d71
DM
2192017-08-24 David Malcolm <dmalcolm@redhat.com>
220
221 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
222 than CAN_HAVE_LOCATION_P when determining whether to use the
223 location_t value within "value".
224
7f204c0f
DM
2252017-08-21 David Malcolm <dmalcolm@redhat.com>
226
227 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
228 rather than peeking the location of the first token.
229 * c-tree.h (c_expr::get_location): New method.
230
2f687306
DM
2312017-08-21 David Malcolm <dmalcolm@redhat.com>
232
233 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
234 to check_function_arguments.
235
3e7b80d7
MP
2362017-08-18 Marek Polacek <polacek@redhat.com>
237
238 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
239 commentary.
240
00aa1fa2
L
2412017-08-18 H.J. Lu <hongjiu.lu@intel.com>
242
243 PR c/53037
244 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
245 (check_bitfield_type_and_width): Don't allow bit-field with
246 warn_if_not_aligned type.
247
da67acb9
MS
2482017-08-14 Martin Sebor <msebor@redhat.com>
249
250 PR c/81117
251 * c-objc-common.c (c_objc_common_init): Handle 'G'.
252
bb85aa74
MP
2532017-08-11 Marek Polacek <polacek@redhat.com>
254
255 PR c/81795
256 * c-decl.c (pushtag): Only print inform if the warning was printed.
257 (grokdeclarator): Likewise.
258
32129a17
DM
2592017-08-10 David Malcolm <dmalcolm@redhat.com>
260
261 * c-parser.c (c_parser_error): Rename to...
262 (c_parser_error_richloc): ...this, making static, and adding
263 "richloc" parameter, passing it to the c_parse_error call,
264 rather than calling c_parser_set_source_position_from_token.
265 (c_parser_error): Reintroduce, reimplementing in terms of the
266 above, converting return type from void to bool.
267 (class token_pair): New class.
268 (struct matching_paren_traits): New struct.
269 (matching_parens): New typedef.
270 (struct matching_brace_traits): New struct.
271 (matching_braces): New typedef.
272 (get_matching_symbol): New function.
273 (c_parser_require): Add param MATCHING_LOCATION, using it to
274 highlight matching "opening" tokens for missing "closing" tokens.
275 (c_parser_skip_until_found): Likewise.
276 (c_parser_static_assert_declaration_no_semi): Convert explicit
277 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
278 class matching_parens, so that the pertinent open parenthesis is
279 highlighted when there are problems locating the close
280 parenthesis.
281 (c_parser_struct_or_union_specifier): Likewise.
282 (c_parser_typeof_specifier): Likewise.
283 (c_parser_alignas_specifier): Likewise.
284 (c_parser_simple_asm_expr): Likewise.
285 (c_parser_braced_init): Likewise, for matching_braces.
286 (c_parser_paren_condition): Likewise, for matching_parens.
287 (c_parser_switch_statement): Likewise.
288 (c_parser_for_statement): Likewise.
289 (c_parser_asm_statement): Likewise.
290 (c_parser_asm_operands): Likewise.
291 (c_parser_cast_expression): Likewise.
292 (c_parser_sizeof_expression): Likewise.
293 (c_parser_alignof_expression): Likewise.
294 (c_parser_generic_selection): Likewise.
295 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
296 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
297 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
298 In case CPP_OPEN_PAREN, pass loc_open_paren to the
299 c_parser_skip_until_found call.
300 (c_parser_objc_class_definition): Use class matching_parens as
301 above.
302 (c_parser_objc_method_decl): Likewise.
303 (c_parser_objc_try_catch_finally_statement): Likewise.
304 (c_parser_objc_synchronized_statement): Likewise.
305 (c_parser_objc_at_property_declaration): Likewise.
306 (c_parser_oacc_wait_list): Likewise.
307 (c_parser_omp_var_list_parens): Likewise.
308 (c_parser_omp_clause_collapse): Likewise.
309 (c_parser_omp_clause_default): Likewise.
310 (c_parser_omp_clause_if): Likewise.
311 (c_parser_omp_clause_num_threads): Likewise.
312 (c_parser_omp_clause_num_tasks): Likewise.
313 (c_parser_omp_clause_grainsize): Likewise.
314 (c_parser_omp_clause_priority): Likewise.
315 (c_parser_omp_clause_hint): Likewise.
316 (c_parser_omp_clause_defaultmap): Likewise.
317 (c_parser_oacc_single_int_clause): Likewise.
318 (c_parser_omp_clause_ordered): Likewise.
319 (c_parser_omp_clause_reduction): Likewise.
320 (c_parser_omp_clause_schedule): Likewise.
321 (c_parser_omp_clause_num_teams): Likewise.
322 (c_parser_omp_clause_thread_limit): Likewise.
323 (c_parser_omp_clause_aligned): Likewise.
324 (c_parser_omp_clause_linear): Likewise.
325 (c_parser_omp_clause_safelen): Likewise.
326 (c_parser_omp_clause_simdlen): Likewise.
327 (c_parser_omp_clause_depend): Likewise.
328 (c_parser_omp_clause_map): Likewise.
329 (c_parser_omp_clause_device): Likewise.
330 (c_parser_omp_clause_dist_schedule): Likewise.
331 (c_parser_omp_clause_proc_bind): Likewise.
332 (c_parser_omp_clause_uniform): Likewise.
333 (c_parser_omp_for_loop): Likewise.
334 (c_parser_cilk_clause_vectorlength): Likewise.
335 (c_parser_cilk_clause_linear): Likewise.
336 (c_parser_transaction_expression): Likewise.
337 * c-parser.h (c_parser_require): Add param matching_location with
338 default UNKNOWN_LOCATION.
339 (c_parser_error): Convert return type from void to bool.
340 (c_parser_skip_until_found): Add param matching_location with
341 default UNKNOWN_LOCATION.
342
30af3a2b
MP
3432017-08-09 Marek Polacek <polacek@redhat.com>
344
345 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
346 * c-tree.h (build_external_ref): Update declaration.
347 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
348 (build_external_ref): Change the type of a parameter to bool.
349 (parser_build_binary_op): Use true/false instead of 1/0.
350 (pointer_diff): Likewise.
351 (build_modify_expr): Likewise.
352 (set_designator): Change the type of a parameter to bool.
353 (set_init_index): Use true/false instead of 1/0.
354 (set_init_label): Likewise.
355 (output_init_element): Change the type of a parameter to bool.
356 (output_pending_init_elements): Use true/false instead of 1/0.
357 (process_init_element): Likewise.
358 (build_binary_op): Change the type of a parameter to bool.
359
296c53ac
MP
3602017-08-09 Marek Polacek <polacek@redhat.com>
361
362 PR c/81233
363 * c-typeck.c (pedwarn_init): Make the function take a variable list.
364 Call emit_diagnostic_valist instead of pedwarn.
365 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
366 Print the relevant types in diagnostics.
367
a32c8316
MP
3682017-08-09 Marek Polacek <polacek@redhat.com>
369
370 PR c/81417
371 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
372 build_conditional_expr.
373 * c-parser.c (c_parser_conditional_expression): Create locations for
374 EXP1 and EXP2 from their source ranges. Pass the locations down to
375 build_conditional_expr.
376 * c-tree.h (build_conditional_expr): Update declaration.
377 * c-typeck.c (build_conditional_expr): Add location_t parameters.
378 For -Wsign-compare, also print the types.
379
314e6352
ML
3802017-08-08 Martin Liska <mliska@suse.cz>
381
382 * c-convert.c: Include header files.
383 * c-typeck.c: Likewise.
384
577eec56
ML
3852017-08-07 Martin Liska <mliska@suse.cz>
386
387 * c-parser.c (c_parser_attributes): Canonicalize name of an
388 attribute.
389
f7b6353a
MP
3902017-08-02 Marek Polacek <polacek@redhat.com>
391
392 PR c/81289
393 * c-parser.c (c_parser_unary_expression): Use set_error.
394
8a6eab34
MP
395 PR c/81448
396 PR c/81306
397 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
398 warnings. Avoid walking MACRO_MAP_LOCATIONS.
399
7fef86d3
JH
4002017-07-31 Jan Hubicka <hubicka@ucw.cz>
401 Martin Liska <mliska@suse.cz>
402
403 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 404 statement.
7fef86d3 405
f34ebeb2
ML
4062017-07-31 Martin Liska <mliska@suse.cz>
407
408 PR sanitize/81530
409 * c-convert.c (convert): Guard condition with flag_sanitize_p
410 also with current_function_decl non-null equality.
411 * c-decl.c (grokdeclarator): Likewise.
412 * c-typeck.c (build_binary_op): Likewise.
413
8595f67b
MP
4142017-07-25 Marek Polacek <polacek@redhat.com>
415
416 * c-decl.c (grokfield): Remove local variable.
417
d49718d6
MP
4182017-07-25 Marek Polacek <polacek@redhat.com>
419
420 PR c/81364
421 * c-parser.c (c_parser_else_body): Don't warn about multistatement
422 macro expansion if the body is in { }.
423 (c_parser_while_statement): Likewise.
424 (c_parser_for_statement): Likewise.
425
ff22eb12
NS
4262017-07-18 Nathan Sidwell <nathan@acm.org>
427
428 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
429
eea77d1f
DM
4302017-07-14 David Malcolm <dmalcolm@redhat.com>
431
432 * c-decl.c (implicitly_declare): When suggesting a missing
433 #include, provide a fix-it hint.
434
b6f43128
DM
4352017-07-06 David Malcolm <dmalcolm@redhat.com>
436
437 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
438 and call that instead.
439 * c-tree.h (selftest::run_c_tests): New decl.
440
3e2becc4
MP
4412017-06-26 Marek Polacek <polacek@redhat.com>
442
443 PR c/80116
444 * c-parser.c (c_parser_if_body): Set the location of the
445 body of the conditional after parsing all the labels. Call
446 warn_for_multistatement_macros.
447 (c_parser_else_body): Likewise.
448 (c_parser_switch_statement): Likewise.
449 (c_parser_while_statement): Likewise.
450 (c_parser_for_statement): Likewise.
451 (c_parser_statement): Add a default argument. Save the location
452 after labels have been parsed.
453 (c_parser_c99_block_statement): Likewise.
454
343ae898
RB
4552017-06-19 Richard Biener <rguenther@suse.de>
456
457 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
458 negated _Literals to parse _Literal (int) -1.
459
45b2222a
ML
4602017-06-13 Martin Liska <mliska@suse.cz>
461
462 PR sanitize/78204
463 * c-convert.c (convert): Use sanitize_flags_p.
464 * c-decl.c (grokdeclarator): Likewise.
465 * c-typeck.c (convert_for_assignment): Likewise.
466 (c_finish_return): Likewise.
467 (build_binary_op): Likewise.
468
8ab7005b
JJ
4692017-06-08 Jakub Jelinek <jakub@redhat.com>
470
471 PR c/81006
472 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
473 to sizetype before size_binop.
474
363dc72c
JJ
4752017-06-07 Jakub Jelinek <jakub@redhat.com>
476
477 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
478 of TDI_generic.
479
dc949728
MP
4802017-06-06 Marek Polacek <polacek@redhat.com>
481
482 PR c/79983
483 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
484 ref.
485 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
486
40ffd95f
BE
4872017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
488
489 * c-parser.c (c_parser_binary_expression): Implement the
490 -Wsizeof_pointer_div warning.
491 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
492 from a parenthesized expression.
493 (c_parser_expr_list): Use c_last_sizeof_loc.
494 * c-tree.h (c_last_sizeof_loc): New external.
495 * c-typeck.c (c_last_sizeof_loc): New variable.
496 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
497
9fc5e7a4
MM
4982017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
499
500 PR testsuite/80580
501 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
502
f012c8ef
DM
5032017-05-30 David Malcolm <dmalcolm@redhat.com>
504
505 * c-objc-common.c (c_tree_printer): Gain bool and const char **
506 parameters.
507
3cd211af
MS
5082017-05-24 Martin Sebor <msebor@redhat.com>
509
510 PR c/80731
511 * c-fold.c (c_fully_fold_internal): Adjust.
512 * c-typeck.c (parser_build_unary_op): Adjust.
513
fd71a9a2
TS
5142017-05-23 Thomas Schwinge <thomas@codesourcery.com>
515
516 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
517 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
518 "VECTOR_LENGTH".
519
92fa0f9e
MP
5202017-05-23 Marek Polacek <polacek@redhat.com>
521
522 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
523 quotes.
524
d11c168a
JJ
5252017-05-22 Jakub Jelinek <jakub@redhat.com>
526
527 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
528 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
529 it returned invariant. Call tree_invariant_p unconditionally
530 afterwards to decide whether to return expr or op0.
531
58aca9d9
NS
5322017-05-22 Nathan Sidwell <nathan@acm.org>
533
534 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
535
7fd549d2
TS
5362017-05-19 Thomas Schwinge <thomas@codesourcery.com>
537
538 * c-parser.c (c_parser_omp_clause_default): Handle
539 "OMP_CLAUSE_DEFAULT_PRESENT".
540
6ecd2339
BE
5412017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
542
543 * config-lang.in (gtfiles): Add c-family/c-format.c.
544
8a57ecff
NS
5452017-05-18 Nathan Sidwell <nathan@acm.org>
546
547 * c-decl.c (pushdecl_top_level): Delete unused function.
548
6574d78e
MP
5492017-05-18 Marek Polacek <polacek@redhat.com>
550
551 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
552 (check_earlier_gotos): Likewise.
553 (define_label): Likewise.
554 (pending_xref_error): Likewise.
555 (smallest_type_quals_location): Likewise.
556 (grokdeclarator): Likewise.
557 (grokparms): Likewise.
558 (identifier_global_value): Likewise.
559 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
560 (find_init_member): Likewise.
561
e3455240
MP
5622017-05-18 Marek Polacek <polacek@redhat.com>
563
564 * c-decl.c (start_decl): Use false/true instead of 0/1.
565 (grokdeclarator): Likewise.
566 (finish_struct): Likewise.
567 (start_function): Change the return type to bool. Use false/true
568 instead of 0/1.
569 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
570 * c-tree.h (start_function): Update.
571 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
572 (set_designator): Change the return type to bool. Use false/true
573 instead of 0/1.
574
3fa8871b
MP
5752017-05-17 Marek Polacek <polacek@redhat.com>
576
577 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
578 * c-typeck.c: Likewise.
579
142473df
MP
5802017-05-17 Marek Polacek <polacek@redhat.com>
581
582 PR sanitizer/80659
583 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
584 DECL_IGNORED_P even for non-static compound literals.
585
1a817418
ML
5862017-05-17 Martin Liska <mliska@suse.cz>
587
588 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
589 use it instead of int type.
590
b2fa0a8b
MP
5912017-05-17 Marek Polacek <polacek@redhat.com>
592
593 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
594 call c_fully_fold.
595 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
596 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
597 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
598 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
599 save_expr.
600 (c_parser_conditional_expression): Likewise.
601 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
602 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
603 (process_init_element): Likewise.
604 (build_binary_op): Likewise.
605 (handle_omp_array_sections_1): Likewise.
606
1e47f02b
TS
6072017-05-12 Thomas Schwinge <thomas@codesourcery.com>
608
609 * c-parser.c (c_parser_omp_clause_num_gangs)
610 (c_parser_omp_clause_num_workers)
611 (c_parser_omp_clause_vector_length): Merge functions into...
612 (c_parser_oacc_single_int_clause): ... this new function. Adjust
613 all users.
614
c24e924f
NS
6152017-05-11 Nathan Sidwell <nathan@acm.org>
616
617 * gimple-parser.c: Don't #include tree-dump.h.
618
c587104e
MM
6192017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
620
621 PR testsuite/80580
622 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
623
67ac9a9d
MM
6242017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
625
626 PR testsuite/80580
627 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
628 incorrect __MEM syntax.
629
ac4eb40f
MM
6302017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
631
632 PR testsuite/80580
633 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
634 type of unary '*'.
635
641da50a
NS
6362017-05-09 Nathan Sidwell <nathan@acm.org>
637
638 * c-tree.h (pushdecl): Declare.
639
56d35585
DM
6402017-05-05 David Malcolm <dmalcolm@redhat.com>
641
642 * c-decl.c (warn_defaults_to): Replace report_diagnostic
643 with diagnostic_report_diagnostic.
644 * c-errors.c (pedwarn_c99): Likewise.
645 (pedwarn_c90): Likewise.
646
815d9cc6
XR
6472017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
648
649 PR c++/80038
650 * c-gimplify.c (c_gimplify_expr): Remove calls to
651 cilk_gimplifY_call_params_in_spawned_fn.
652
1c4ea66f
DM
6532017-04-25 David Malcolm <dmalcolm@redhat.com>
654
655 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
656 hint for removing extra semicolon.
657
666f7903
JJ
6582017-04-21 Jakub Jelinek <jakub@redhat.com>
659
660 PR c/80468
661 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
662 enabled, set specs->type to integer_type_node.
663
5764ee3c
JW
6642017-04-03 Jonathan Wakely <jwakely@redhat.com>
665
666 * c-array-notation.c: Fix typo in comment.
667
10fa8dfb
MP
6682017-03-29 Marek Polacek <polacek@redhat.com>
669
670 PR c/79730
671 * c-decl.c (finish_decl): Check VAR_P.
672
a9e4a1a5
JJ
6732017-03-27 Jakub Jelinek <jakub@redhat.com>
674
675 PR middle-end/80162
676 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
677 * c-typeck.c (c_mark_addressable): Likewise. Look through
678 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
679 to ARRAY_TYPE.
680 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
681
ee3ff394
MP
6822017-03-23 Marek Polacek <polacek@redhat.com>
683
684 * c-tree.h: Remove a C_RID_YYCODE reference.
685
4d1b8e70
JJ
6862017-03-21 Jakub Jelinek <jakub@redhat.com>
687
688 PR c/80097
689 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
690 optional COMPOUND_EXPR with ubsan instrumentation.
691
31dc71a8
MP
6922017-03-17 Marek Polacek <polacek@redhat.com>
693
694 * c-parser.c: Add C11 references.
695
d579c385
MP
6962017-03-15 Marek Polacek <polacek@redhat.com>
697
698 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
699
85059a38
MP
7002017-03-11 Marek Polacek <polacek@redhat.com>
701
702 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
703
2f6f187a
DM
7042017-03-10 David Malcolm <dmalcolm@redhat.com>
705
706 PR translation/79848
707 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
708 "%qs".
709 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
710
36618428
MP
7112017-03-09 Marek Polacek <polacek@redhat.com>
712
713 PR sanitizer/79757
714 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
715 parameter declarations with initializers.
716
01e5af5a
JJ
7172017-03-09 Jakub Jelinek <jakub@redhat.com>
718
719 PR c/79969
720 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
721 TYPE_STUB_DECL.
722
a71dbc63
JJ
7232017-03-07 Jakub Jelinek <jakub@redhat.com>
724
725 PR c/79834
726 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
727 for "may only be used in compound statements" diagnostics, change it
728 such that the same translatable string is used for all pragmas. For
729 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
730 diagnostics.
731 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
732 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
733 "may only be used in compound statements" diagnostics, such that the
734 same translatable string is used for all pragmas.
735
1ff4bae6
MP
7362017-03-04 Marek Polacek <polacek@redhat.com>
737
738 PR c/79847
739 * c-decl.c (implicit_decl_warning): Add missing space.
740
7f5a7d78
MP
7412017-03-03 Marek Polacek <polacek@redhat.com>
742
743 PR c/79758
744 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
745 current_function_prototype_arg_types is error_mark_node. Fix
746 formatting. Use TREE_VALUE instead of TREE_TYPE.
747
883c8f06
JJ
7482017-03-03 Jakub Jelinek <jakub@redhat.com>
749
79c9b7a8
JJ
750 PR c/79837
751 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
752 %<min%> or %<max%> in the diagnostics, instead mention identifier.
753 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
754 diagnostics.
755
883c8f06
JJ
756 PR c/79836
757 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
758 instead of %<_Generic>.
759 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
760 (c_parser_omp_target_exit_data): Use %<release%> instead of
761 %<release>.
762
324ff1a0
JJ
7632017-02-28 Jakub Jelinek <jakub@redhat.com>
764
765 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
766 instead of just cond ? "..." : "...".
767 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
768 for "enter"/"exit" keyword.
769 (c_finish_oacc_routine): Don't use %s to supply portions of the
770 message.
771
4227c9ad
JJ
7722017-02-24 Jakub Jelinek <jakub@redhat.com>
773
774 PR c++/79588
775 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
776 handle -Wrestrict here.
777 * c-typeck.c (build_function_call_vec): Adjust
778 check_function_arguments caller.
779
5d972e66
RB
7802017-02-23 Richard Biener <rguenther@suse.de>
781
782 PR c/79684
783 * gimple-parser.c (c_parser_gimple_statement): Use set_error
784 to initialize c_exprs to return.
785 (c_parser_gimple_binary_expression): Likewise.
786 (c_parser_gimple_unary_expression): Likewise.
787 (c_parser_gimple_postfix_expression): Likewise.
788
61ac5ebe
MP
7892017-02-22 Marek Polacek <polacek@redhat.com>
790
791 PR c/79662
792 * c-typeck.c (convert_arguments): Handle error_mark_node.
793
41d1b0b1
PK
7942017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
795
796 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
797 value of c_parser_parse_ssa_name against error_mark_node and emit
798 error if ssa name is anonymous and written as default definition.
799
eab1f169
PK
8002017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
801
802 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
803 FMA_EXPR.
804
bcac0b4d
JJ
8052017-02-16 Jakub Jelinek <jakub@redhat.com>
806
807 PR c++/79512
808 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
809 ignore #pragma omp target even when not followed by identifier.
810
1be33173
PK
8112017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
812
813 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
814 (c_parser_gimple_unary_expression): Likewise.
815
aa326bfb
JJ
8162017-02-13 Jakub Jelinek <jakub@redhat.com>
817
818 * c-parser.c (c_parser_oacc_declare): Add missing space in
819 diagnostics.
820
8a398bc5
PK
8212017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
822
823 PR c/79478
824 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
825 set_c_expr_source_range when parsing ssa-name.
826
3dcde5ef
PG
8272017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
828 Richard Biener <rguenther@suse.de>
829
830 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
831 building IL when arguments are error_mark_node.
832 (c_parser_gimple_unary_expression): Likewise.
833 (c_parser_gimple_if_stmt): Likewise.
834 (c_parser_gimple_switch_stmt): Likewise.
835 (c_parser_gimple_return_stmt): Likewise.
836 (c_parser_parse_ssa_name): When name lookup fails do not build
837 an SSA name. Use undeclared rather than not declared in error
838 reporting.
839
192b048b
MP
8402017-02-09 Marek Polacek <polacek@redhat.com>
841
842 PR c/79428
843 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
844 instead of c_parser_skip_until_found.
845
56f71478
JJ
8462017-02-09 Jakub Jelinek <jakub@redhat.com>
847
848 PR c/79431
849 * c-parser.c (c_parser_omp_declare_target): Don't invoke
850 symtab_node::get on automatic variables.
851
02889d23
CLT
8522016-02-09 Nathan Sidwell <nathan@codesourcery.com>
853 Chung-Lin Tang <cltang@codesourcery.com>
854
855 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
856 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
857 semantic checking.
858 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
859
7af4b20d
RB
8602017-02-07 Richard Biener <rguenther@suse.de>
861
862 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
863 (c_parser_gimple_postfix_expression_after_primary):
864 Do not use c_build_function_call_vec to avoid folding and promotion.
865 Simplify.
866
e5e391d6
MO
8672017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
868
869 PR lto/79061
870 * c-decl.c (pop_scope): Pass main_input_filename to
871 build_translation_unit_decl.
872
c2e84327
DM
8732017-01-24 David Malcolm <dmalcolm@redhat.com>
874
875 * c-parser.c: Include "read-rtl-function.h" and
876 "run-rtl-passes.h".
877 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
878 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
879 production. Update for renaming of field "gimple_pass" to
880 "gimple_or_rtl_pass". If __RTL was seen, call
881 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
882 to an auto_timevar, to cope with early exit.
883 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
884 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
885 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
886 Handle RID_RTL.
887 (c_parser_parse_rtl_body): New function.
888 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
889 (struct c_declspecs): Rename field "gimple_pass" to
890 "gimple_or_rtl_pass". Add field "rtl_p".
891 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
892 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
893 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
894 (c_parser_gimple_or_rtl_pass_list): ...this.
895
2ebd93e1
MP
8962017-01-20 Marek Polacek <polacek@redhat.com>
897
898 PR c/64279
899 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
900
b1c95bb5
RB
9012017-01-13 Richard Biener <rguenther@suse.de>
902
903 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
904 nops.
905
25329913
RB
9062017-01-13 Richard Biener <rguenther@suse.de>
907
908 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
909 _Literal ( type-name ) number.
910
6bb4ea5c
RB
9112017-01-12 Richard Biener <rguenther@suse.de>
912
913 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
914 __MEM.
915
6b5b4e9c
JJ
9162017-01-11 Jakub Jelinek <jakub@redhat.com>
917
918 PR c++/72813
919 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
920 PCH file.
921
e3252775
RB
9222017-01-11 Richard Biener <rguenther@suse.de>
923
924 PR bootstrap/79052
925 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
926 returns on parse errors.
927
a9342885
MP
9282017-01-04 Marek Polacek <polacek@redhat.com>
929
930 PR c++/64767
931 * c-parser.c (c_parser_postfix_expression): Mark zero character
932 constants by setting original_type in c_expr.
933 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
934 with a zero character constant.
935 (char_type_p): New function.
936
5dd9a9d0
DM
9372017-01-04 David Malcolm <dmalcolm@redhat.com>
938
939 * c-parser.c (c_parser_declaration_or_fndef): Create a
940 rich_location at init_loc and parse it to start_init.
941 (last_init_list_comma): New global.
942 (c_parser_braced_init): Update last_init_list_comma when parsing
943 commas. Pass it to pop_init_level. Pass location of closing
944 brace to pop_init_level.
945 (c_parser_postfix_expression_after_paren_type): Create a
946 rich_location at type_loc and parse it to start_init.
947 (c_parser_omp_declare_reduction): Likewise for loc.
948 * c-tree.h (start_init): Add rich_location * param.
949 (pop_init_level): Add location_t param.
950 * c-typeck.c (struct initializer_stack): Add field
951 "missing_brace_richloc".
952 (start_init): Add richloc param, use it to initialize
953 the stack node's missing_brace_richloc.
954 (last_init_list_comma): New decl.
955 (finish_implicit_inits): Pass last_init_list_comma to
956 pop_init_level.
957 (push_init_level): When finding missing open braces, add fix-it
958 hints to the richloc.
959 (pop_init_level): Add "insert_before" param and pass it
960 when calling pop_init_level. Add fixits about missing
961 close braces to any richloc. Use the richloc for the
962 -Wmissing-braces warning.
963 (set_designator): Pass last_init_list_comma to pop_init_level.
964 (process_init_element): Likewise.
965
cbe34bb5
JJ
9662017-01-01 Jakub Jelinek <jakub@redhat.com>
967
968 Update copyright years.
969
d17680f3
JJ
9702016-12-21 Jakub Jelinek <jakub@redhat.com>
971
0dba7960
JJ
972 PR bootstrap/78817
973 * c-typeck.c (build_function_call_vec): If check_function_arguments
974 returns true, set TREE_NO_WARNING on CALL_EXPR.
975
d17680f3
JJ
976 PR c/77767
977 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
978 to *expr instead of overwriting it.
979
aa90531e
RB
9802016-12-20 Richard Biener <rguenther@suse.de>
981
982 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
983 error recovery.
984 (c_parser_gimple_statement): Only build assigns for non-error
985 stmts.
986 (c_parser_gimple_postfix_expression_after): Improve error recovery.
987
629b3d75
MJ
9882016-12-14 Martin Jambor <mjambor@suse.cz>
989
990 * c-parser.c: Include omp-general.h and omp-offload.h instead of
991 omp-low.h.
992 (c_finish_oacc_routine): Adjusted call to
993 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
994 to use their new names.
995 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
996 use its new name.
997 (c_parser_oacc_update): Likewise.
998 (c_parser_omp_simd): Likewise.
999 (c_parser_omp_target_update): Likewise.
1000 * c-typeck.c: Include omp-general.h instead of omp-low.h.
1001 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
1002 name.
1003 (c_finish_omp_cancellation_point): Likewise.
1004 * gimple-parser.c: Do not include omp-low.h
1005
c5af52eb
CP
10062016-12-02 Cesar Philippidis <cesar@codesourcery.com>
1007 James Norris <jnorris@codesourcery.com>
1008
1009 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
1010 EXIT_DATA,WAIT} are not used in compound statements.
1011 (c_parser_oacc_enter_exit_data): Update diagnostics.
1012
48330c93
BE
10132016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
1014
1015 PR c++/71973
1016 * c-decl.c (diagnose_mismatched_decls): Use
1017 OPT_Wbuiltin_declaration_mismatch here too.
1018
899ca90e 10192016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
1020 Alan Hayward <alan.hayward@arm.com>
1021 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
1022
1023 * c-decl.c (merge_decls): Use SET_DECL_MODE.
1024 (make_label, finish_struct): Likewise.
1025
1ee62b92 10262016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 1027 Richard Biener <rguenther@suse.de>
22b15758 1028
8e745a17
JJ
1029 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
1030 * config-lang.in (gtfiles): Add c/c-parser.h.
1031 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
1032 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
1033 * c-parser.c (enum c_id_kind, struct c_token,
1034 c_parser_next_token_is, c_parser_next_token_is_not,
1035 c_parser_next_token_is_keyword,
1036 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
1037 Split out to ...
1038 * c-parser.h: ... new header.
1039 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 1040 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
1041 c_token_starts_typename, c_parser_next_token_starts_declspecs,
1042 c_parser_next_tokens_start_declaration, c_parser_consume_token,
1043 c_parser_error, c_parser_require, c_parser_skip_until_found,
1044 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1045 c_parser_type_name): Export.
1046 (c_parser_tokens_buf): New function.
1047 (c_parser_error): Likewise.
1048 (c_parser_set_error): Likewise.
1049 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
1050 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
1051 via c_parser_parse_gimple_body.
8e745a17
JJ
1052 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
1053 c_token_starts_typename, c_parser_next_token_starts_declspecs,
1054 c_parser_next_tokens_start_declaration, c_parser_consume_token,
1055 c_parser_error, c_parser_require, c_parser_skip_until_found,
1056 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
1057 c_parser_type_name): Declare.
1ee62b92
PG
1058 (struct c_parser): Declare forward.
1059 (c_parser_tokens_buf): Declare.
8e745a17
JJ
1060 (c_parser_error): Likewise.
1061 (c_parser_set_error): Likewise.
1062 * gimple-parser.c: New file.
1063 * gimple-parser.h: Likewise.
1ee62b92 1064
22b15758
UB
10652016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1066
1067 PR c/35503
1068 * c-parser.c (c_parser_postfix_expression_after_primary): Call
1069 warn_for_restrict.
1070
84ff4775
LCW
10712016-09-11 Le-Chun Wu <lcwu@google.com>
1072 Mark Wielaard <mjw@redhat.com>
1073
1074 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
1075 to the given -Wshadow= variant.
1076
4d0cdd0c
TP
10772016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
1078
1079 * c-typeck.c: Include memmodel.h.
1080
1202f33e
JJ
10812016-10-13 Jakub Jelinek <jakub@redhat.com>
1082
1083 PR target/77957
1084 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
1085 instead of lhd_return_null_tree_v.
1086
8a14afd0
BS
10872016-10-07 Bernd Schmidt <bschmidt@redhat.com>
1088
1089 PR c++/69733
1090 * c-decl.c (smallest_type_quals_location): New static function.
1091 (grokdeclarator): Try to find the correct location for an ignored
1092 qualifier.
1093
81fea426
MP
10942016-09-26 Marek Polacek <polacek@redhat.com>
1095
1096 PR c/7652
1097 * c-decl.c (pop_scope): Add gcc_fallthrough.
1098
10992016-09-26 Marek Polacek <polacek@redhat.com>
1100
1101 PR c/7652
1102 * c-parser.c (struct c_token): Add flags field.
1103 (c_lex_one_token): Pass it to c_lex_with_flags.
1104 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
1105 into IFN_FALLTHROUGH.
1106 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
1107 attribute fallthrough after a case label or default label.
1108 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
1109
9a2300e9
MP
11102016-09-24 Marek Polacek <polacek@redhat.com>
1111
1112 PR c/77490
1113 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
1114 have boolean value. Warn about ++/-- on booleans.
1115
7de76362
JJ
11162016-09-23 Jakub Jelinek <jakub@redhat.com>
1117
1118 * c-parser.c (incomplete_record_decls): Remove unnecessary
1119 = vNULL initialization of file scope vec.
1120
5b73d2ab
MP
11212016-09-16 Marek Polacek <polacek@redhat.com>
1122
1123 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
1124
e51fbec3
MP
11252016-09-14 Marek Polacek <polacek@redhat.com>
1126
1127 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
1128 (fix_array_notation_expr): Likewise.
1129 * c-decl.c (finish_decl): Likewise.
1130 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1131 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
1132 (function_to_pointer_conversion): Use false instead of 0.
1133 (convert_lvalue_to_rvalue): Likewise.
1134 (parser_build_unary_op): Likewise.
1135 (build_atomic_assign): Likewise.
1136 (build_unary_op): Change nonconvert parameter type to bool, use
1137 true/false instead of 1/0.
1138 (build_binary_op): Use true instead of 1.
1139
254830ba
DM
11402016-09-13 David Malcolm <dmalcolm@redhat.com>
1141
1142 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
1143 of add_fixit_insert to add_fixit_insert_before.
1144
4c13ba17
MP
11452016-09-13 Marek Polacek <polacek@redhat.com>
1146
1147 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
1148 it.
1149
54dcdb88
BE
11502016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
1151
1152 PR c++/77496
1153 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
1154 COMPOUND_EXPR to warn_for_omitted_condop.
1155
e5106e27
DM
11562016-09-07 David Malcolm <dmalcolm@redhat.com>
1157
1158 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
1159 c_get_substring_location for this new langhook.
1160
9dc5773f
JJ
11612016-09-02 Jakub Jelinek <jakub@redhat.com>
1162
1163 PR c/65467
1164 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
1165 flag_openmp.
1166 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
1167 instead of mark_exp_read on low_bound/length expression.
1168 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
1169 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
1170 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
1171 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
1172 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
1173 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
1174 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
1175 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
1176 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
1177 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
1178 instead of mark_expr_read.
1179 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
1180 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
1181 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
1182 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
1183 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
1184 array section bases outside of depend clause, for depend clause
1185 use convert_lvalue_to_rvalue on the base.
1186 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
1187 linear, aligned, map, to and from clauses.
1188 (c_omp_clause_copy_ctor): New function.
1189
295844f6
MP
11902016-09-01 Marek Polacek <polacek@redhat.com>
1191
1192 PR c/7652
1193 * c-typeck.c (composite_type): Add FALLTHRU comment.
1194
089af25c
DM
11952016-08-31 David Malcolm <dmalcolm@redhat.com>
1196
1197 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
1198 to the insertion fixits for "struct", "union", and "enum".
1199
f9087798
DM
12002016-08-30 David Malcolm <dmalcolm@redhat.com>
1201
1202 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
1203 rather than add_fixit_misspelled_id.
1204 (undeclared_variable): Likewise.
1205 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
1206 now-redundant "here" params from add_fixit_insert method calls.
1207 (c_parser_parameter_declaration): Likewise.
1208 * c-typeck.c (build_component_ref): Remove now-redundant range
1209 param from add_fixit_replace method calls.
1210
ebef225f
MP
12112016-08-25 Marek Polacek <polacek@redhat.com>
1212
1213 * c-typeck.c (parser_build_binary_op): Pass LHS to
1214 warn_logical_not_parentheses.
1215
fe377a48
MP
12162016-08-25 Marek Polacek <polacek@redhat.com>
1217
1218 PR c/77323
1219 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
1220 or _FloatN or _FloatNx is not supported.
1221 (finish_declspecs): Set type to integer_type_node when _FloatN or
1222 _FloatNx is not supported.
1223
c65699ef
JM
12242016-08-19 Joseph Myers <joseph@codesourcery.com>
1225
1226 PR c/32187
1227 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
1228 (struct c_declspecs): Add field floatn_nx_idx.
1229 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
1230 and _FloatNx type specifiers.
1231 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
1232 (c_parser_declspecs, c_parser_attribute_any_word)
1233 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
1234 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
1235 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
1236 narrower than double.
1237
2f1364c2
JJ
12382016-08-12 Jakub Jelinek <jakub@redhat.com>
1239 Martin Liska <mliska@suse.cz>
1240
1241 PR c/67410
1242 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
1243 % to determine val element to change. Assert that
1244 wchar_bytes * charwidth fits into val array.
1245
191816a3
MP
12462016-08-12 Marek Polacek <polacek@redhat.com>
1247
1248 PR c/7652
1249 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
1250 (c_parser_postfix_expression): Likewise.
1251 * c-typeck.c (build_unary_op): Adjust fall through comment.
1252 (c_mark_addressable): Likewise.
1253
b95a64bb
JJ
12542016-08-11 Jakub Jelinek <jakub@redhat.com>
1255
1256 PR c/72816
1257 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
1258 array member through typedef, for orig_qual_indirect == 0 clear
1259 orig_qual_type.
1260
895aa8e1
DM
12612016-08-08 David Malcolm <dmalcolm@redhat.com>
1262
1263 PR c/64955
1264 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
1265 this up to selftest::run_c_tests.
1266 (selftest::run_c_tests): New function.
1267
0b212d8c
TS
12682016-08-04 Thomas Schwinge <thomas@codesourcery.com>
1269
ae9281fc
TS
1270 * c-parser.c (struct oacc_routine_data): Add error_seen and
1271 fndecl_seen members.
1272 (c_finish_oacc_routine): Use these.
1273 (c_parser_declaration_or_fndef): Adjust.
1274 (c_parser_oacc_routine): Likewise. Support more C language
1275 constructs, and improve diagnostics. Move pragma context
1276 checking...
1277 (c_parser_pragma): ... here.
1278
0b212d8c
TS
1279 * c-parser.c (struct oacc_routine_data): New.
1280 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
1281 Simplify code.
1282 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
1283 declare target" attribute.
1284
76e2c821
JB
12852016-08-01 Jan Beulich <jbeulich@suse.com>
1286
1287 * c-fold.c (c_fully_fold_internal): Also emit shift count
1288 warnings for vector types.
1289 * c-typeck.c (build_binary_op): Likewise.
1290
f618a472
MP
12912016-07-29 Marek Polacek <polacek@redhat.com>
1292
1293 PR c/71742
1294 * c-decl.c (finish_struct): Rephrase an error message.
1295
efd0786f
MP
1296 PR c/71853
1297 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
1298 to error node for invalid code.
1299
e00dceaf
MP
1300 PR c/71573
1301 * c-decl.c (implicitly_declare): Return decl early not only for
1302 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
1303
673a107a
JJ
13042016-07-29 Jakub Jelinek <jakub@redhat.com>
1305
1306 PR c/71969
1307 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
1308 on GNU extern inline functions.
1309
a5b5c8b6
MP
13102016-07-29 Marek Polacek <polacek@redhat.com>
1311
1312 PR c/71583
1313 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
1314 check expr.value.
1315
e3fe09c1
UB
13162016-07-22 Uros Bizjak <ubizjak@gmail.com>
1317
1318 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
1319
7c8f7eaa
DM
13202016-07-20 David Malcolm <dmalcolm@redhat.com>
1321
1322 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
1323 spellcheck-tree.h
1324 (best_macro_match): Likewise, converting from a typedef to a
1325 subclass.
1326 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
1327 (lookup_name_fuzzy): Update for change of best_macro_match to a
1328 subclass with a ctor that calls cpp_forall_identifiers.
1329
de6a69ee
DM
13302016-07-20 David Malcolm <dmalcolm@redhat.com>
1331
1332 * c-decl.c (implicit_decl_warning): Update for conversion of
1333 return type of lookup_name_fuzzy to const char *.
1334 (undeclared_variable): Likewise.
1335 (lookup_name_fuzzy): Convert return type from tree to
1336 const char *.
1337 * c-parser.c (c_parser_declaration_or_fndef): Update for
1338 conversion of return type of lookup_name_fuzzy to const char *.
1339 (c_parser_parameter_declaration): Likewise.
1340
b1c9c068
CP
13412016-07-15 Cesar Philippidis <cesar@codesourcery.com>
1342
1343 * c-parser.c (c_parser_oacc_declare): Don't scan for
1344 GOMP_MAP_POINTER.
1345 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
1346 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
1347 zero-length subarrays.
1348
ddbbcb19
JJ
13492016-07-15 Jakub Jelinek <jakub@redhat.com>
1350
1351 PR c/71858
1352 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
1353 instead of FUZZY_LOOKUP_NAME.
1354 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
1355 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
1356
dd36b877
JJ
13572016-07-14 Jakub Jelinek <jakub@redhat.com>
1358
1359 PR c/71858
1360 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
1361
8c681247
TS
13622016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1363
1364 * c-parser.c (c_parser_generic_selection): Make type of variable
1365 auto_vec.
1366 (c_parser_omp_declare_simd): Likewise.
1367
bf4fa671
TS
13682016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1369
1370 * c-decl.c (struct c_struct_parse_info): Change member types
1371 from vec to auto_vec.
1372 (start_struct): Adjust.
1373 (finish_struct): Likewise.
1374
557e8c49
JJ
13752016-07-02 Jakub Jelinek <jakub@redhat.com>
1376
1377 PR c/71719
1378 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
1379
54d19c3b
TS
13802016-06-29 Thomas Schwinge <thomas@codesourcery.com>
1381
1382 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
1383 Move pragma context checking into...
1384 (c_parser_omp_cancellation_point): ... here, and improve
1385 diagnostic messages.
1386 * c-typeck.c (c_finish_omp_cancel)
1387 (c_finish_omp_cancellation_point): Improve diagnostic messages.
1388
152ef731
JJ
13892016-06-29 Jakub Jelinek <jakub@redhat.com>
1390
1391 PR c/71685
1392 * c-typeck.c (c_build_qualified_type): Don't clear
1393 C_TYPE_INCOMPLETE_VARS for the main variant.
1394
13952016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
1396
1397 PR c/71552
1398 * c-typeck.c (output_init_element): Diagnose incompatible types
1399 before non-constant initializers.
1400
e9ac1f86
JJ
14012016-06-28 Jakub Jelinek <jakub@redhat.com>
1402
1403 * Make-lang.in: Don't cat ../stage_current if it does not exist.
1404
277d7ee0
AK
14052016-06-23 Andi Kleen <ak@linux.intel.com>
1406
1407 * Make-lang.in: Add support for autofdo.
1408
1a4f11c8
DM
14092016-06-22 David Malcolm <dmalcolm@redhat.com>
1410
1411 PR c/70339
1412 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
1413 (implicit_decl_warning): When issuing warnings for implicit
1414 declarations, attempt to provide a suggestion via
1415 lookup_name_fuzzy.
1416 (undeclared_variable): Likewise when issuing errors.
1417 (lookup_name_in_scope): Likewise.
1418 (struct edit_distance_traits<cpp_hashnode *>): New struct.
1419 (best_macro_match): New typedef.
1420 (find_closest_macro_cpp_cb): New function.
1421 (lookup_name_fuzzy): New function.
1422 * c-parser.c: Include gcc-rich-location.h.
1423 (c_token_starts_typename): Split out case CPP_KEYWORD into...
1424 (c_keyword_starts_typename): ...this new function.
1425 (c_parser_declaration_or_fndef): When issuing errors about
1426 missing "struct" etc, add a fixit. For other kinds of errors,
1427 attempt to provide a suggestion via lookup_name_fuzzy.
1428 (c_parser_parms_declarator): When looking ahead to detect typos in
1429 type names, also reject CPP_KEYWORD.
1430 (c_parser_parameter_declaration): When issuing errors about
1431 unknown type names, attempt to provide a suggestion via
1432 lookup_name_fuzzy.
1433 * c-tree.h (c_keyword_starts_typename): New prototype.
1434
5a578671
JM
14352016-06-20 Joseph Myers <joseph@codesourcery.com>
1436
1437 PR c/71601
1438 * c-typeck.c (build_conditional_expr): Return error_mark_node if
1439 c_common_type returns error_mark_node.
1440
3f8257db 14412016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
1442
1443 PR c/69507
1444 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
1445 __alignof__ (expression).
1446
6a3f203c
DM
14472016-06-14 David Malcolm <dmalcolm@redhat.com>
1448
1449 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
1450
264757fb
DM
14512016-06-14 David Malcolm <dmalcolm@redhat.com>
1452
1453 * c-typeck.c (build_component_ref): Simplify fixit code by
1454 using gcc_rich_location::add_fixit_misspelled_id.
1455 (set_init_label): Likewise.
1456
f7e4f2e3
DM
14572016-06-13 David Malcolm <dmalcolm@redhat.com>
1458
1459 * c-parser.c (c_parser_initelt): Provide location of name for new
1460 location_t param of set_init_label.
1461 * c-tree.h (set_init_label): Add location_t param.
1462 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
1463 param and use it when issuing error messages about unrecognized
1464 field names. Attempt to provide a fixit hint if appropriate,
1465 otherwise update the error message to provide the type name.
1466
4b1ffdb1
TS
14672016-06-10 Thomas Schwinge <thomas@codesourcery.com>
1468
1469 PR c/71381
1470 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
1471 Loosen checking.
1472
44a845ca
MS
14732016-06-08 Martin Sebor <msebor@redhat.com>
1474 Jakub Jelinek <jakub@redhat.com>
1475
1476 PR c++/70507
1477 PR c/68120
1478 * c-typeck.c (convert_arguments): Don't promote last argument
1479 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
1480
92a5f2ba
MP
14812016-06-08 Marek Polacek <polacek@redhat.com>
1482
1483 PR c/71418
1484 * c-decl.c (grokdeclarator): Check TYPE_P.
1485
08203f73
MP
1486 PR c/71426
1487 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
1488 code.
1489
6ffd47b7
DM
14902016-06-07 David Malcolm <dmalcolm@redhat.com>
1491
1492 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
1493 and structure element reference, capture the location of the
1494 element name token and pass it to build_component_ref.
1495 (c_parser_postfix_expression_after_primary): Likewise for
1496 structure element dereference.
1497 (c_parser_omp_variable_list): Likewise for
1498 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
1499 * c-tree.h (build_component_ref): Add location_t param.
1500 * c-typeck.c (build_component_ref): Add location_t param
1501 COMPONENT_LOC. Use it, if available, when issuing hints about
1502 mispelled member names to provide a fixit replacement hint.
1503
1f40cff3
MP
15042016-06-06 Marek Polacek <polacek@redhat.com>
1505
1506 PR c/71362
1507 * c-parser.c (c_parser_direct_declarator): Set location.
1508
5545a907
MP
15092016-06-06 Marek Polacek <polacek@redhat.com>
1510
1511 * c-typeck.c (comptypes_internal): Handle comparisons of
1512 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
1513 TYPE_REF_CAN_ALIAS_ALL.
1514
b605f663
CLT
15152016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
1516
1517 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
1518 arguments as addressable when async clause exists.
1519
00631022
JJ
15202016-05-30 Jakub Jelinek <jakub@redhat.com>
1521
1522 PR c++/71349
1523 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
1524 when combined with target construct.
1525
7211a097
JJ
15262016-05-26 Jakub Jelinek <jakub@redhat.com>
1527
1528 * c-parser.c (c_parser_omp_clause_schedule): Warn if
1529 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
1530
95efe6b6
MP
15312016-05-25 Marek Polacek <polacek@redhat.com>
1532
1533 PR c/71265
1534 * c-decl.c (c_make_fname_decl): Don't check seen_error.
1535
a23faf7a
MP
1536 PR c/71266
1537 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
1538
e46c7770
CP
15392016-05-24 Cesar Philippidis <cesar@codesourcery.com>
1540
1541 * c-parser.c (c_parser_oacc_declare): Add support for
1542 GOMP_MAP_FIRSTPRIVATE_POINTER.
1543 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
1544 argument with enum c_omp_region_type ort.
1545 (handle_omp_array_sections): Likewise. Update call to
1546 handle_omp_array_sections_1.
1547 (c_finish_omp_clauses): Add specific errors and warning messages for
1548 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
1549 call to handle_omp_array_sections.
1550
a04e69c0
TS
15512016-05-24 Thomas Schwinge <thomas@codesourcery.com>
1552
1553 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
1554
f17a223d
RB
15552016-05-24 Richard Biener <rguenther@suse.de>
1556
1557 PR middle-end/70434
1558 PR c/69504
1559 * c-typeck.c (build_array_ref): Do not complain about indexing
1560 non-lvalue vectors. Adjust for function name change.
1561
79063edd
MS
15622016-05-20 Martin Sebor <msebor@redhat.com>
1563
1564 PR c/71115
1565 * c-typeck.c (error_init): Use
1566 expansion_point_location_if_in_system_header.
1567 (warning_init): Same.
1568
8a40fef3
DM
15692016-05-19 David Malcolm <dmalcolm@redhat.com>
1570
1571 PR c/71171
1572 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
1573 in error-handling.
1574 (c_parser_postfix_expression): Likewise.
1575 * c-tree.h (c_expr::set_error): New method.
1576 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
1577 that result's range is initialized.
1578
e9892350
JG
15792016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
1580
1581 * c-typeck.c (parser_build_unary_op): Fix formatting.
1582
8fad45f5
MW
15832016-05-16 Matthew Wahab <matthew.wahab@arm.com>
1584
1585 * c-decl.c (grokdeclarator): Remove errmsg and use of
1586 targetm.invalid_return_type.
1587 (grokparms): Remove errmsg and use of
1588 targetm.invalid_parameter_type.
1589
aa4b467b
JM
15902016-05-13 Joseph Myers <joseph@codesourcery.com>
1591
1592 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
1593 function return type.
1594
4f2e1536
MP
15952016-05-12 Marek Polacek <polacek@redhat.com>
1596
1597 PR c/70756
1598 * c-decl.c (build_compound_literal): Pass LOC down to
1599 c_incomplete_type_error.
1600 * c-tree.h (require_complete_type): Adjust declaration.
1601 (c_incomplete_type_error): Likewise.
1602 * c-typeck.c (require_complete_type): Add location parameter, pass it
1603 down to c_incomplete_type_error.
1604 (c_incomplete_type_error): Add location parameter, pass it down to
1605 error_at.
1606 (build_component_ref): Pass location down to c_incomplete_type_error.
1607 (default_conversion): Pass location down to require_complete_type.
1608 (build_array_ref): Likewise.
1609 (build_function_call_vec): Likewise.
1610 (convert_arguments): Likewise.
1611 (build_unary_op): Likewise.
1612 (build_c_cast): Likewise.
1613 (build_modify_expr): Likewise.
1614 (convert_for_assignment): Likewise.
1615 (c_finish_omp_clauses): Likewise.
1616
d6e83a8d
MM
16172016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1618
1619 PR c/43651
1620 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
1621 is enabled.
1622 * c-errors.c (pedwarn_c90): Return true if warned.
1623 * c-tree.h (pedwarn_c90): Change return type to bool.
1624 (enum c_declspec_word): Add new enumerator cdw_atomic.
1625
5c3a10fb
MP
16262016-05-11 Marek Polacek <polacek@redhat.com>
1627
1628 PR c++/71024
1629 * c-decl.c (diagnose_mismatched_decls): Factor out code to
1630 diagnose_mismatched_attributes and call it.
1631
cf68d92c
MP
16322016-05-10 Marek Polacek <polacek@redhat.com>
1633
1634 PR c/70255
1635 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
1636 on a declaration following the definition.
1637
351f85c5
JJ
16382016-05-05 Jakub Jelinek <jakub@redhat.com>
1639
1640 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
1641 parse it through to c_parser_c99_block_statement.
1642 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
1643 caller.
1644
deef7113
MP
16452016-05-04 Marek Polacek <polacek@redhat.com>
1646
1647 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
1648 OPT_Wdangling_else.
1649
de55efd5
MP
16502016-05-04 Marek Polacek <polacek@redhat.com>
1651
1652 PR c/48778
1653 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
1654 for macro expansions.
1655
79ce98bc
MP
16562016-05-03 Marek Polacek <polacek@redhat.com>
1657
1658 PR c/70859
1659 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
1660 check_builtin_function_arguments.
1661
fb2647aa
RB
16622016-05-03 Richard Biener <rguenther@suse.de>
1663
1664 * Make-lang.in (cc1-checksum.c): For stage-final re-use
1665 the checksum from the previous stage.
1666
77886428
CP
16672016-05-02 Cesar Philippidis <cesar@codesourcery.com>
1668
1669 * c-parser.c (c_parser_oacc_all_clauses): Update call to
1670 c_finish_omp_clauses.
1671 (c_parser_omp_all_clauses): Likewise.
1672 (c_parser_oacc_cache): Likewise.
1673 (c_parser_oacc_loop): Likewise.
1674 (omp_split_clauses): Likewise.
1675 (c_parser_omp_declare_target): Likewise.
1676 (c_parser_cilk_all_clauses): Likewise.
1677 (c_parser_cilk_for): Likewise.
1678 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
1679 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
1680
7176a4a0
MP
16812016-05-02 Marek Polacek <polacek@redhat.com>
1682
1683 PR c/70851
1684 * c-decl.c (grokdeclarator): Diagnose when array's size has an
1685 incomplete type.
1686
e7ff0319
CP
16872016-04-29 Cesar Philippidis <cesar@codesourcery.com>
1688
1689 PR middle-end/70626
1690 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
1691 OACC_LOOP_CLAUSE_MASK.
1692 (c_parser_oacc_kernels_parallel): Update call to
1693 c_oacc_split_loop_clauses.
1694
9f405ce1
AM
16952016-04-28 Andrew MacLeod <amacleod@redhat.com>
1696
1697 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
1698 argument to build_modify_expr in two cases.
1699
c1e1f433
BS
17002016-04-27 Bernd Schmidt <bschmidt@redhat.com>
1701
1702 * c-parser.c (c_parser_postfix_expression_after_primary): Call
1703 warn_for_memset instead of warning directly here.
1704
2448a956
MP
17052016-04-26 Marek Polacek <polacek@redhat.com>
1706
1707 PR c/67784
1708 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
1709 out of ...
1710 (c_parser_for_statement): ... here.
1711 (c_parser_if_statement): Use it.
1712 (c_parser_switch_statement): Use it.
1713 (c_parser_while_statement): Use it.
1714
b02a5e26
MP
1715 PR c/70791
1716 * c-decl.c (pushdecl): Pass LOCUS down to warning.
1717
477d4906
IV
17182016-04-20 Ilya Verbin <ilya.verbin@intel.com>
1719
1720 PR c++/69363
1721 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
1722 instead of c_finish_cilk_clauses.
1723 * c-tree.h (c_finish_omp_clauses): Add new default argument.
1724 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
1725 floating-point variables in the linear clause for Cilk Plus.
1726
fe37c7af
MM
17272016-04-18 Michael Matz <matz@suse.de>
1728
1729 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
1730 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
1731
949505a9
MP
17322016-04-15 Marek Polacek <polacek@redhat.com>
1733
1734 PR c/70671
1735 * c-typeck.c (build_unary_op): Pass location down to error and
1736 warning call.
1737
dda1bf61
JJ
17382016-04-15 Jakub Jelinek <jakub@redhat.com>
1739
1740 PR c/70436
1741 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
1742 where needed.
1743 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
1744 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
1745 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
1746 Adjust c_parser_pragma callers.
1747 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
1748 caller.
1749 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
1750 c_parser_statement.
1751 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
1752 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
1753 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
1754 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
1755 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
1756 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
1757 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
1758 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
1759 down where needed.
1760 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
1761 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
1762 calls.
1763
99cd9857
MP
17642016-04-13 Marek Polacek <polacek@redhat.com>
1765
1766 PR c/70436
1767 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
1768 adjust callers.
1769 (c_parser_statement): Likewise.
1770 (c_parser_c99_block_statement): Likewise.
1771 (c_parser_while_statement): Likewise.
1772 (c_parser_for_statement): Likewise.
1773 (c_parser_if_body): Don't set IF_P here.
1774 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
1775 about dangling else here.
1776 * c-tree.h (c_finish_if_stmt): Adjust declaration.
1777 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
1778 warn about dangling else here.
1779
f13355da
MP
17802016-04-04 Marek Polacek <polacek@redhat.com>
1781
1782 PR c/70307
1783 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
1784
5fde6a45
MP
17852016-03-31 Marek Polacek <polacek@redhat.com>
1786
1787 PR c/70297
1788 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
1789
4bbf545b
DM
17902016-03-18 David Malcolm <dmalcolm@redhat.com>
1791
1792 PR c/70281
1793 * c-parser.c (c_parser_postfix_expression): Set the source range
1794 for uses of "__builtin_types_compatible_p".
1795
fcc2b74f
JJ
17962016-03-17 Jakub Jelinek <jakub@redhat.com>
1797
1798 PR c/70280
1799 * c-typeck.c (composite_type): Don't count void_list_node
1800 into len, if the list is terminated by void_list_node, start
1801 with void_list_node instead of NULL for newargs. Stop
1802 at void_list_node.
1803
ab4c578f
MP
18042016-03-16 Marek Polacek <polacek@redhat.com>
1805
1806 PR c/70093
1807 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
1808 nested functions returning VM types.
1809
96b3c82d
CP
18102016-03-09 Cesar Philippidis <cesar@codesourcery.com>
1811
1812 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
1813 when calling c_finish_omp_clauses.
1814
29b9828f
BS
18152016-03-04 Bernd Schmidt <bschmidt@redhat.com>
1816
1817 PR c/69824
1818 * c-decl.c (get_parm_info): Don't queue implicit function declarations
1819 for later.
1820
7ff6ca38
MP
18212016-03-04 Marek Polacek <polacek@redhat.com>
1822
1823 PR c/69798
1824 * c-parser.c (c_parser_postfix_expression): Call
1825 c_parser_cast_expression rather than c_parser_postfix_expression.
1826
686e2237
JJ
18272016-03-01 Jakub Jelinek <jakub@redhat.com>
1828
1829 PR c/69796
1830 PR c/69974
1831 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
1832 of incomplete decls to error_mark_node.
1833
0b05329b
MP
18342016-02-24 Marek Polacek <polacek@redhat.com>
1835
1836 PR c/69819
1837 * c-decl.c (finish_decl): Don't update the copy of the type of a
1838 different decl type.
1839
067fbd8b
JJ
18402016-02-23 Jakub Jelinek <jakub@redhat.com>
1841
1842 PR objc/69844
1843 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
1844 in id_kind reclassification.
1845
bf14eba2
JJ
18462016-02-16 Jakub Jelinek <jakub@redhat.com>
1847
1848 PR c/69835
1849 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
1850
ba539195
JN
18512016-02-16 James Norris <jnorris@codesourcery.com>
1852
1853 PR c/64748
1854 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
1855
16595a1f
BS
18562016-02-12 Bernd Schmidt <bschmidt@redhat.com>
1857
f48dfe98
BS
1858 * c-decl.c (build_null_declspecs): Zero the entire struct.
1859
16595a1f
BS
1860 PR c/69522
1861 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
1862 callers changed. If nested_p is true, use it to call
1863 finish_implicit_inits.
1864 * c-tree.h (finish_implicit_inits): Declare.
1865 * c-typeck.c (finish_implicit_inits): New function. Move code
1866 from ...
1867 (push_init_level): ... here.
1868 (set_designator, process_init_element): Call finish_implicit_inits.
1869
66756373
JJ
18702016-02-11 Jakub Jelinek <jakub@redhat.com>
1871
1872 PR c/69768
1873 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
1874 arguments for -Waddress warning.
1875
1066e9b5
JJ
18762016-02-04 Jakub Jelinek <jakub@redhat.com>
1877
1878 PR c/69669
1879 * c-decl.c (finish_enum): When honoring mode attribute,
1880 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
1881
3a5d2ba4
JJ
18822016-01-29 Jakub Jelinek <jakub@redhat.com>
1883
1884 PR debug/69518
1885 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
1886 all type variants, not just TYPE_MAIN_VARIANT.
1887
cbdd8ae0
JJ
18882016-01-27 Jakub Jelinek <jakub@redhat.com>
1889
1890 PR debug/66869
1891 * c-decl.c (c_write_global_declarations_1): Warn with
1892 warn_unused_function if static prototype without definition
1893 is not C_DECL_USED.
1894
fa74a4bc
MP
18952016-01-27 Marek Polacek <polacek@redhat.com>
1896
1897 PR c/68062
1898 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
1899 to unsigned, if needed. Add -Wsign-compare warning.
1900
13f92e8d
JJ
19012016-01-26 Jakub Jelinek <jakub@redhat.com>
1902
1903 PR tree-optimization/69483
1904 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
1905
cd8e73dc 19062016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
1907
1908 PR c/24293
1909 * c-tree.h (incomplete_record_decls): Declare.
1910 * c-parser.c (incomplete_record_decls): Define.
1911 (c_parser_translation_unit): Iterate through incomplete_record_decls and
1912 report error if any decl has zero size.
1913 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
1914 or enum type to incomplete_record_decls.
1915
e6d6ec9e
TV
19162016-01-14 Tom de Vries <tom@codesourcery.com>
1917
1918 PR tree-optimization/68773
1919 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
1920 set force_output.
1921
00083992
MP
19222016-01-14 Marek Polacek <polacek@redhat.com>
1923
1924 PR c/69262
1925 * c-decl.c (grokdeclarator): Provide more information for invalid
1926 array declarations.
1927
7443cf13
DM
19282016-01-06 David Malcolm <dmalcolm@redhat.com>
1929
1930 * c-parser.c (c_parser_unary_expression): For dereferences, build
1931 a combined location before calling build_indirect_ref, so that
1932 error reports cover the full range, manually updating the c_expr
1933 src_range.
1934
6b131d5b
MP
19352016-01-06 Marek Polacek <polacek@redhat.com>
1936
1937 PR sanitizer/69099
1938 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
1939 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
1940 NULL.
1941
818ab71a
JJ
19422016-01-04 Jakub Jelinek <jakub@redhat.com>
1943
1944 Update copyright years.
1945
2fe0a208
MP
19462016-01-04 Marek Polacek <polacek@redhat.com>
1947
1948 PR c/68908
1949 * c-typeck.c (build_atomic_assign): Improve commentary. Add
1950 optimization to use __atomic_fetch_* built-in if possible.
1951
c7b48c8a
TS
19522015-12-23 Thomas Schwinge <thomas@codesourcery.com>
1953
1954 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
1955 into...
1956 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
1957 all users.
1958
fda5652f
MP
19592015-12-22 Marek Polacek <polacek@redhat.com>
1960
1961 PR c/69002
1962 * c-typeck.c (build_component_ref): Warn when acessing elements of
1963 atomic structures or unions.
1964
745e411d
DM
19652015-12-21 David Malcolm <dmalcolm@redhat.com>
1966
1967 * c-typeck.c: Include "gcc-rich-location.h".
1968 (build_binary_op): In the two places that call binary_op_error,
1969 create a gcc_rich_location and populate it with the location of
1970 the binary op and its two operands.
1971
94c40e19
DM
19722015-12-16 David Malcolm <dmalcolm@redhat.com>
1973
1974 * c-parser.c (c_parser_statement_after_labels): When calling
1975 c_finish_return, Use the return expression's location if it has
1976 one, falling back to the location of the first token within it.
1977 * c-typeck.c (c_finish_return): When issuing warnings about
1978 the incorrect presence/absence of a return value, issue a note
1979 showing the declaration of the function.
1980
de67c4c3
DM
19812015-12-16 David Malcolm <dmalcolm@redhat.com>
1982
1983 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
1984 to 4.
1985 (c_parser_peek_nth_token): New function.
1986 (c_parser_peek_conflict_marker): New function.
1987 (c_parser_error): Detect conflict markers and report them as such.
1988
a10704e1
DM
19892015-12-16 David Malcolm <dmalcolm@redhat.com>
1990
1991 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
1992 to preserve range information for the primary expression
1993 in the call to c_parser_postfix_expression_after_primary.
1994
8062bca6
DM
19952015-12-16 David Malcolm <dmalcolm@redhat.com>
1996
1997 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
1998 expression location, falling back on the first token location,
1999 rather than always using the latter.
2000
d06f8b75
MP
20012015-12-16 Marek Polacek <polacek@redhat.com>
2002
2003 PR c/64637
2004 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
2005 available.
2006
2994fb91
MP
20072015-12-15 Marek Polacek <polacek@redhat.com>
2008
2009 PR c/68907
2010 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
2011 artificial decl.
2012
a1b93f8d
DM
20132015-12-08 David Malcolm <dmalcolm@redhat.com>
2014
2015 * c-parser.c (c_parser_alignof_expression): Capture location of
2016 closing parenthesis (if any), or of end of unary expression, and
2017 use it to build a src_range for the expression.
2018
46c6e1e2
DM
20192015-12-08 David Malcolm <dmalcolm@redhat.com>
2020
2021 PR c/68757
2022 * c-parser.c (c_parser_get_builtin_args): Add
2023 "out_close_paren_loc" param, and write back to it.
2024 (c_parser_postfix_expression): Capture the closing
2025 parenthesis location for RID_CHOOSE_EXPR,
2026 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
2027 RID_BUILTIN_SHUFFLE and use it to set the source range
2028 for such expressions; within RID_BUILTIN_COMPLEX set
2029 the underlying location.
2030
66189108
MP
20312015-12-07 Marek Polacek <polacek@redhat.com>
2032
2033 PR c/68668
2034 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
2035 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
2036
f187980b
EB
20372015-12-04 Eric Botcazou <ebotcazou@adacore.com>
2038
2039 * c-tree.h (c_build_va_arg): Adjust prototype.
2040 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
2041 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
2042 parameter, adjust throughout and issue an error if EXPR is a component
2043 with reverse storage order.
2044
4250754e
JM
20452015-12-02 Jason Merrill <jason@redhat.com>
2046
2047 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
2048 (c_fully_fold_internal, decl_constant_value_for_optimization):
2049 Move from c-common.c.
2050 * c-tree.h: Declare decl_constant_value_for_optimization.
2051 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
2052
e9e32ee6
JM
20532015-12-02 Joseph Myers <joseph@codesourcery.com>
2054
2055 PR c/68162
2056 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
2057 following link from declarator to next declarator. Track original
2058 qualified type and pass it to c_build_qualified_type.
2059 * c-typeck.c (c_build_qualified_type): Add arguments
2060 orig_qual_type and orig_qual_indirect.
2061
ff7a55bf
TS
20622015-12-02 Thomas Schwinge <thomas@codesourcery.com>
2063
2064 * c-parser.c (c_parser_omp_clause_name)
2065 (c_parser_oacc_all_clauses): Alphabetical sorting.
2066
657e4e47
JJ
20672015-12-02 Jakub Jelinek <jakub@redhat.com>
2068
2069 PR c/68533
2070 * c-decl.c (get_parm_info): Use b->locus instead of input_location
2071 for diagnostics.
2072
37d5ad46
JB
20732015-12-01 Julian Brown <julian@codesourcery.com>
2074 Cesar Philippidis <cesar@codesourcery.com>
2075 James Norris <James_Norris@mentor.com>
2076
2077 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
2078 (c_parser_oacc_clause_use_device): New function.
2079 (c_parser_oacc_all_clauses): Add use_device support.
2080 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
2081 (c_parser_oacc_host_data): New function.
2082 (c_parser_omp_construct): Add host_data support.
2083 * c-tree.h (c_finish_oacc_host_data): Add prototype.
2084 * c-typeck.c (c_finish_oacc_host_data): New function.
2085 (c_finish_omp_clauses): Add use_device support.
2086
a4850ce9
JH
20872015-11-29 Jan Hubicka <hubicka@ucw.cz>
2088
2089 PR c/67106
2090 * c-decl.c: Set TYPE_PACKED in variants.
2091
b58d3df2
ML
20922015-11-27 Martin Liska <mliska@suse.cz>
2093
2094 PR c++/68312
2095 * c-array-notation.c (fix_builtin_array_notation_fn):
2096 Use release_vec_vec instead of vec::release.
2097 (build_array_notation_expr): Likewise.
2098 (fix_conditional_array_notations_1): Likewise.
2099 (fix_array_notation_expr): Likewise.
2100 (fix_array_notation_call_expr): Likewise.
2101
aec17bfe
JJ
21022015-11-27 Jakub Jelinek <jakub@redhat.com>
2103
2104 PR c/63326
2105 * c-parser.c (c_parser_compound_statement_nostart): If
2106 last_label is true, use pragma_stmt instead of pragma_compound
2107 as second c_parser_pragma argument.
2108 (c_parser_omp_ordered, c_parser_omp_target_update,
2109 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
2110 false as second argument to c_parser_skip_to_pragma_eol after
2111 diagnosing standalone directives used in pragma_stmt context.
2112
688c4de0
IV
21132015-11-24 Ilya Verbin <ilya.verbin@intel.com>
2114
2115 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
2116 with "if (ENABLE_OFFLOADING)".
2117
cbd03aee
DM
21182015-11-23 David Malcolm <dmalcolm@redhat.com>
2119
2120 PR objc/68438
2121 * c-parser.c (c_parser_postfix_expression): Set up source ranges
2122 for various Objective-C constructs: Class.name syntax,
2123 @selector(), @protocol(), @encode(), and [] message syntax.
2124
a87a86e1
DM
21252015-11-20 David Malcolm <dmalcolm@redhat.com>
2126
2127 PR 62314
2128 * c-typeck.c (should_suggest_deref_p): New function.
2129 (build_component_ref): Special-case POINTER_TYPE when
2130 generating a "not a structure of union" error message, and
2131 suggest a "->" rather than a ".", providing a fix-it hint.
2132
8ece8dfb
DM
21332015-11-19 David Malcolm <dmalcolm@redhat.com>
2134
2135 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
2136 candidate into a new function, find_closest_identifier.
2137
433068cc
MP
21382015-11-19 Marek Polacek <polacek@redhat.com>
2139
2140 PR c/68412
2141 * c-typeck.c (parser_build_binary_op): Properly handle
2142 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
2143
bef08b71
DM
21442015-11-17 David Malcolm <dmalcolm@redhat.com>
2145
2146 * c-parser.c (set_c_expr_source_range): Bulletproof both
2147 overloaded implementations against NULL expr->value.
2148 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
2149 values.
2150 (c_parser_unary_expression): Likewise when handling addresses of
2151 labels.
2152 (c_parser_postfix_expression): Likewise for statement expressions,
2153 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
2154 __builtin_va_arg, and for __builtin_offset_of.
2155 (c_parser_postfix_expression_after_paren_type): Initialize expr's
2156 src_range using the range of the braced initializer.
2157 (c_parser_transaction_expression): Set src_range for "ret" to a
2158 sane pair of values.
2159
fff77217
KY
21602015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
2161
2162 * c-parser.c (c_finish_omp_declare_simd): Look for
2163 "simd" attribute as well. Update error message.
2164
1d899da2
TS
21652015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2166
2167 * c-parser.c (c_parser_omp_declare_target): Adjust.
2168
e4606348
JJ
21692015-11-14 Jakub Jelinek <jakub@redhat.com>
2170
2171 * c-typeck.c (c_finish_omp_clauses): Don't mark
2172 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
2173
3e636daf
MP
21742015-11-14 Marek Polacek <polacek@redhat.com>
2175
2176 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
2177 * c-typeck.c: Likewise.
2178
ebedc9a3
DM
21792015-11-13 David Malcolm <dmalcolm@redhat.com>
2180
2181 * c-decl.c (warn_defaults_to): Pass line_table to
2182 rich_location ctor.
2183 * c-errors.c (pedwarn_c99): Likewise.
2184 (pedwarn_c90): Likewise.
2185 * c-parser.c (set_c_expr_source_range): New functions.
2186 (c_token::get_range): New method.
2187 (c_token::get_finish): New method.
2188 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
2189 based on the range from the start of the LHS to the end of the
2190 RHS.
2191 (c_parser_conditional_expression): Likewise, based on the range
2192 from the start of the cond.value to the end of exp2.value.
2193 (c_parser_binary_expression): Call set_c_expr_source_range on
2194 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
2195 (c_parser_cast_expression): Call set_c_expr_source_range on ret
2196 based on the cast_loc through to the end of the expr.
2197 (c_parser_unary_expression): Likewise, based on the
2198 op_loc through to the end of op.
2199 (c_parser_sizeof_expression) Likewise, based on the start of the
2200 sizeof token through to either the closing paren or the end of
2201 expr.
2202 (c_parser_postfix_expression): Likewise, using the token range,
2203 or from the open paren through to the close paren for
2204 parenthesized expressions.
2205 (c_parser_postfix_expression_after_primary): Likewise, for
2206 various kinds of expression.
2207 * c-tree.h (struct c_expr): Add field "src_range".
2208 (c_expr::get_start): New method.
2209 (c_expr::get_finish): New method.
2210 (set_c_expr_source_range): New decls.
2211 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
2212 on ret for prefix unary ops.
2213 (parser_build_binary_op): Likewise, running from the start of
2214 arg1.value through to the end of arg2.value.
2215
ec8b536f
MP
22162015-11-13 Marek Polacek <polacek@redhat.com>
2217
2218 PR c/68320
2219 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
2220
277fe616
DM
22212015-11-13 David Malcolm <dmalcolm@redhat.com>
2222
2223 * c-typeck.c: Include spellcheck.h.
2224 (lookup_field_fuzzy_find_candidates): New function.
2225 (lookup_field_fuzzy): New function.
2226 (build_component_ref): If the field was not found, try using
2227 lookup_field_fuzzy and potentially offer a suggestion.
2228
6e232ba4
JN
22292015-11-12 James Norris <jnorris@codesourcery.com>
2230 Joseph Myers <joseph@codesourcery.com>
2231
2232 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
2233 (c_parser_omp_clause_name): Handle 'device_resident' clause.
2234 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
2235 and PRAGMA_OMP_CLAUSE_LINK.
2236 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
2237 and PRAGMA_OACC_CLAUSE_LINK.
2238 (OACC_DECLARE_CLAUSE_MASK): New definition.
2239 (c_parser_oacc_declare): New function.
2240
9be4f715
MP
22412015-11-12 Marek Polacek <polacek@redhat.com>
2242
2243 PR c/67784
2244 * c-parser.c (c_parser_for_statement): Reclassify the token in
2245 a correct scope.
2246
e78bede6
MP
22472015-11-11 Marek Polacek <polacek@redhat.com>
2248
2249 PR c/68107
2250 PR c++/68266
2251 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
2252 checking the size of an array.
2253
69f293c9
AM
22542015-11-11 Andrew MacLeod <amacleod@redhat.com>
2255
2256 * c-array-notation.c: Remove unused header files.
2257 * c-aux-info.c: Likewise.
2258 * c-convert.c: Likewise.
2259 * c-decl.c: Likewise.
2260 * c-errors.c: Likewise.
2261 * c-lang.c: Likewise.
2262 * c-objc-common.c: Likewise.
2263 * c-parser.c: Likewise.
2264 * c-typeck.c: Likewise.
2265 * gccspec.c: Likewise.
2266
3a40d81d
NS
22672015-11-09 Thomas Schwinge <thomas@codesourcery.com>
2268 Cesar Philippidis <cesar@codesourcery.com>
2269 James Norris <jnorris@codesourcery.com>
2270 Julian Brown <julian@codesourcery.com>
2271 Nathan Sidwell <nathan@codesourcery.com>
2272
2273 c/
2274 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
2275 routine arg.
2276 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
2277 (c_parser_pragma): Parse 'acc routine'.
2278 (OACC_ROUTINE_CLAUSE_MARK): Define.
2279 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
2280
fc402eec
AA
22812015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
2282
2283 PR debug/67192
2284 * c-typeck.c (c_finish_loop): For unconditional loops, set the
2285 location of the backward-goto to the start of the loop body.
2286
f6b0b3db
AA
22872015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
2288
2289 PR debug/67192
2290 * c-parser.c (c_parser_while_statement): Finish the loop before
2291 parsing ahead for misleading indentation.
2292 (c_parser_for_statement): Likewise.
2293
ee45a32d
EB
22942015-11-08 Eric Botcazou <ebotcazou@adacore.com>
2295
2296 * c-decl.c (finish_struct): If the structure has reverse storage
2297 order, rewrite the type of array fields with scalar component. Call
2298 maybe_apply_pragma_scalar_storage_order on entry.
2299 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
2300 errors on bit-fields and reverse SSO here and not...
2301 (c_mark_addressable): ...here.
2302 (output_init_element): Adjust call to initializer_constant_valid_p.
2303 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
2304
8a645150
DM
23052015-11-06 David Malcolm <dmalcolm@redhat.com>
2306
2307 * c-decl.c (warn_defaults_to): Update for change in signature
2308 of diagnostic_set_info.
2309 * c-errors.c (pedwarn_c99): Likewise.
2310 (pedwarn_c90): Likewise.
2311 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
2312 for textinfo::set_location.
2313
7a5e4956
CP
23142015-11-05 Cesar Philippidis <cesar@codesourcery.com>
2315 Thomas Schwinge <thomas@codesourcery.com>
2316 James Norris <jnorris@codesourcery.com>
2317
2318 * c-parser.c (c_parser_omp_clause_name): Add support for
2319 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
2320 (c_parser_omp_clause_default): Add is_oacc argument. Handle
2321 default(none) in OpenACC.
2322 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
2323 arguments.
2324 (c_parser_oacc_clause_tile): New function.
2325 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
2326 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
2327 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
2328 TILE}.
2329 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
2330 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
2331 FIRSTPRIVATE}.
2332 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
2333 (c_parser_oacc_update): Update the error message for missing clauses.
2334 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
2335 and OMP_CLAUSE_INDEPENDENT.
2336
bfcfbfa0
MP
23372015-11-05 Marek Polacek <polacek@redhat.com>
2338
2339 PR c/68090
2340 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
2341 deal with pre-evaluation on invalid types.
2342
e01d41e5
JJ
23432015-11-05 Jakub Jelinek <jakub@redhat.com>
2344 Ilya Verbin <ilya.verbin@intel.com>
2345
2346 * c-parser.c: Include context.h and gimple-expr.h.
2347 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
2348 monotonic together with nonmonotonic.
2349 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
2350 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
2351 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
2352 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
2353 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
2354 expressions on combined target teams before the target.
2355 (c_parser_omp_declare_target): If decl has "omp declare target" or
2356 "omp declare target link" attribute, and cgraph or varpool node already
2357 exists, then set corresponding flags. Call c_finish_omp_clauses
2358 in the parenthesized extended-list syntax case.
2359 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
2360 declare target.
2361 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
2362 on OMP_CLAUSE_REDUCTION array sections.
2363 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
2364 into the constant offset, or for variable low-bound using
2365 POINTER_PLUS_EXPR. For structure element based array sections use
2366 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
2367 (c_finish_omp_clauses): Drop generic_field_head, structure
2368 elements are now always mapped even as array section bases,
2369 diagnose same var in data sharing and mapping clauses. Diagnose if
2370 linear step on declare simd is neither a constant nor a uniform
2371 parameter. Look through POINTER_PLUS_EXPR for array section
2372 reductions. Diagnose the same var or function appearing multiple
2373 times on the same directive. Fix up wording for the to clause if t
2374 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
2375 modifier on kinds other than dynamic or guided or nonmonotonic
2376 modifier together with ordered clause.
2377
4bf9e5a8
TS
23782015-11-03 Thomas Schwinge <thomas@codesourcery.com>
2379 Chung-Lin Tang <cltang@codesourcery.com>
2380
2381 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
2382
2adfab87
AM
23832015-10-29 Andrew MacLeod <amacleod@redhat.com>
2384
2385 * c-array-notation.c: Reorder #include's and remove duplicates.
2386 * c-aux-info.c: Likewise.
2387 * c-convert.c: Likewise.
2388 * c-decl.c: Likewise.
2389 * c-errors.c: Likewise.
2390 * c-lang.c: Likewise.
2391 * c-objc-common.c: Likewise.
2392 * c-parser.c: Likewise.
2393 * c-typeck.c: Likewise.
2394
e922069e
JW
23952015-10-26 Jim Wilson <jim.wilson@linaro.org>
2396
2397 PR debug/66068
2398 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
2399 after calling build_qualified_type.
2400
765dd391
CP
24012015-10-27 Cesar Philippidis <cesar@codesourcery.com>
2402 Thomas Schwinge <thomas@codesourcery.com>
2403 James Norris <jnorris@codesourcery.com>
2404 Joseph Myers <joseph@codesourcery.com>
2405 Julian Brown <julian@codesourcery.com>
2406 Bernd Schmidt <bschmidt@redhat.com>
2407
2408 * c-parser.c (c_parser_oacc_shape_clause): New.
2409 (c_parser_oacc_simple_clause): New.
2410 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
2411 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
2412
88bae6f4
TS
24132015-10-27 Thomas Schwinge <thomas@codesourcery.com>
2414 James Norris <jnorris@codesourcery.com>
2415 Cesar Philippidis <cesar@codesourcery.com>
2416
2417 PR c/64765
2418 PR c/64880
2419 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
2420 parameters, and handle these. Adjust all users.
2421 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
2422 into...
2423 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
2424 all users.
2425 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
2426 declare functions.
2427 (c_finish_omp_construct): Declare function.
2428 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
2429 Merge functions into...
2430 (c_finish_omp_construct): ... this new function.
2431
a8fc2579
RB
24322015-10-22 Richard Biener <rguenther@suse.de>
2433
2434 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
2435 before folding a MINUS_EXPR.
2436
e9122ef6
MP
24372015-10-21 Marek Polacek <polacek@redhat.com>
2438
2439 PR c/68024
2440 * c-decl.c (start_function): Warn about vararg functions without
2441 a prototype.
2442
9f47c7e5
IE
24432015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
2444
2445 * c-typeck.c (build_conditional_expr): Use boolean vector
2446 type for vector comparison.
2447 (build_vec_cmp): New.
2448 (build_binary_op): Use build_vec_cmp for comparison.
2449
fa60eeb9
MP
24502015-10-20 Marek Polacek <polacek@redhat.com>
2451
2452 * c-parser.c (is_cilkplus_vector_p): Don't define here.
2453
2c7020eb
MP
24542015-10-20 Marek Polacek <polacek@redhat.com>
2455
2456 PR c/67964
2457 * c-parser.c (c_parser_attributes): Break out of the loop if the
2458 token after an attribute isn't a comma.
2459
d9a6bd32
JJ
24602015-10-13 Jakub Jelinek <jakub@redhat.com>
2461 Aldy Hernandez <aldyh@redhat.com>
2462
2463 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
2464 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
2465 (c_parser_omp_variable_list): Handle structure elements for
2466 map, to and from clauses. Handle array sections in reduction
2467 clause. Formatting fixes.
2468 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
2469 if clause modifiers.
2470 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
2471 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
2472 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
2473 c_parser_omp_clause_is_device_ptr): New functions.
2474 (c_parser_omp_clause_ordered): Parse optional parameter.
2475 (c_parser_omp_clause_reduction): Handle array reductions.
2476 (c_parser_omp_clause_schedule): Parse optional simd modifier.
2477 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
2478 functions.
2479 (c_parser_omp_clause_linear): Parse linear clause modifiers.
2480 (c_parser_omp_clause_depend_sink): New function.
2481 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
2482 (c_parser_omp_clause_map): Parse release/delete map kinds and
2483 optional always modifier.
2484 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
2485 and c_finish_omp_clauses callers.
2486 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
2487 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
2488 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
2489 (OMP_CRITICAL_CLAUSE_MASK): Define.
2490 (c_parser_omp_critical): Parse critical clauses.
2491 (c_parser_omp_for_loop): Handle doacross loops, adjust
2492 c_finish_omp_for and c_finish_omp_clauses callers.
2493 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
2494 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
2495 (OMP_FOR_CLAUSE_MASK): Add linear clause.
2496 (c_parser_omp_for): Disallow ordered clause when combined with
2497 distribute. Disallow linear clause when combined with distribute
2498 and not combined with simd.
2499 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
2500 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
2501 parse clauses and if depend clause is found, don't parse a body.
2502 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
2503 Allow target parallel without for after it.
2504 (OMP_TASK_CLAUSE_MASK): Add priority clause.
2505 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
2506 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
2507 invalid kinds.
2508 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
2509 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
2510 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
2511 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
2512 functions.
2513 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
2514 defaultmap and is_device_ptr clauses.
2515 (c_parser_omp_target): Parse target parallel and target simd. Set
2516 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
2517 and target exit data. Diagnose invalid map kinds.
2518 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
2519 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
2520 construct.
2521 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
2522 &omp_priv.
2523 (OMP_TASKLOOP_CLAUSE_MASK): Define.
2524 (c_parser_omp_taskloop): New function.
2525 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
2526 handle PRAGMA_OMP_TASKLOOP.
2527 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
2528 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
2529 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
2530 Add IS_OMP argument, handle structure element bases, diagnose
2531 bitfields, pass IS_OMP recursively, diagnose known zero length
2532 array sections in depend clauses, handle array sections in reduction
2533 clause, diagnose negative length even for pointers.
2534 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
2535 types, pass IS_OMP down to handle_omp_array_sections_1, handle
2536 array sections in reduction clause, set
2537 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
2538 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
2539 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
2540 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
2541
21ba0cea
MP
25422015-10-06 Marek Polacek <polacek@redhat.com>
2543
2544 * c-parser.c (c_parser_statement_after_labels): Use
2545 protected_set_expr_location.
2546 (c_parser_omp_clause_num_gangs): Likewise.
2547 (c_parser_omp_clause_num_threads): Likewise.
2548 (c_parser_omp_clause_num_workers): Likewise.
2549 (c_parser_omp_clause_vector_length): Likewise.
2550 (c_parser_omp_clause_num_teams): Likewise.
2551 (c_parser_omp_clause_thread_limit): Likewise.
2552 * c-typeck.c (build_c_cast): Likewise.
2553 (c_cast_expr): Likewise.
2554
624d31fe
RS
25552015-10-05 Richard Sandiford <richard.sandiford@arm.com>
2556
2557 * c-typeck.c (c_tree_equal): Use real_equal instead of
2558 REAL_VALUES_EQUAL.
2559
b8fd7909
JM
25602015-10-04 Jason Merrill <jason@redhat.com>
2561
2562 * c-parser.c (c_lex_one_token): Handle @synchronized.
2563 * c-decl.c (match_builtin_function_types): A declaration of a built-in
2564 can change whether the function is transaction_safe.
2565
1c7485af
MP
25662015-10-02 Marek Polacek <polacek@redhat.com>
2567
2568 PR c/67730
2569 * c-typeck.c (convert_for_assignment): Use the expansion point
2570 location throughout.
2571
3e3b8d63
MP
25722015-10-02 Marek Polacek <polacek@redhat.com>
2573
2574 PR c/64249
2575 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
2576 and pass it down to c_parser_if_statement.
2577 (c_parser_else_body): Add CHAIN parameter and pass it down to
2578 c_parser_statement_after_labels.
2579 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
2580 duplicated if-else-if conditions.
2581
aabef2de
MP
25822015-10-01 Marek Polacek <polacek@redhat.com>
2583
2584 * c-typeck.c (convert_for_assignment): Improve commentary.
2585
de8ddd5f
MP
25862015-09-30 Marek Polacek <polacek@redhat.com>
2587
2588 PR c/67730
2589 * c-typeck.c (c_finish_return): Use the expansion point location for
2590 certain "return with value" warnings.
2591
c4914de6
MLI
25922015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
2593
2594 * c-parser.c (pragma_lex): Add loc argument.
2595
0e36f5c7
MP
25962015-09-15 Marek Polacek <polacek@redhat.com>
2597
2598 PR c/67580
2599 * c-decl.c (tag_exists_p): New function.
2600 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
2601 struct/union/enum keywords are missing.
2602 * c-tree.h (tag_exists_p): Declare.
2603
2f3bb934
MP
26042015-09-15 Marek Polacek <polacek@redhat.com>
2605
2606 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
2607 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
2608 Return NULL_TREE instead of 0.
2609 (lookup_name): Return NULL_TREE instead of 0.
2610 (lookup_name_in_scope): Likewise.
2611 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
2612 (parser_xref_tag): Use false instead of 0.
2613 (start_struct): Use true instead of 1.
2614 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
2615
aa256c4a
MP
26162015-09-14 Marek Polacek <polacek@redhat.com>
2617
2618 * c-typeck.c (set_nonincremental_init_from_string): Use
2619 HOST_WIDE_INT_M1U when shifting a negative value.
2620
dbb68221
MW
26212015-09-09 Mark Wielaard <mjw@redhat.com>
2622
2623 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
2624 parm against NULL.
2625
a8a098ac
JJ
26262015-09-10 Jakub Jelinek <jakub@redhat.com>
2627
2628 PR c/67502
2629 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
2630 into OMP_FOR_PRE_BODY rather than before the loop.
2631
f4b189d5
JJ
26322015-09-09 Jakub Jelinek <jakub@redhat.com>
2633
0bb99c11
JJ
2634 PR c/67501
2635 * c-parser.c (c_parser_oacc_all_clauses,
2636 c_parser_omp_all_clauses): Remove invalid clause from
2637 list of clauses even if parser->error is set.
2638
fce5e5e3
JJ
2639 PR c/67500
2640 * c-parser.c (c_parser_omp_clause_aligned,
2641 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
2642 test for errors.
2643 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
2644 error_mark_node.
2645
f4b189d5
JJ
2646 PR c/67495
2647 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
2648 instead of c_parser_unary_expression. If the result is !lvalue_p,
2649 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
2650
b2aaf235
MP
26512015-09-04 Marek Polacek <polacek@redhat.com>
2652
2653 PR sanitizer/67279
2654 * c-typeck.c (build_binary_op): Don't instrument static initializers.
2655
1807ffc1
MS
26562015-09-03 Martin Sebor <msebor@redhat.com>
2657
2658 PR c/66516
8b652e65
JJ
2659 * c-typeck.c (convert_arguments, parser_build_unary_op,
2660 build_conditional_expr, c_cast_expr, convert_for_assignment,
2661 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
2662 reject_gcc_builtin.
2663 (c_decl_implicit): Define.
2664
d04ff417
MP
26652015-09-02 Marek Polacek <polacek@redhat.com>
2666
2667 PR c/67432
2668 * c-parser.c (c_parser_enum_specifier): Give a better error for
2669 an empty enum.
2670
a79683d5
TS
26712015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
2672
2673 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
2674
191a6b94
MP
26752015-08-12 Marek Polacek <polacek@redhat.com>
2676
2677 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
2678 LOC to it.
2679
420a9d9b
MP
26802015-08-03 Marek Polacek <polacek@redhat.com>
2681
2682 PR c/67088
2683 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
2684 Use it.
2685 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
2686
992118a1
PP
26872015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
2688
2689 * c-parser.c (c_parser_if_body): Take token_indent_info
2690 argument. Call warn_for_misleading_indentation even when the
2691 body is a semicolon. Extract token_indent_infos corresponding
2692 to the guard, body and next tokens. Adjust call to
2693 warn_for_misleading_indentation accordingly.
2694 (c_parser_else_body): Likewise.
2695 (c_parser_if_statement): Likewise.
2696 (c_parser_while_statement): Likewise.
2697 (c_parser_for_statement): Likewise.
2698
46308474
LFSM
26992015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
2700 Manuel López-Ibáñez <manu@gcc.gnu.org>
2701
2702 * c-decl.c (get_parm_info): Remove static var. Update warning
2703 message.
2704
05b28fd6
MP
27052015-07-27 Marek Polacek <polacek@redhat.com>
2706
2707 PR c++/66555
2708 PR c/54979
2709 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
2710
451b5e48
MP
27112015-07-20 Marek Polacek <polacek@redhat.com>
2712
2713 PR c++/55095
2714 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
2715 (build_binary_op): Warn about left shift overflows.
2716
1916bcb5
AM
27172015-07-09 Andrew MacLeod <amacleod@redhat.com>
2718
2719 * c-array-notation.c: Adjust includes for flags.h changes.
2720 * c-objc-common.c: Likewise.
2721
c7131fb2
AM
27222015-07-07 Andrew MacLeod <amacleod@redhat.com>
2723
2724 * c-array-notation.c: Adjust includes.
2725 * c-aux-info.c: Likewise.
2726 * c-convert.c: Likewise.
2727 * c-decl.c: Likewise.
2728 * c-errors.c: Likewise.
2729 * c-lang.c: Likewise.
2730 * c-objc-common.c: Likewise.
2731 * c-parser.c: Likewise.
2732 * c-typeck.c: Likewise.
2733
da2e71c9
MLI
27342015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
2735
2736 PR fortran/66605
2737 * c-decl.c (finish_function): Call do_warn_unused_parameter.
2738
b155cfd9
MP
27392015-06-29 Marek Polacek <polacek@redhat.com>
2740
2741 PR c/66322
2742 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
2743 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
2744 about -Wswitch-bool here.
2745 (do_case): Update c_add_case_label call.
2746 (c_finish_case): Update c_do_switch_warnings call.
2747
31521951
MP
27482015-06-27 Marek Polacek <polacek@redhat.com>
2749
2750 * c-typeck.c: Use VECTOR_TYPE_P throughout.
2751
22d03525
MP
27522015-06-26 Marek Polacek <polacek@redhat.com>
2753
2754 * c-array-notation.c (fix_builtin_array_notation_fn): Use
2755 INDIRECT_REF_P.
2756 * c-typeck.c (array_to_pointer_conversion): Likewise.
2757 (build_unary_op): Likewise.
2758 (c_finish_return): Likewise.
2759
f0889939
AM
27602015-06-25 Andrew MacLeod <amacleod@redhat.com>
2761
2762 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
2763 * c-parser.c: Likewise.
2764
8d67ee55
RS
27652015-06-25 Richard Sandiford <richard.sandiford@arm.com>
2766
2767 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
2768 instead of pointer_hash.
2769 (detect_field_duplicates): Likewise.
2770
0ae9bd27
MP
27712015-06-25 Marek Polacek <polacek@redhat.com>
2772
2773 * c-array-notation.c: Use VAR_P throughout.
2774 * c-decl.c: Likewise.
2775 * c-objc-common.c: Likewise.
2776 * c-parser.c: Likewise.
2777 * c-typeck.c: Likewise.
2778
62f9079a
MP
27792015-06-25 Marek Polacek <polacek@redhat.com>
2780
2781 * c-decl.c: Use is_global_var throughout.
2782 * c-parser.c: Likewise.
2783 * c-typeck.c: Likewise.
2784
abb226c9
AM
27852015-06-17 Andrew MacLeod <amacleod@redhat.com>
2786
2787 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
2788 * c-aux-info.c: Likewise.
2789 * c-convert.c: Likewise.
2790 * c-decl.c: Likewise.
2791 * c-errors.c: Likewise.
2792 * c-lang.c: Likewise.
2793 * c-objc-common.c: Likewise.
2794 * c-parser.c: Likewise.
2795 * c-typeck.c: Likewise.
2796
8cbababc
JH
27972015-06-11 Jan Hubicka <hubicka@ucw.cz>
2798
2799 PR middle-end/66325
2800 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
2801 variants.
2802
a0349665
PMR
28032015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
2804
2805 * c-decl.c (pop_scope): Register the main translation unit
2806 through the new debug hook.
2807
13fdf2e2
AM
28082015-06-08 Andrew MacLeod <amacleod@redhat.com>
2809
2810 * c-array-notation.c : Adjust include files.
2811 * c-aux-info.c : Likewise.
2812 * c-convert.c : Likewise.
2813 * c-decl.c : Likewise.
2814 * c-errors.c : Likewise.
2815 * c-lang.c : Likewise.
2816 * c-lang.h : Likewise.
2817 * c-objc-common.c : Likewise.
2818 * c-parser.c : Likewise.
2819 * c-typeck.c : Likewise.
2820
d7438551
AH
28212015-06-05 Aldy Hernandez <aldyh@redhat.com>
2822
2823 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
2824 immediately clobber it.
2825 (c_write_global_declarations_1): Remove call to
2826 check_global_declaration_1.
2827 (c_write_global_declarations_2): Remove.
2828 (c_write_final_cleanups): Rename from c_write_global_declarations.
2829 Remove call to finalize_compilation_unit.
2830 Remove calls to debugging hooks.
2831 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
2832 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
2833 * c-tree.h: Remove c_write_global_declarations.
2834
ecb9f223
AM
28352015-06-04 Andrew MacLeod <amacleod@redhat.com>
2836
2837 * c-array-notation.c: Adjust includes for restructured coretypes.h.
2838 * c-aux-info.c: Likewise.
2839 * c-convert.c: Likewise.
2840 * c-decl.c: Likewise.
2841 * c-errors.c: Likewise.
2842 * c-lang.c: Likewise.
2843 * c-objc-common.c: Likewise.
2844 * c-parser.c: Likewise.
2845 * c-typeck.c: Likewise.
2846
9482b620
MP
28472015-06-04 Marek Polacek <polacek@redhat.com>
2848
2849 PR c/66341
2850 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
2851 it is a lvalue.
2852
bc51ace3
PK
28532015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2854
2855 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
2856 Warn for empty struct.
2857 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
2858
ea5b45b6
AT
28592015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
2860
2861 * c-decl.c (start_function): Call plugin before parsing.
2862 (finish_function): Call plugin after parsing.
2863
c2d47482
PK
28642015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2865
2866 PR c/49551
2867 * c-decl.c (merge_decls): Merge DECL_COMMON.
2868
a95492ab
JW
28692015-05-22 Jim Wilson <jim.wilson@linaro.org>
2870
2871 * Make-lang.in (check_gcc_pallelize): Define.
2872
fd5c817a
MP
28732015-05-22 Marek Polacek <polacek@redhat.com>
2874
2875 PR c/47043
2876 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
2877 attributes.
2878
c7b70a3c
MP
28792015-05-21 Marek Polacek <polacek@redhat.com>
2880
2881 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
2882 DECL_BUILT_IN.
2883
21b634ae
MP
28842015-05-20 Marek Polacek <polacek@redhat.com>
2885
2886 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
2887 * c-typeck.c: Likewise.
2888
296a8c2f
MP
28892015-05-19 Marek Polacek <polacek@redhat.com>
2890
2891 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
2892
41b37d5e
JJ
28932015-05-19 Jakub Jelinek <jakub@redhat.com>
2894
2895 PR middle-end/66199
2896 * c-parser.c (c_parser_omp_for_loop): Don't add
2897 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
2898 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
2899 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
2900 constructs.
2901
fab27f52
MM
29022015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
2903
2904 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 2905 swaps.
fab27f52 2906
40de31cf
MLI
29072015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
2908
2909 PR fortran/44054
2910 * c-objc-common.c (c_tree_printer): Replace locus pointer with
2911 accessor function.
2912
3aa3c9fc
MP
29132015-05-14 Marek Polacek <polacek@redhat.com>
2914
2915 PR c/66066
2916 PR c/66127
2917 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
2918 rather than with 0.
2919
c3388e62
DM
29202015-05-12 David Malcolm <dmalcolm@redhat.com>
2921
2922 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
2923 to add a call to warn_for_misleading_indentation.
2924 (c_parser_else_body): Likewise, adding param "else_loc".
2925 (c_parser_if_statement): Check for misleading indentation.
2926 (c_parser_while_statement): Likewise.
2927 (c_parser_for_statement): Likewise.
2928
755e528f
MP
29292015-05-08 Marek Polacek <polacek@redhat.com>
2930
2931 PR c/64918
2932 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
2933 (output_init_element): Likewise.
2934
0173bd2a
MP
29352015-05-07 Marek Polacek <polacek@redhat.com>
2936
2937 PR c/65179
2938 * c-typeck.c (build_binary_op): Warn when left shifting a negative
2939 value.
2940
9babc352
MP
29412015-04-30 Marek Polacek <polacek@redhat.com>
2942
2943 * c-typeck.c (set_init_label): Call error_at instead of error and
2944 pass LOC to it.
2945
ac9f18db
MP
2946 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
2947 the type of a decl.
2948
ec3fba51
MP
2949 * c-typeck.c (c_build_va_arg): Clarify the error message.
2950
b811915d
TS
29512015-04-29 Thomas Schwinge <thomas@codesourcery.com>
2952
2953 * c-parser.c (c_parser_oacc_enter_exit_data): Use
2954 OMP_STANDALONE_CLAUSES.
2955
f3075008
MP
29562015-04-28 Marek Polacek <polacek@redhat.com>
2957
2958 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
2959
4e81b788
MP
29602015-04-28 Marek Polacek <polacek@redhat.com>
2961
2962 PR c/65901
2963 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
2964
6c1db78e
MP
29652015-04-25 Marek Polacek <polacek@redhat.com>
2966
2967 PR c/52085
2968 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
2969 attribute.
2970
5c4abbb8
MP
29712015-04-23 Marek Polacek <polacek@redhat.com>
2972
2973 PR c/65345
2974 * c-decl.c (set_labels_context_r): New function.
2975 (store_parm_decls): Call it via walk_tree_without_duplicates.
2976 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
2977 instead of create_tmp_var. Build TARGET_EXPR instead of
2978 COMPOUND_EXPR.
2979 (build_atomic_assign): Use create_tmp_var_raw instead of
2980 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
2981
06aca1d5
IV
29822015-04-20 Ilya Verbin <ilya.verbin@intel.com>
2983
2984 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
2985 (c_parser_omp_target_update): Add missed %> to error_at ().
2986
8fba1830
BRF
29872015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
2988
2989 PR target/55143
2990 * c-decl.c (c_default_pointer_mode): Remove definition.
2991 * c-tree.h (c_default_pointer_mode): Remove declaration.
2992
62021f64
TB
29932015-03-27 Tobias Burnus <burnus@net-b.de>
2994
2995 PR c/65586
2996 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
2997 error out.
2998 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
2999 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
3000 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
3001
9b65e171
JJ
30022015-03-19 Jakub Jelinek <jakub@redhat.com>
3003
3004 * c-decl.c (c_decl_attributes): Also add "omp declare target"
3005 attribute for DECL_EXTERNAL VAR_DECLs.
3006
17958621
JJ
30072015-03-11 Jakub Jelinek <jakub@redhat.com>
3008
3009 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
3010 argument.
3011
7ccb1a11
JJ
30122015-03-10 Jakub Jelinek <jakub@redhat.com>
3013
3014 PR c/65120
3015 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
3016 before preparing arguments to warn_logical_not_parentheses.
3017
01177669
JJ
30182015-03-09 Jakub Jelinek <jakub@redhat.com>
3019
3020 PR c/65120
3021 * c-typeck.c (parser_build_binary_op): Don't warn for
3022 !!x == y or !b == y where b is _Bool.
3023
802ac282
MP
30242015-03-09 Marek Polacek <polacek@redhat.com>
3025
3026 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
3027 * c-decl.c (grokdeclarator): Likewise.
3028 * c-typeck.c (build_binary_op): Likewise.
3029
e5165b60
MP
30302015-02-27 Marek Polacek <polacek@redhat.com>
3031
3032 PR c/65228
3033 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
3034
065d214c
MP
30352015-02-14 Marek Polacek <polacek@redhat.com>
3036
3037 PR c/64768
3038 * c-decl.c (grokdeclarator): Set the range of a flexible array member
3039 declared through a typedef name.
3040
e5d9235b
MP
30412015-02-13 Marek Polacek <polacek@redhat.com>
3042
3043 PR c/65050
3044 * c-decl.c (grokdeclarator): Print also the type when giving
3045 the error message about array's incomplete element type.
3046
fa01ffcc
JJ
30472015-02-11 Jakub Jelinek <jakub@redhat.com>
3048
3049 PR c/64824
3050 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
3051 check in the POP macro.
3052
c3e38a03
MP
30532015-02-09 Marek Polacek <polacek@redhat.com>
3054
3055 PR c/64856
3056 * c-typeck.c (process_init_element): Don't always wrap
3057 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
3058 initializing a range of elements.
3059
4886ec8e
JJ
30602015-02-04 Jakub Jelinek <jakub@redhat.com>
3061
3062 PR c/64824
3063 PR c/64868
3064 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
3065
c3e38a03 30662015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
3067
3068 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
3069 processing enum declaration.
3070
7b33f0c8
MP
30712015-01-29 Marek Polacek <polacek@redhat.com>
3072
3073 PR c/64709
3074 * c-typeck.c (pop_init_level): If constructor_elements has
3075 exactly one element with integer_zerop value, set constructor_zeroinit
3076 to 1. Remove braces around warning_init call.
3077
dea63e49
JJ
30782015-01-27 Jakub Jelinek <jakub@redhat.com>
3079
3080 PR c/64766
3081 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
3082 of FUNCTION_DECLs with error_mark_node.
3083
d38f7dce
JJ
30842015-01-26 Jakub Jelinek <jakub@redhat.com>
3085
3086 PR c/64778
3087 * c-typeck.c (convert_arguments): Return -1 if there are
3088 error_args, even if we've diagnosed too many arguments.
3089
cbf5d0e7
RB
30902015-01-21 Richard Biener <rguenther@suse.de>
3091
3092 PR middle-end/64313
3093 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
3094 for builtins the user declared correctly.
3095
41dbbb37
TS
30962015-01-15 Thomas Schwinge <thomas@codesourcery.com>
3097 Bernd Schmidt <bernds@codesourcery.com>
3098 Cesar Philippidis <cesar@codesourcery.com>
3099 James Norris <jnorris@codesourcery.com>
3100 Jakub Jelinek <jakub@redhat.com>
3101 Ilmir Usmanov <i.usmanov@samsung.com>
3102
3103 * c-parser.c: Include "gomp-constants.h".
3104 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
3105 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
3106 Use OMP_CLAUSE_SET_MAP_KIND.
3107 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
3108 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
3109 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
3110 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
3111 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
3112 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
3113 "copyout", "create", "delete", "deviceptr", "gang", "host",
3114 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
3115 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
3116 "present_or_create", "pcreate", "seq", "self", "vector",
3117 "vector_length", "wait", "worker".
3118 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
3119 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
3120 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
3121 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
3122 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
3123 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
3124 (c_parser_oacc_data_clause_deviceptr)
3125 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
3126 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
3127 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
3128 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
3129 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
3130 (c_parser_oacc_parallel, c_parser_oacc_update)
3131 (c_parser_oacc_wait): New functions.
3132 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
3133 (c_finish_oacc_data): New prototypes.
3134 * c-typeck.c: Include "gomp-constants.h".
3135 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
3136 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
3137 OMP_CLAUSE_SET_MAP_KIND.
3138 (c_finish_oacc_parallel, c_finish_oacc_kernels)
3139 (c_finish_oacc_data): New functions.
3140 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
3141 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
3142 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
3143 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
3144 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
3145 GOMP_MAP_FORCE_DEVICEPTR.
3146
adfac8df
JJ
31472015-01-09 Michael Collison <michael.collison@linaro.org>
3148
3149 * c-array-notation.c: Include hash-set.h, machmode.h,
3150 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3151 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
3152 * c-aux-info.c: Ditto.
3153 * c-convert.c: Ditto.
3154 * c-decl.c: Ditto.
3155 * c-errors.c: Ditto.
3156 * c-lang.c: Dittoxs.
3157 * c-objc-common.c: Ditto.
3158 * c-parser.c: Ditto.
3159 * c-typeck.c: Include hash-set.h, machmode.h,
3160 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3161 fold-const.h, wide-int.h, inchash.h, real.h and
3162 fixed-value.h due to flattening of tree.h.
3163
2cc901dc
MP
31642015-01-07 Marek Polacek <polacek@redhat.com>
3165
3166 PR c/64417
3167 * c-typeck.c (process_init_element): Disallow initialization of
3168 a flexible array member with a string constant if the structure
3169 is in an array.
3170
5624e564
JJ
31712015-01-05 Jakub Jelinek <jakub@redhat.com>
3172
e5341100
JJ
3173 PR sanitizer/64344
3174 * c-typeck.c (convert_for_assignment, c_finish_return): For
3175 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
3176 types also set in_late_binary_op around convert call.
3177 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
3178 to integral type casts, if not in_late_binary_op, pass c_fully_fold
3179 result on expr as last argument to ubsan_instrument_float_cast,
3180 if in_late_binary_op, don't use c_save_expr but save_expr.
3181
5624e564
JJ
3182 Update copyright years.
3183
5bd012f8
MP
31842015-01-05 Marek Polacek <polacek@redhat.com>
3185
3186 PR c/64423
3187 * c-typeck.c (build_array_ref): Pass loc down to
3188 warn_array_subscript_with_type_char.
3189
3f8257db 31902014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
3191
3192 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 3193 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 3194 element type.
8e745a17 3195 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 3196 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 3197 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 3198 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 3199 to PEDWARN_FOR_QUALIFIERS.
768952be 3200
8f94a8c4
JJ
32012014-12-17 Jakub Jelinek <jakub@redhat.com>
3202
3203 PR sanitizer/64289
3204 * c-convert.c: Include ubsan.h.
3205 (convert): For real -> integral casts and
3206 -fsanitize=float-cast-overflow don't call convert_to_integer, but
3207 instead instrument the float cast directly.
3208
b731b390
JJ
32092014-11-29 Jakub Jelinek <jakub@redhat.com>
3210
3211 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
3212 c_finish_stmt_expr): Remove NULL last argument from
3213 create_tmp_var_raw and create_tmp_var calls.
3214 * c-array-notation.c (fix_builtin_array_notation_fn,
3215 build_array_notation_expr, fix_conditional_array_notations_1,
3216 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
3217
541e35a6
MP
32182014-11-28 Marek Polacek <polacek@redhat.com>
3219
3220 PR c/63862
3221 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
3222 convert the right operand to integer type.
3223
b286be94
MP
32242014-11-25 Marek Polacek <polacek@redhat.com>
3225
3226 PR c/63877
3227 * c-decl.c (start_function): Disable -Wmissing-declarations warning
3228 for inline functions.
3229
aa7da51a
JJ
32302014-11-21 Jakub Jelinek <jakub@redhat.com>
3231
3232 PR target/63764
3233 * c-typeck.c (build_array_ref): Adjust
3234 convert_vector_to_pointer_for_subscript caller. If it returns true,
3235 call non_lvalue_loc on the result.
3236
d876207f
RB
32372014-11-11 Richard Biener <rguenther@suse.de>
3238
3239 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
3240 to true.
3241
e5e44252
AK
32422014-11-10 Andi Kleen <ak@linux.intel.com>
3243
3244 PR c/60804
3245 * c-parser.c (c_parser_statement_after_labels): Call
3246 check_no_cilk.
3247 (c_parser_if_statement): Dito.
3248 (c_parser_switch_statement): Dito.
3249 (c_parser_while_statement): Dito.
3250 (c_parser_do_statement): Dito.
3251 (c_parser_for_statement): Dito.
3252 * c-typeck.c (c_finish_loop): Dito.
3253
13c21655
PC
32542014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
3255
3256 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
3257 OPT_Wshift_count_overflow in the warnings.
3258
2d51fcef
MP
32592014-10-30 Marek Polacek <polacek@redhat.com>
3260
3261 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
3262 print the stripped version as well, if they're not the same.
3263
ef4bddc2
RS
32642014-10-29 Richard Sandiford <richard.sandiford@arm.com>
3265
3266 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
3267 machine_mode.
3268
c582198b
AM
32692014-10-28 Andrew MacLeod <amacleod@redhat.com>
3270
3271 * c-decl.c: Adjust include files.
3272 * c-parser.c: Ditto.
3273
ddc8de03
PM
32742014-10-27 Phil Muldoon <pmuldoon@redhat.com>
3275 Tom Tromey <tromey@redhat.com>
3276
3277 * c-tree.h (enum c_oracle_request): New.
3278 (c_binding_oracle_function): New typedef.
3279 (c_binding_oracle, c_pushtag, c_bind): Declare.
3280 * c-decl.c (c_binding_oracle): New global.
3281 (I_SYMBOL_CHECKED): New macro.
3282 (i_symbol_binding): New function.
3283 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
3284 (I_TAG_CHECKED): New macro.
3285 (i_tag_binding): New function.
3286 (I_TAG_BINDING, I_TAG_DECL): Redefine.
3287 (I_LABEL_CHECKED): New macro.
3288 (i_label_binding): New function.
3289 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
3290 (c_print_identifier): Save and restore c_binding_oracle.
3291 (c_pushtag, c_bind): New functions.
3292
60393bbc
AM
32932014-10-27 Andrew MacLeod <amacleod@redhat.com>
3294
3295 * c-typeck.c: Adjust include files.
3296
d723bb7c
MLI
32972014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
3298
3299 PR c++/53061
3300 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
3301 initialization here...
3302 (c_initialize_diagnostics): ... but here. Set defaults after
3303 building pretty-printer.
3304
1bc5a451
MP
33052014-10-23 Marek Polacek <polacek@redhat.com>
3306
3307 PR c/63626
3308 * c-decl.c (pop_scope): Don't print warning in external_scope.
3309
4435bb92
MP
33102014-10-19 Marek Polacek <polacek@redhat.com>
3311
3312 PR c/63567
3313 * c-typeck.c (output_init_element): Allow initializing objects with
3314 static storage duration with compound literals even in C99 and add
3315 pedwarn for it.
3316
7278465e
MP
33172014-10-17 Marek Polacek <polacek@redhat.com>
3318
3319 PR c/63567
3320 * c-typeck.c (digest_init): Allow initializing objects with static
3321 storage duration with compound literals even in C99 and add pedwarn
3322 for it.
3323
d9b7be2e
MP
33242014-10-17 Marek Polacek <polacek@redhat.com>
3325
3326 PR c/63543
3327 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
3328 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
3329 error multiple times. Print the type.
3330
f406ae1f
MP
33312014-10-17 Marek Polacek <polacek@redhat.com>
3332
3333 PR c/63549
3334 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
3335 type.
3336
92574c7c
MP
33372014-10-17 Marek Polacek <polacek@redhat.com>
3338
3339 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
3340 (start_function): Use OPT_Wimplicit_int instead of 0.
3341 (store_parm_decls_oldstyle): Likewise.
3342
1bc4a978
MT
33432014-10-17 Alan Modra <amodra@gmail.com>
3344
3345 PR middle-end/61848
3346 * c-decl.c (merge_decls): Don't merge section name or tls model
3347 to newdecl symtab node, instead merge to olddecl. Override
3348 existing olddecl section name. Set tls_model for all thread-local
3349 vars, not just OMP thread-private ones. Remove incorrect comment.
3350
83685514
AM
33512014-10-16 Andrew MacLeod <amacleod@redhat.com>
3352
3353 * c-decl.c: Adjust include files.
3354
78a7c317
DD
33552014-10-14 DJ Delorie <dj@redhat.com>
3356
3357 * c-parser.c (c_parse_init): Add RID entries for each __intN.
3358 (c_token_starts_typename): Check all __intN, not just __int128.
3359 (c_token_starts_declspecs): Likewise.
3360 (c_parser_declspecs): Likewise.
3361 (c_parser_attribute_any_word): Likewise.
3362 (c_parser_objc_selector): Likewise.
3363 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
3364 (struct c_declspecs): Add int_n_idx field to record *which* __intN
3365 is specified.
3366 * c-decl.c (declspecs_add_type): Check for all __intN, not just
3367 __int128.
3368 (finish_declspecs): Likewise.
3369
74d98c1e
AB
33702014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
3371
8e745a17 3372 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 3373 the duplicate code.
8e745a17 3374 (c_parser_statement): Call the new function.
74d98c1e 3375
84937de2
MP
33762014-10-09 Marek Polacek <polacek@redhat.com>
3377
3378 PR c/63480
3379 * c-typeck.c (pop_init_level): Don't warn about initializing
3380 with { }.
3381
0382aaa0
MP
33822014-10-07 Marek Polacek <polacek@redhat.com>
3383
3384 PR c/59717
3385 * c-decl.c (header_for_builtin_fn): New function.
3386 (implicitly_declare): Suggest which header to include.
3387
7a0ca710
MP
33882014-10-07 Marek Polacek <polacek@redhat.com>
3389
3390 * c-convert.c (convert): Use error_operand_p.
3391 * c-typeck.c (require_complete_type): Likewise.
3392 (really_atomic_lvalue): Likewise.
3393 (digest_init): Likewise.
3394 (handle_omp_array_sections_1): Likewise.
3395
6bc8a126
MP
33962014-10-03 Marek Polacek <polacek@redhat.com>
3397
3398 PR c/63453
3399 * c-decl.c (pop_scope): Don't warn about "inline function declared
3400 but never defined" for functions marked with gnu_inline attribute.
3401
d90c0a59
JJ
34022014-09-25 Jakub Jelinek <jakub@redhat.com>
3403
3404 PR c++/63249
3405 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
3406 on low_bound and length.
3407
083e891e
MP
34082014-09-24 Marek Polacek <polacek@redhat.com>
3409
3410 PR c/61405
3411 PR c/53874
3412 * c-parser.c: Don't define CPP_KEYWORD.
3413 (c_parser_switch_statement): Pass original type to c_finish_case.
3414 * c-tree.h (c_finish_case): Update declaration.
3415 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
3416 conditionally to c_do_switch_warnings.
3417
8d95fe25
MP
34182014-09-03 Marek Polacek <polacek@redhat.com>
3419
3420 PR c/62024
3421 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
3422 conversions.
3423
9a771876
JJ
34242014-09-02 Jakub Jelinek <jakub@redhat.com>
3425 Balaji V. Iyer <balaji.v.iyer@intel.com>
3426 Igor Zamyatin <igor.zamyatin@intel.com>
3427
3428 * c-parser.c (c_parser_cilk_for): New function.
3429 (c_parser_cilk_grainsize): Likewise.
3430 (c_get_temp_regvar): Likewise.
3431 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
3432 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
3433 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
3434 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
3435 case.
3436
b7679d96
CG
34372014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
3438
3439 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
3440 with using HOST_WIDE_INT without truncation to 'int'
3441
59ea0364
MP
34422014-08-22 Marek Polacek <polacek@redhat.com>
3443
3444 PR c++/62199
3445 * c-typeck.c (parser_build_binary_op): Adjust call to
3446 warn_logical_not_parentheses.
3447
671a475e
IZ
34482014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
3449
3450 PR other/62008
3451 * c-parser.c (c_parser_array_notation): Check for correct
3452 type of an array added.
3453
04159acf
MP
34542014-08-19 Marek Polacek <polacek@redhat.com>
3455
3456 PR c++/62153
3457 * c-typeck.c (build_binary_op): If either operand of a comparison
3458 is a boolean expression, call maybe_warn_bool_compare.
3459
c77935ee
PP
34602014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
3461
3462 PR c/45584
3463 * c-typeck.c (build_c_cast): Do a conversion even when the
3464 TYPE_MAIN_VARIANTs are the same.
3465
35aff4fb
MP
34662014-08-19 Marek Polacek <polacek@redhat.com>
3467
3468 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
3469 pedwarn_c99 instead of pedwarn.
3470 (grokfield): Likewise.
3471 (warn_defaults_to): New function.
3472 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
3473 Unconditionally call pedwarn_c99 instead of pedwarn.
3474 (start_function): Call warn_defaults_to instead of pedwarn_c99.
3475 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
3476 check flag_isoc11 before.
3477 * c-errors.c (pedwarn_c99): Change the return type to bool.
3478 Handle -Wc99-c11-compat.
3479 * c-parser.c (disable_extension_diagnostics): Handle
3480 warn_c99_c11_compat.
3481 (restore_extension_diagnostics): Likewise.
3482 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
3483 instead of pedwarn, don't check flag_isoc11 before.
3484 (c_parser_declspecs): Likewise.
3485 (c_parser_alignas_specifier): Likewise.
3486 (c_parser_alignof_expression): Likewise.
3487 (c_parser_generic_selection): Likewise.
3488 * c-tree.h (pedwarn_c99): Update declaration.
3489 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
3490 of pedwarn_c99.
3491
177cce46
MP
34922014-08-19 Marek Polacek <polacek@redhat.com>
3493
3494 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
3495 to pedwarn_c90.
3496 * c-errors.c: Include "opts.h".
3497 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
3498 * c-parser.c (disable_extension_diagnostics): Handle negative value
3499 of warn_c90_c99_compat, too.
3500 (restore_extension_diagnostics): Likewise.
3501 (c_parser_compound_statement_nostart): Pass
3502 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
3503
6dc99c33
MP
35042014-08-12 Marek Polacek <polacek@redhat.com>
3505
3506 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
3507 Add pedwarn.
3508 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
3509 Likewise.
3510 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
3511
3f8257db 35122014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
3513
3514 PR c/51849
3515 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
3516 Call pedwarn_c90 instead of pedwarn.
3517 (check_bitfield_type_and_width): Likewise.
3518 (declspecs_add_qual): Likewise.
3519 (declspecs_add_type): Likewise.
3520 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
3521 Adjust to only call pedwarn_c90.
3522 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
3523 pedwarn_c90 instead of pedwarn.
3524 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
3525 * c-parser.c (disable_extension_diagnostics): Handle
3526 warn_c90_c99_compat.
3527 (restore_extension_diagnostics): Likewise.
3528 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
3529 pedwarn_c90 instead of pedwarn.
3530 (c_parser_initelt): Likewise.
3531 (c_parser_postfix_expression): Likewise.
3532 (c_parser_postfix_expression_after_paren_type): Likewise.
3533 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
3534 * c-tree.h: Fix formatting.
3535 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
3536 pedwarn_c90 instead of pedwarn.
3537
9f25a338
TS
35382014-08-07 Trevor Saunders <tsaunders@mozilla.com>
3539
3540 * c-typeck.c: Remove include of pointer-set.h.
3541
044331a8
MP
35422014-08-07 Marek Polacek <polacek@redhat.com>
3543
3544 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
3545
b787e7a2
TS
35462014-08-02 Trevor Saunders <tsaunders@mozilla.com>
3547
3548 * c-typeck.c: Use hash_map instead of pointer_map.
3549
6e2830c3
TS
35502014-08-02 Trevor Saunders <tsaunders@mozilla.com>
3551
3552 * c-decl.c: Use hash_set instead of pointer_set.
3553
a7ee52fb
IZ
35542014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
3555
3556 PR middle-end/61455
3557 * c-array-notation.c (expand_array_notations): Handling
3558 of DECL_EXPR added.
3559
b4dfdc11
MG
35602014-07-31 Marc Glisse <marc.glisse@inria.fr>
3561
3562 PR c++/60517
3563 * c-typeck.c (c_finish_return): Return 0 instead of the address of
3564 a local variable.
3565
976d5a22
TT
35662014-07-30 Tom Tromey <tromey@redhat.com>
3567
3568 * c-typeck.c (struct constructor_stack) <designator_depth>: New
3569 field.
3570 (really_start_incremental_init, push_init_level): Initialize
3571 designator_depth.
3572 (pop_init_level): Set global designator_depth.
3573 (process_init_element): Check for designated_init attribute.
3574
30281de2
MP
35752014-07-20 Marek Polacek <polacek@redhat.com>
3576
3577 PR c/61852
3578 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
3579 (implicitly_declare): Pass location to implicit_decl_warning.
3580
b108f48f
JJ
35812014-07-14 Jakub Jelinek <jakub@redhat.com>
3582
3583 PR middle-end/61294
3584 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
3585 If non-NULL, call c_parser_check_literal_zero.
3586 (c_parser_check_literal_zero): New function.
3587 (c_parser_postfix_expression_after_primary): Adjust
3588 c_parser_expr_list caller, handle -Wmemset-transposed-args.
3589
773ec47f
MP
35902014-07-06 Marek Polacek <polacek@redhat.com>
3591
3592 PR c/6940
3593 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
3594 * c-tree.h (C_ARRAY_PARAMETER): Define.
3595 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
3596 function parameter.
3597
22e1cf1c 35982014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 3599 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
3600
3601 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
3602 releasing symbol.
3603
52ec0ea3
MP
36042014-07-01 Marek Polacek <polacek@redhat.com>
3605
3606 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
3607 instead of 0 to WARN_FOR_ASSIGNMENT.
3608
d5c3d343
MP
36092014-07-01 Marek Polacek <polacek@redhat.com>
3610
3611 PR c/58286
3612 * c-typeck.c (convert_for_assignment): Pass
3613 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
3614
6a7253a4
MP
36152014-06-30 Marek Polacek <polacek@redhat.com>
3616
3617 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
3618 has no_sanitize_undefined attribute.
3619
5e88a8f4
IZ
36202014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
3621
3622 PR middle-end/57541
3623 * c-array-notation.c (fix_builtin_array_notation_fn):
3624 Check for 0 arguments in builtin call. Check that bultin argument is
3625 correct.
3626 * c-parser.c (c_parser_array_notation): Check for incorrect initial
3627 index.
3628
9698b078
SH
36292014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
3630
3631 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
3632 qualifiers in __auto_type for atomic types.
3633 (c_parser_typeof_specifier): Discard all type qualifiers in
3634 __typeof__ for atomic types.
3635
6e07c515
MP
36362014-06-25 Marek Polacek <polacek@redhat.com>
3637
3638 PR c/61162
3639 * c-parser.c (c_parser_statement_after_labels): Pass the location of
3640 the return expression to c_finish_return.
3641
da6f124d
JJ
36422014-06-25 Jakub Jelinek <jakub@redhat.com>
3643
3644 * c-typeck.c (c_finish_omp_clauses): Make sure
3645 OMP_CLAUSE_LINEAR_STEP has correct type.
3646
c203e8a7
TS
36472014-06-24 Trevor Saunders <tsaunders@mozilla.com>
3648
3649 * c-decl.c: Adjust.
3650
56ad0e38
JJ
36512014-06-24 Jakub Jelinek <jakub@redhat.com>
3652
3653 * c-parser.c (c_parser_omp_for_loop): For
3654 #pragma omp parallel for simd move lastprivate clause from parallel
3655 to for rather than simd.
3656
47c2554f
MP
36572014-06-23 Marek Polacek <polacek@redhat.com>
3658
3659 * c-typeck.c (parser_build_binary_op): Don't call
3660 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
3661
56363ffd
JH
36622014-06-15 Jan Hubicka <hubicka@ucw.cz>
3663
3664 * c-parser.c (c_parser_omp_threadprivate): Likewise.
3665 * c-decl.c (merge_decls): Likewise.
3666
d7ff7ae5
MP
36672014-06-09 Marek Polacek <polacek@redhat.com>
3668
3669 PR c/36446
3670 * c-typeck.c (error_init): Call inform instead of error_at.
3671 (pedwarn_init): Call inform instead of pedwarn.
3672 (warning_init): Call inform instead of warning_at.
3673
24d047a3
JH
36742014-06-07 Jan Hubicka <hubicka@ucw.cz>
3675
3676 * c-decl.c (merge_decls): Use set_decl_section_name.
3677 (duplicate_decls): Remove node if it exists.
3678
9bac5cbb
G
36792014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
3680
3681 PR c/53119
3682 * c-typeck.c (push_init_level, process_init_element,
3683 pop_init_level): Correct check for zero initialization, move
3684 missing brace warning to respect zero initialization.
3685
8ffcdea8
MP
36862014-06-05 Marek Polacek <polacek@redhat.com>
3687
3688 PR c/56724
3689 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
3690
742938c9
MP
36912014-06-05 Marek Polacek <polacek@redhat.com>
3692
3693 PR c/49706
3694 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
3695 on the left hand side operand of a comparison.
3696
6447c55d
MP
36972014-06-05 Marek Polacek <polacek@redhat.com>
3698
3699 PR c/48062
3700 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
3701 Print note only if the warning was printed.
3702
9dc7743c
IZ
37032014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
3704
3705 PR c/58942
3706 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
3707 with a pointer.
3708
fedfecef
MP
37092014-06-03 Marek Polacek <polacek@redhat.com>
3710
3711 PR c/60439
3712 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
3713 c_start_case.
3714 * c-tree.h (c_start_case): Update.
3715 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
3716 switch condition has boolean value.
3717
9b2b7279
AM
37182014-06-02 Andrew MacLeod <amacleod@redhat.com>
3719
3720 * c-decl.c: Include builtins.h.
3721 * c-parser.c: Likewise.
3722
5c1bc275
MP
37232014-05-27 Marek Polacek <polacek@redhat.com>
3724
3725 PR c/56724
3726 * c-typeck.c (convert_arguments): Get location of a parameter. Change
3727 error and warning calls to error_at and warning_at. Pass location of
3728 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
3729 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
3730 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
3731
97563bc8
IZ
37322014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
3733
3734 PR c/61191
3735 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
3736 function parameters.
3737
aede2c10
JH
37382014-05-23 Jan Hubicka <hubicka@ucw.cz>
3739
3740 * c-decl.c (merge_decls): Preserve symtab node pointers.
3741 (duplicate_decls): Free new decl.
3742
edbba2ce
TS
37432014-05-23 Thomas Schwinge <thomas@codesourcery.com>
3744
f3316c6d
TS
3745 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
3746 initialization.
3747
edbba2ce
TS
3748 * c-parser.c (c_parser_omp_target): Return bool values.
3749
68c81f24
TS
37502014-05-22 Thomas Schwinge <thomas@codesourcery.com>
3751
3752 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
3753 num_teams_loc variable to num_thread_limit_loc.
3754
632f2871
RS
37552014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
3756
3757 * c-array-notation.c (expand_array_notations): Use void_node
3758 instead of void_zero_node.
3759
766090c2
TS
37602014-05-17 Trevor Saunders <tsaunders@mozilla.com>
3761
3762 * c-decl.c (finish_struct): Adjust.
3763 (finish_enum): Likewise.
3764 (bind): Adjust.
3765 (record_inline_static): Likewise.
3766 (push_scope): Likewise.
3767 (make_label): Likewise.
3768 (lookup_label_for_goto): Likewise.
3769 (finish_struct): Likewise.
3770 (finish_enum): Likewise.
3771 (store_parm_decls): Likewise.
3772 (c_push_function_context): Likewise.
3773 * c-lang.h: Remove usage of variable_size gty attribute.
3774 * c-parser.c (c_parse_init): Adjust.
3775 (c_parse_file): Likewise.
3776
2b107f6b
MP
37772014-05-13 Marek Polacek <polacek@redhat.com>
3778
3779 PR c/61162
3780 * c-typeck.c (convert_for_assignment): Pass location to
3781 WARN_FOR_ASSIGNMENT instead of input_location.
3782
d033409e
MP
37832014-05-10 Marek Polacek <polacek@redhat.com>
3784
3785 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
3786 maybe_warn_string_init.
3787 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
3788 maybe_warn_string_init.
3789 * c-tree.h (maybe_warn_string_init): Update declaration.
3790 * c-typeck.c (maybe_warn_string_init): Add location parameter.
3791 Call pedwarn_init with loc instead of with input_location.
3792 (digest_init): Pass init_loc to maybe_warn_string_init.
3793 (pop_init_level): Call pedwarn_init with loc instead of with
3794 input_location.
3795 (set_init_index): Likewise.
3796 (process_init_element): Likewise.
3797
ea58ef42
MP
37982014-05-09 Marek Polacek <polacek@redhat.com>
3799
3800 PR c/61096
3801 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
3802 (c_parser_initelt): Pass location to set_init_label. Pass array index
3803 location to set_init_index.
3804 * c-tree.h (push_init_level): Update declaration.
3805 (pop_init_level): Likewise.
3806 (set_init_index): Likewise.
3807 (set_init_label): Likewise.
3808 * c-typeck.c (error_init): Add location parameter. Call error_at
3809 instead of error.
3810 (digest_init): Pass init_loc to error_init.
3811 (really_start_incremental_init):
3812 (push_init_level): Add location parameter. Pass loc to pop_init_level
3813 and error_init.
3814 (pop_init_level): Likewise.
3815 (set_designator): Add location parameter. Pass loc to pop_init_level,
3816 push_init_level, and error_init.
3817 (set_init_index): Add location parameter. Pass loc to error_init and
3818 set_designator.
3819 (set_init_label): Likewise.
3820 (output_init_element): Pass loc to error_init.
3821 (process_init_element): Pass loc to error_init, pop_init_level,
3822 pedwarn_init, and push_init_level.
3823
661a0813
MP
38242014-05-09 Marek Polacek <polacek@redhat.com>
3825
3826 PR c/50459
3827 * c-parser.c (c_parser_attributes): Parse the arguments as an
3828 expression-list if the attribute takes identifier.
3829
2793eeab
MP
38302014-05-08 Marek Polacek <polacek@redhat.com>
3831
3832 PR c/61053
3833 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
3834 TYPE_ALIGN_UNIT.
3835
f827930a
MP
38362014-05-08 Marek Polacek <polacek@redhat.com>
3837
3838 PR c/61077
3839 * c-decl.c (start_function): Warn for _Atomic-qualified return type
3840 of main.
3841
1d60af08
KZ
38422014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
3843 Mike Stump <mikestump@comcast.net>
3844 Richard Sandiford <rdsandiford@googlemail.com>
3845
3846 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
3847 (finish_enum): Use wide-int interfaces.
3848 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
3849 * c-typeck.c (build_c_cast): Likewise.
3850 (set_nonincremental_init_from_string): Likewise.
3851 (c_tree_equal): Likewise.
3852
a0e24419
MP
38532014-05-02 Marek Polacek <polacek@redhat.com>
3854
3855 PR c/25801
3856 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
3857 Return size_one_node when the type is not complete.
3858 (pointer_diff): Remove comment.
3859 (build_unary_op): Improve error messages.
3860
19fc9faa
MP
38612014-05-02 Marek Polacek <polacek@redhat.com>
3862
3863 * c-typeck.c (c_finish_return): Separate warning_at calls.
3864
63bc4e87
MP
38652014-05-02 Marek Polacek <polacek@redhat.com>
3866
3867 * c-tree.h (error_init): Remove declaration.
3868 (pedwarn_init): Likewise.
3869 * c-typeck.c (error_init): Make static and move above.
3870 (pedwarn_init): Likewise.
3871 (warning_init): Move above.
3872 (maybe_warn_string_init): Likewise.
3873
4bd2511b
JL
38742014-05-01 Jeff Law <law@redhat.com>
3875
3876 Revert:
3877
3878 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3879 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
3880 avoid goto.
3881
6a358dcb
MP
38822014-05-02 Marek Polacek <polacek@redhat.com>
3883
3884 PR c/60784
3885 * c-typeck.c (push_init_level): Set constructor_designated to
3886 p->designated for structures.
3887
ae5ebda4
MP
38882014-05-01 Marek Polacek <polacek@redhat.com>
3889
3890 PR c/60915
3891 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
3892 function-definition has an attribute after the declarator.
3893
96b40f8d
MP
38942014-05-01 Marek Polacek <polacek@redhat.com>
3895
3896 PR c/60257
3897 * c-typeck.c (warning_init): Add location_t parameter. Call
3898 warning_at instead of warning.
3899 (push_init_level): Pass input_location to warning_init.
3900 (add_pending_init): Add location_t parameter. Pass loc to
3901 warning_init.
3902 (set_nonincremental_init): Pass input_location to add_pending_init.
3903 (set_nonincremental_init_from_string): Likewise.
3904 (output_init_element): Pass loc to warning_init and to
3905 add_pending_init.
3906
32e00768
MP
39072014-05-01 Marek Polacek <polacek@redhat.com>
3908
3909 PR c/43395
3910 * c-typeck.c (c_finish_return): Distinguish between label and variable
3911 when warning about returning local address.
3912
c9379ce2
MP
39132014-05-01 Marek Polacek <polacek@redhat.com>
3914
3915 PR c/29467
3916 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
3917 in C89 mode.
3918
d00887e8
MP
39192014-05-01 Marek Polacek <polacek@redhat.com>
3920
3921 PR c/43245
3922 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
3923 instead of 0 to WARN_FOR_QUALIFIERS.
3924
5436fa2e
MP
39252014-05-01 Marek Polacek <polacek@redhat.com>
3926
3927 PR c/56989
3928 * c-typeck.c (default_conversion): Use better location for
3929 error call.
3930
f8ed5150
MP
39312014-04-30 Marek Polacek <polacek@redhat.com>
3932
3933 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
3934 also when SANITIZE_FLOAT_DIVIDE is on.
3935
8337d1db
MP
39362014-04-30 Marek Polacek <polacek@redhat.com>
3937
3938 PR c/60139
3939 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
3940 and pedwarn_init. Use loc insted of input_location.
3941
c4bdc42f
MP
39422014-04-30 Marek Polacek <polacek@redhat.com>
3943
3944 PR c/60351
3945 * c-typeck.c (build_binary_op): Use location when warning about
3946 shift count.
3947
45484dcf
MP
39482014-04-25 Marek Polacek <polacek@redhat.com>
3949
3950 PR c/18079
3951 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
3952 always_inline/noinline and hot/cold attributes.
3953
34cf811f
MP
39542014-04-25 Marek Polacek <polacek@redhat.com>
3955
3956 PR c/60114
3957 * c-parser.c (c_parser_initelt): Pass input_location to
3958 process_init_element.
3959 (c_parser_initval): Pass loc to process_init_element.
3960 * c-tree.h (process_init_element): Adjust declaration.
3961 * c-typeck.c (push_init_level): Pass input_location to
3962 process_init_element.
3963 (pop_init_level): Likewise.
3964 (set_designator): Likewise.
3965 (output_init_element): Add location_t parameter. Pass loc to
3966 digest_init.
3967 (output_pending_init_elements): Pass input_location to
3968 output_init_element.
3969 (process_init_element): Add location_t parameter. Pass loc to
3970 output_init_element.
3971
42056eac
JJ
39722014-04-24 Jakub Jelinek <jakub@redhat.com>
3973
3974 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
3975 atomic-clause, allow comma in between atomic-clause and
3976 seq_cst.
3977
e162a134
JJ
39782014-04-22 Jakub Jelinek <jakub@redhat.com>
3979
3980 PR c/59073
3981 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
3982 fails, don't set OM_PARALLEL_COMBINED and return NULL.
3983
2f6babac
IZ
39842014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
3985
3986 PR middle-end/60469
3987 * c-array-notation.c (fix_builtin_array_notation_fn): Use
3988 create_tmp_var instead build_decl for creating temps.
3989 (build_array_notation_expr): Likewise.
3990 (fix_conditional_array_notations_1): Likewise.
3991 (fix_array_notation_expr): Likewise.
3992 (fix_array_notation_call_expr): Likewise.
3993
8edbfaa6
JJ
39942014-03-28 Jakub Jelinek <jakub@redhat.com>
3995
3996 PR c++/60689
3997 * c-tree.h (c_build_function_call_vec): New prototype.
3998 * c-typeck.c (build_function_call_vec): Don't call
3999 resolve_overloaded_builtin here.
4000 (c_build_function_call_vec): New wrapper function around
4001 build_function_call_vec. Call resolve_overloaded_builtin here.
4002 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
4003 Call c_build_function_call_vec instead of build_function_call_vec.
4004 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
4005 * c-decl.c (finish_decl): Likewise.
4006
7485aeea
MLI
40072014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4008
4009 PR c/55383
4010 * c-typeck.c: Use correct format string in cast-qual warning
4011
b17a8b07
TS
40122014-03-07 Thomas Schwinge <thomas@codesourcery.com>
4013
4014 * c-decl.c (c_decl_attributes): Use
4015 lang_hooks.types.omp_mappable_type.
4016 * c-typeck.c (c_finish_omp_clauses): Likewise.
4017
3af9c5e9
MP
40182014-03-06 Marek Polacek <polacek@redhat.com>
4019
4020 PR c/60197
4021 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
4022 of checking tree code.
4023
1c9f5f33
PK
40242014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4025
4026 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
4027 (c_parser_parameter_declaration): Likewise.
4028
cc28fc7f
MP
40292014-02-19 Marek Polacek <polacek@redhat.com>
4030
4031 PR c/60195
4032 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
4033 Call mark_exp_read on exp.value.
4034 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
4035 TREE_ADDRESSABLE on old instead of val.
4036 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
4037
b581c05c
PK
40382014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
4039
4040 * c-parser.c (c_parser_get_builtin_args): Replace calls to
4041 C_EXPR_APPEND by vec_safe_push.
4042 * c-tree.h (C_EXPR_APPEND): Remove.
4043
81e5eca8
MP
40442014-01-31 Marek Polacek <polacek@redhat.com>
4045
4046 PR c/59963
4047 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
4048 build_function_call_vec.
4049 (build_function_call): Likewise.
4050 (build_atomic_assign): Likewise.
4051 (build_function_call_vec): Add arg_loc parameter. Use it.
4052 (convert_arguments): Likewise.
4053 (convert_for_assignment): Rename rhs_loc to expr_loc.
4054 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
4055 (c_parser_objc_keywordexpr): Likewise.
4056 (c_parser_postfix_expression_after_primary): Call
4057 build_function_call_vec with expr_loc rather than op_loc.
4058 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
4059 build_function_call_vec.
4060 (c_parser_expr_list): Add locations parameter. Fill it with locations
4061 of function arguments.
4062 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
4063
68fca595
MP
40642014-01-30 Marek Polacek <polacek@redhat.com>
4065
4066 PR c/59940
4067 * c-typeck.c (build_function_call_vec): Use loc parameter.
4068 (convert_arguments): Add location parameter. Use it.
4069 (ep_convert_and_check): Likewise.
4070 (build_atomic_assign): Adjust convert_for_assignment call.
4071 (build_modify_expr): Likewise.
4072 (digest_init): Likewise.
4073 (c_finish_return): Likewise.
4074 (build_conditional_expr): Adjust ep_convert_and_check calls.
4075 (convert_for_assignment): Add rhs_loc parameter. Use it.
4076 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
4077 calls.
4078
fa337f3a
RB
40792014-01-30 Richard Biener <rguenther@suse.de>
4080
4081 PR c/59905
4082 * c-typeck.c (build_function_call_vec): Do not replace calls
4083 to a function via an incompatible type with a runtime abort.
4084
b72271b9
BI
40852014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
4086
4087 * c-parser.c (c_parser_declaration_or_fndef): Replaced
4088 flag_enable_cilkplus with flag_cilkplus.
4089 (c_parser_direct_declarator_inner): Likewise.
4090 (c_parser_attribute_any_word): Likewise.
4091 (c_parser_attributes): Likewise.
4092 (c_parser_compound_statement): Likewise.
4093 (c_parser_statement_after_labels): Likewise.
4094 (c_parser_if_statement): Likewise.
4095 (c_parser_switch_statement): Likewise.
4096 (c_parser_do_statement): Likewise.
4097 (c_parser_for_statement): Likewise.
4098 (c_parser_unary_expression): Likewise.
4099 (c_parser_postfix_expression): Likewise.
4100 (c_parser_postfix_expression_after_primary): Likewise.
4101 (c_parser_postfix_expression_after_primary): Likewise.
4102 (c_parser_omp_clause_name): Likewise.
4103 (c_finish_omp_declare_simd): Likewise.
4104 (c_parser_cilk_verify_simd): Likewise.
4105 * c-typeck.c (build_array_ref): Likewise.
4106 (build_function_call_vec): Likewise.
4107 (convert_arguments): Likewise.
4108 (build_compound_expr): Likewise.
4109 (c_finish_return): Likewise.
4110 (c_finish_if_stmt): Likewise.
4111 (c_finish_loop): Likewise.
4112 (build_binary_op): Likewise.
4113
393e8e8b
MP
41142014-01-23 Marek Polacek <polacek@redhat.com>
4115
4116 PR c/59846
4117 * c-typeck.c (parser_build_binary_op): Use location instead of
4118 input_location.
4119 (build_binary_op): Pass location to shorten_compare.
4120
f04dda30
MP
41212014-01-23 Marek Polacek <polacek@redhat.com>
4122
4123 PR c/58346
4124 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
4125 an empty aggregate.
4126
789eadcd
MP
41272014-01-23 Marek Polacek <polacek@redhat.com>
4128
4129 PR c/59871
4130 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
4131 of a comma expression.
4132 (emit_side_effect_warnings): Likewise.
4133
40f14e9f
BI
41342014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
4135
4136 PR c/59825
4137 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
4138 function to use walk_tree and moved a lot of its functionality to
4139 expand_array_notations.
4140 (expand_array_notations): New function.
4141
74558dd9
BI
41422014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
4143
4144 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
4145 attribute an attribute without value.
4146
652fea39
JJ
41472014-01-23 Jakub Jelinek <jakub@redhat.com>
4148
4149 PR middle-end/58809
4150 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
4151 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
4152
f34f1c87
MP
41532014-01-22 Marek Polacek <polacek@redhat.com>
4154
4155 PR c/59891
4156 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
4157 of remove_c_maybe_const_expr on op1 and op2.
4158
241f845a
JJ
41592014-01-15 Jakub Jelinek <jakub@redhat.com>
4160
4161 PR c/58943
4162 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
4163 effects, preevaluate rhs using SAVE_EXPR first.
4164
9a74f20c
BI
41652014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
4166
4167 PR c++/59631
4168 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
4169 statements with if-elseif statements.
4170
96066ce1
MP
41712014-01-06 Marek Polacek <polacek@redhat.com>
4172
4173 PR c/57773
4174 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
4175 defined bit-field types only in ISO C.
4176
23a5b65a
RS
41772014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
4178
4179 Update copyright years
4180
f9030485
RS
41812014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
4182
4183 * c-array-notation.c: Use the standard form for the copyright notice.
4184
41958c28
BI
41852013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
4186
4187 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
4188 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
4189 field in parser is not empty. If not-empty, call the function
4190 c_parser_finish_omp_declare_simd.
4191 (c_parser_cilk_clause_vectorlength): Modified function to be shared
4192 between SIMD-enabled functions and #pragma simd. Added new parameter.
4193 (c_parser_cilk_all_clauses): Modified the usage of the function
4194 c_parser_cilk_clause_vectorlength as mentioned above.
4195 (c_parser_cilk_simd_fn_vector_attrs): New function.
4196 (c_finish_cilk_simd_fn_tokens): Likewise.
4197 (is_cilkplus_vector_p): Likewise.
4198 (c_parser_omp_clause_name): Added checking for "vectorlength,"
4199 "nomask," and "mask" strings in clause name.
4200 (c_parser_omp_all_clauses): Added 3 new case statements:
4201 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
4202 PRAGMA_CILK_CLAUSE_NOMASK.
4203 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
4204 check for vector attribute and if so call the function
4205 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
4206 called the function c_finish_cilk_simd_fn_tokens.
4207 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
4208 parser field is non-empty. If so, parse them as you would parse
4209 the omp declare simd pragma.
4210 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
4211 Added a check when step is a parameter and flag it as error.
4212 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
4213 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
4214 pragma_omp_clause.
4215
cef0fd0e
TS
42162013-12-17 Thomas Schwinge <thomas@codesourcery.com>
4217
4218 * c-parser.c (c_parser_omp_parallel): Fix description.
4219
12893402
BI
42202013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
4221
4222 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
4223 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
4224 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
4225 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
4226
296674db
JM
42272013-12-04 Joseph Myers <joseph@codesourcery.com>
4228
4229 PR c/52023
4230 * c-parser.c (c_parser_alignas_specifier): Use
4231 c_sizeof_or_alignof_type instead of c_alignof.
4232 (c_parser_alignof_expression): Likewise, with min_alignof
4233 parameter depending on alignof spelling used.
4234
edd28054
MP
42352013-12-04 Marek Polacek <polacek@redhat.com>
4236
4237 PR c/54113
4238 * c-decl.c (start_function): Don't warn for missing prototype for
4239 inline functions.
4240
da0fc454
MP
42412013-12-03 Marek Polacek <polacek@redhat.com>
4242
4243 PR c/59351
4244 * c-decl.c (build_compound_literal): Allow compound literals with
4245 empty initial value.
4246
4c2ecab0
JM
42472013-12-02 Joseph Myers <joseph@codesourcery.com>
4248
4249 PR c/58235
4250 * c-typeck.c (build_modify_expr): Diagnose assignment to
4251 expression with array type.
4252
340baef7
JM
42532013-11-29 Joseph Myers <joseph@codesourcery.com>
4254
4255 PR c/42262
4256 * c-typeck.c (process_init_element): Do not treat a string as
4257 initializing a whole array when used with a designator for an
4258 individual element.
4259
6763b9f7
JM
42602013-11-29 Joseph Myers <joseph@codesourcery.com>
4261
4262 PR c/57574
4263 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
4264 an inline function following a static declaration.
4265
e7bd1de1
JJ
42662013-11-28 Jakub Jelinek <jakub@redhat.com>
4267
4268 PR c/59310
4269 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
4270 to p_name before calling c_parser_omp_teams instead of after.
4271 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
4272 argument. Remove unused p_name variable.
4273
0136f8f0
AH
42742013-11-27 Aldy Hernandez <aldyh@redhat.com>
4275 Jakub Jelinek <jakub@redhat.com>
4276
4277 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
4278 external_scope is NULL.
4279
241b71bb
TV
42802013-11-27 Tom de Vries <tom@codesourcery.com>
4281 Marc Glisse <marc.glisse@inria.fr>
4282
4283 PR c++/59032
4284 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
4285
2fb9a547
AM
42862013-11-22 Andrew MacLeod <amacleod@redhat.com>
4287
4288 * c-typeck.c: Add required include files from gimple.h.
4289
8400e75e
DM
42902013-11-22 David Malcolm <dmalcolm@redhat.com>
4291
4292 * c-decl.c (define_label, shadow_tag_warned)
4293 (check_bitfield_type_and_width, grokdeclarator, grokparms,
4294 store_parm_decls_newstyle, store_parm_decls_oldstyle)
4295 (declspecs_add_type): Remove use of in_system_header macro.
4296 * c-parser.c (c_parser_unary_expression): Likewise.
4297 * c-typeck.c (store_init_value, process_init_element)
4298 (c_start_case): Likewise.
4299
4300 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
4301 macro.
4302
4303 * c-parser.c (c_parser_set_source_position_from_token): Remove
4304 reference to in_system_header from comment.
4305
386b1f1f
RS
43062013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4307
4308 * c-decl.c (grokdeclarator): Update comment to refer to
4309 tree_to_[su]hwi rather than tree_low_cst.
4310
ae7e9ddd
RS
43112013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4312
4313 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
4314 tree_to_uhwi throughout.
4315
9439e9a1
RS
43162013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4317
4318 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
4319 throughout.
4320
9541ffee
RS
43212013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4322
4323 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
4324 throughout.
4325
c02065fc
AH
43262013-11-15 Aldy Hernandez <aldyh@redhat.com>
4327
4328 * c-parser.c (c_parser_cilk_simd): New.
4329 (c_parser_cilk_verify_simd): New.
4330 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
4331 (c_parser_omp_for_loop): Add case for NE_EXPR.
4332 Set c_break_label for CILK_SIMD.
4333 (c_parser_cilk_clause_vectorlength): New.
4334 (c_parser_cilk_clause_linear): New.
4335 (c_parser_cilk_clause_name): New.
4336 (c_parser_cilk_all_clauses): New.
4337 * c-typeck.c (build_unary_op): Pass location argument to
4338 readonly_error.
4339 (build_modify_expr): Same.
4340 (build_asm_expr): Same.
4341 (c_finish_bc_stmt): Error on break/continue in loops.
4342
18f429e2
AM
43432013-11-14 Andrew MacLeod <amacleod@redhat.com>
4344
4345 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
4346
d8a2d370
DN
43472013-11-14 Diego Novillo <dnovillo@google.com>
4348
4349 * c-decl.c: Include print-tree.h.
4350 Include stor-layout.h.
4351 Include varasm.h.
4352 Include attribs.h.
4353 Include stringpool.h.
4354 * c-lang.c: Include fold-const.h.
4355 * c-parser.c: Include stringpool.h.
4356 Include attribs.h.
4357 Include stor-layout.h.
4358 Include varasm.h.
4359 Include trans-mem.h.
4360 * c-typeck.c: Include stor-layout.h.
4361 Include trans-mem.h.
4362 Include varasm.h.
4363 Include stmt.h.
4364
38b7bc7f
JM
43652013-11-13 Joseph Myers <joseph@codesourcery.com>
4366
4367 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
4368 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
4369 __auto_type.
4370 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
4371 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
4372 RID_AUTO_TYPE.
4373 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
4374 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
4375 (c_parser_declarator, c_parser_direct_declarator_inner)
4376 (c_parser_parameter_declaration, c_parser_type_name): All callers
4377 changed.
4378 (c_parser_declaration_or_fndef): Handle declarations with type
4379 determined from the initializer.
4380
45b0be94
AM
43812013-11-12 Andrew MacLeod <amacleod@redhat.com>
4382
18f429e2 4383 * c-typeck.c: Include gimplify.h.
45b0be94 4384
582d9b50
JM
43852013-11-12 Joseph Myers <joseph@codesourcery.com>
4386
4387 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
4388 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
4389 comment.
4390 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
4391 or _Thread_local as appropriate in diagnostics.
4392 (build_null_declspecs): Initialize ret->thread_gnu_p.
4393 (declspecs_add_scspec): Handle either __thread or _Thread_local
4394 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
4395 pedantic. Do not disallow _Thread_local extern and _Thread_local
4396 static.
4397
267bac10
JM
43982013-11-07 Joseph Myers <joseph@codesourcery.com>
4399 Andrew MacLeod <amacleod@redhat.com>
4400
4401 * c-aux-info.c (gen_type): Handle atomic qualifier.
4402 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
4403 qualifiers when compating types.
4404 (shadow_tag_warned): Handle atomic_p in declspecs.
4405 (quals_from_declspecs): Likewise.
4406 (start_decl): Use c_type_promotes_to when promoting argument
4407 types.
4408 (grokdeclarator): Handle _Atomic.
4409 (get_parm_info): Diagnose any qualifier on "void" as only
4410 parameter.
4411 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
4412 comparing types. Use c_type_promotes_to when promoting argument
4413 types.
4414 (finish_function): Use c_type_promotes_to when promoting argument
4415 types.
4416 (build_null_declspecs): Handle atomic_p in declspecs.
4417 (declspecs_add_qual): Handle RID_ATOMIC.
4418 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
4419 (c_token_starts_declspecs): Handle RID_ATOMIC.
4420 (c_parser_declspecs): Handle atomic type specifiers and
4421 qualifiers.
4422 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
4423 from types of expressions with atomic type.
4424 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
4425 (c_parser_attribute_any_word): Handle RID_ATOMIC.
4426 (c_parser_initializer, c_parser_initelt, c_parser_initval)
4427 (c_parser_statement_after_labels, c_parser_switch_statement)
4428 (c_parser_for_statement, c_parser_expr_no_commas)
4429 (c_parser_conditional_expression, c_parser_binary_expression)
4430 (c_parser_cast_expression, c_parser_unary_expression)
4431 (c_parser_postfix_expression)
4432 (c_parser_postfix_expression_after_primary, c_parser_expression):
4433 Use convert_lvalue_to_rvalue.
4434 (c_parser_expression_conv, c_parser_expr_list): Document
4435 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
4436 (c_parser_objc_synchronized_statement): Use
4437 convert_lvalue_to_rvalue.
4438 (c_parser_objc_selector): Handle RID_ATOMIC.
4439 (c_parser_objc_receiver, c_parser_array_notation): Use
4440 convert_lvalue_to_rvalue.
4441 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
4442 _Atomic (type-name).
4443 (struct c_declspecs): Add atomic_p field.
4444 (convert_lvalue_to_rvalue): Declare.
4445 * c-typeck.c (c_type_promotes_to): Promote atomic types to
4446 corresponding atomic types.
4447 (qualify_type): Don't add _Atomic qualifiers from second argument.
4448 (comp_target_types): Do not allow _Atomic mismatches.
4449 (type_lists_compatible_p): Do not remove atomic qualifiers when
4450 comparing types.
4451 (really_atomic_lvalue, convert_lvalue_to_rvalue)
4452 (build_atomic_assign): New functions.
4453 (build_unary_op): Use build_atomic_assign for atomic increment and
4454 decrement.
4455 (build_conditional_expr): Do not treat _Atomic void as a qualified
4456 version of void.
4457 (build_modify_expr): Use build_atomic_assign for atomic LHS.
4458 (find_anonymous_field_with_type, convert_to_anonymous_field)
4459 (convert_for_assignment): Do not remove atomic qualifiers when
4460 comparing types.
4461 (digest_init): Do not accept initialization of arrays of atomic
4462 elements by string constants.
4463 (build_asm_expr): Use convert_lvalue_to_rvalue.
4464 (build_binary_op): Do not treat _Atomic void as a qualified
4465 version of void.
4466
0c249d4b
DD
44672013-11-06 DJ Delorie <dj@redhat.com>
4468
4469 * c-decl.c (locate_old_decl): If a previous conflicting decl is
4470 both explicit and builtin, print the location of the explicit one.
4471
6d7f7e0a
TB
44722013-11-05 Tobias Burnus <burnus@net-b.de>
4473
4474 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
4475 c_parser_omp_distribute, c_parser_omp_teams,
4476 c_parser_omp_target, c_parser_omp_declare): Handle
4477 -fopenmp-simd.
4478
b906f4ca
MP
44792013-11-03 Marek Polacek <polacek@redhat.com>
4480
4481 * c-decl.c (grokdeclarator): Add VLA instrumentation.
4482
ee1d5a02
JJ
44832013-11-01 Jakub Jelinek <jakub@redhat.com>
4484
4485 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
4486 check_dup_generic at the end, unless remove is true.
4487 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
4488 remove = true;.
4489 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
4490
5a9785fb
JJ
44912013-10-31 Jakub Jelinek <jakub@redhat.com>
4492
4493 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
4494 with decl that is not pointer nor array.
4495
939b37da
BI
44962013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
4497
4498 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
4499 a spawning function is found.
4500 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
4501 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
4502 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
4503 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
4504 case.
4505 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
4506 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
4507 expr.
4508 (c_finish_return): Added a check to reject _Cilk_spawn in return
4509 expression.
4510 (build_cilk_spawn): New function.
4511 (build_cilk_sync): Likewise.
4512 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
4513
d4af74d4
TB
45142013-10-27 Tobias Burnus <burnus@net-b.de>
4515
4516 PR other/33426
4517 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
4518 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
4519 (c_parser_statement_after_labels): Update calls.
4520
d73749df 45212013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
4522
4523 PR other/33426
4524 * c-parser.c (c_parser_pragma, c_parser_for_statement):
4525 Handle PRAGMA_IVDEP.
4526 (c_parser_statement_after_labels): Update call.
4527
f28aa681
MP
45282013-10-24 Marek Polacek <polacek@redhat.com>
4529
4530 * c-parser.c (c_parser_struct_declaration): Add a comment.
4531 (c_parser_declarator): Don't allow _Alignas here.
4532
0645c1a2
AM
45332013-10-17 Andrew MacLeod <amacleod@redhat.com>
4534
4535 * c-parser.c: Include omp-low.h.
4536 * c-typeck.c: Likewise.
4537
568a31f2
MP
45382013-10-17 Marek Polacek <polacek@redhat.com>
4539
4540 PR c/58267
4541 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
4542 Document syntax of the array-declarator.
4543 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
4544 are not permitted.
4545 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
4546 (c_parser_struct_declaration): Likewise.
4547 (c_parser_declarator): Likewise.
4548 (c_parser_direct_declarator_inner): Likewise.
4549 (c_parser_parameter_declaration): Likewise.
4550 (c_parser_type_name): Likewise.
4551
acf0174b
JJ
45522013-10-11 Jakub Jelinek <jakub@redhat.com>
4553
4554 * c-lang.h (current_omp_declare_target_attribute): New extern
4555 decl.
4556 * c-parser.c: Include c-lang.h.
4557 (struct c_parser): Change tokens to c_token *.
4558 Add tokens_buf field. Change tokens_avail type to unsigned int.
4559 (c_parser_consume_token): If parser->tokens isn't
4560 &parser->tokens_buf[0], increment parser->tokens.
4561 (c_parser_consume_pragma): Likewise.
4562 (enum pragma_context): Add pragma_struct and pragma_param.
4563 (c_parser_external_declaration): Adjust
4564 c_parser_declaration_or_fndef caller.
4565 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
4566 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
4567 Adjust recursive call.
4568 (c_parser_struct_or_union_specifier): Use pragma_struct instead
4569 of pragma_external.
4570 (c_parser_parameter_declaration): Use pragma_param instead of
4571 pragma_external.
4572 (c_parser_compound_statement_nostart, c_parser_label,
4573 c_parser_for_statement): Adjust
4574 c_parser_declaration_or_fndef callers.
4575 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
4576 it through to c_parser_conditional_expression.
4577 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
4578 pass it through to c_parser_binary_expression. Adjust recursive
4579 call.
4580 (c_parser_binary_expression): Remove prec argument, add
4581 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
4582 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
4583 binop matches it, use build2 instead of parser_build_binary_op.
4584 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
4585 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
4586 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
4587 Handle pragma_struct and pragma_param the same as pragma_external.
4588 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
4589 (c_parser_omp_variable_list): Parse array sections for
4590 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
4591 (c_parser_omp_clause_collapse): Fully fold collapse expression.
4592 (c_parser_omp_clause_reduction): Handle user defined reductions.
4593 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
4594 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
4595 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
4596 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
4597 c_parser_omp_clause_depend, c_parser_omp_clause_map,
4598 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
4599 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
4600 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
4601 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
4602 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
4603 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
4604 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
4605 (c_parser_omp_for_loop): Add CODE argument, pass it through
4606 to c_finish_omp_for. Change last argument to cclauses,
4607 and adjust uses to grab parallel clauses from the array of all
4608 the split clauses. Adjust c_parser_binary_expression,
4609 c_parser_declaration_or_fndef and c_finish_omp_for callers.
4610 (omp_split_clauses): New function.
4611 (c_parser_omp_simd): New function.
4612 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
4613 Allow the function to be called also when parsing combined constructs,
4614 and call c_parser_omp_simd when parsing for simd.
4615 (c_parser_omp_sections_scope): If section-sequence doesn't start with
4616 #pragma omp section, require exactly one structured-block instead of
4617 sequence of statements.
4618 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
4619 Allow the function to be called also when parsing combined constructs.
4620 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
4621 Allow the function to be called also when parsing combined
4622 constructs.
4623 (c_parser_omp_taskgroup, c_parser_omp_cancel,
4624 c_parser_omp_cancellation_point, c_parser_omp_distribute,
4625 c_parser_omp_teams, c_parser_omp_target_data,
4626 c_parser_omp_target_update, c_parser_omp_target,
4627 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
4628 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
4629 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
4630 (c_parser_omp_construct): Add p_name and mask vars. Handle
4631 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
4632 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
4633 and c_parser_omp_sections callers.
4634 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
4635 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
4636 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
4637 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
4638 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
4639 OMP_CLAUSE_DEPEND.
4640 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
4641 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
4642 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
4643 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
4644 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
4645 * c-typeck.c: Include tree-inline.h.
4646 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
4647 handle_omp_array_sections_1, handle_omp_array_sections,
4648 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
4649 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
4650 user defined reductions.
4651 (c_tree_equal): New function.
4652 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
4653 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
4654 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
4655 c_check_omp_declare_reduction_r): New prototypes.
4656 * c-decl.c (current_omp_declare_target_attribute): New variable.
4657 (c_decl_attributes): New function.
4658 (start_decl, start_function): Use it instead of decl_attributes.
4659 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
4660 c_omp_reduction_decl, c_omp_reduction_lookup,
4661 c_check_omp_declare_reduction_r): New functions.
4662
0a6c2227
TT
46632013-09-25 Tom Tromey <tromey@redhat.com>
4664
4665 * Make-lang.in (c/gccspec.o): Remove.
4666 (CFLAGS-c/gccspec.o): New variable.
4667 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
4668 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
4669 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
4670
f3bc55f0
TT
46712013-09-25 Tom Tromey <tromey@redhat.com>
4672
4673 * Make-lang.in (c/gccspec.o): Don't use subshell.
4674
a24d975c
MP
46752013-09-18 Marek Polacek <polacek@redhat.com>
4676
4677 PR sanitize/58443
4678 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
4679 Remove unnecessary check.
4680
ce6923c5
MP
46812013-09-18 Marek Polacek <polacek@redhat.com>
4682
4683 PR sanitizer/58411
4684 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
4685 no_sanitize_undefined attribute.
4686
a1e51df9
KT
46872013-09-13 Kai Tietz <ktietz@redhat.com>
4688
4689 PR target/57848
4690 * c-decl.c (c_builtin_function_ext_scope): Remove
4691 wrong assumption that it is never called on prexisting
4692 symbol.
4693
0af94e6f
JR
46942013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
4695
4696 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
4697
20059c8b
GDR
46982013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
4699
4700 * c-objc-common.c (c_tree_printer): Tidy.
4701
de5a5fa1
MP
47022013-08-30 Marek Polacek <polacek@redhat.com>
4703
4704 * c-typeck.c (build_binary_op): Add division by zero and shift
4705 instrumentation.
4706
2531a1d9 47072013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 4708 Joseph Myers <joseph@codesourcery.com>
2531a1d9 4709
6e2bcc98 4710 PR c/35649
2531a1d9
JR
4711 * c-typeck.c (c_common_type): Prefer double_type_node over
4712 other REAL_TYPE types with the same precision.
4713 (convert_arguments): Likewise.
4714
025311c4
GDR
47152013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
4716
4717 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
4718 (c_initialize_diagnostics): Call a destructor for the early printer.
4719
da6ca2b5
GDR
47202013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
4721
4722 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
4723 printer initialization.
4724
318cda85 47252013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 4726
318cda85
BI
4727 PR c/57490
4728 * c-array-notation.c (fix_conditional_array_notations_1): Added a
4729 check for truth values.
4730 (expand_array_notation_exprs): Added truth values case. Removed an
4731 unwanted else. Added for-loop to walk through subtrees in default
4732 case.
4733
b066401f
GDR
47342013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
4735
4736 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
4737
fb48aadc
JM
47382013-07-23 Joseph Myers <joseph@codesourcery.com>
4739
4740 * c-parser.c (struct c_generic_association): Fix typo.
4741
433cc7b0
TT
47422013-07-23 Tom Tromey <tromey@redhat.com>
4743 Joseph Myers <joseph@codesourcery.com>
4744
4745 * c-parser.c (struct c_generic_association): New.
4746 (c_generic_association_d): New typedef.
4747 (c_parser_generic_selection): New function.
4748 (c_parser_postfix_expression): Handle RID_GENERIC.
4749
26d40c3d
JM
47502013-07-13 Jason Merrill <jason@redhat.com>
4751
4752 PR c++/57793
4753 * c-decl.c (finish_struct): Check for too-large class.
4754
ecdbd01a 47552013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
4756
4757 PR c/57821
4758 * c-typeck.c (set_init_index): When folding, check for index overflow.
4759
1141ed3f
BI
47602013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
4761
4762 * c-parser.c (c_parser_array_notation): Removed rejection of array
4763 notations in an array of function pointers.
4764
713b46fa
BI
47652013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
4766
4767 * c-array-notation.c (make_triplet_val_inv): New function.
4768 (create_cmp_incr): Likewise.
4769 (create_array_refs): Likewise.
4770 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
4771 Also modularized common parts between functions and called the function.
4772 (build_array_notation_expr): Likewise.
4773 (fix_conditional_array_notations_1): Likewise.
4774 (fix_array_notation_expr): Likewise.
4775 (fix_array_notation_call_expr): Likewise.
4776
92f20202
MP
47772013-06-18 Marek Polacek <polacek@redhat.com>
4778
4779 PR c/57630
4780 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
4781
73a23b06
BI
47822013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
4783
4784 * c-array-notation.c (build_array_notation_expr): Reject array notation
4785 mismatch between LHS and RHS even inside a call_expr. Also, removed
4786 a couple while statements that were dead code.
4787
00b8517d
BI
47882013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
4789
4790 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
4791 excessive precision expressions in function parameters. Also removed
4792 couple unwanted while statements.
4793
1509bdda
BI
47942013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
4795
4796 * c-array-notation.c (expand_array_notation_exprs): Added
4797 ARRAY_NOTATION_REF case.
4798
d60f1706
BI
47992013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
4800
4801 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
4802 function to c-family/array-notation-common.c.
4803 (is_cilkplus_reduce_builtin): Likewise.
4804 (find_rank): Likewise.
4805 (extract_array_notation_exprs): Likewise.
4806 (replace_array_notations): Likewise.
4807 (find_inv_trees): Likewise.
4808 (replace_inv_trees): Likewise.
4809 (contains_array_notation_expr): Likewise.
4810 (find_correct_array_notation_type): Likewise.
4811 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
4812 (struct inv_list): Moved this to c-family/array-notation-common.c.
4813 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
4814
6d6efbb3
BI
48152013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
4816
4817 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
4818 reduction functions outside the for-loop. Added a check if the fundecl
4819 is non-NULL. Finally, removed an unwanted if-statement, and made the
4820 body unconditional.
4821
25c22937
BI
48222013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
4823
4824 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
4825 condition of the if-statement matches the rank of else-block and then-
4826 block when array notations are used.
4827 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
4828 expression after the entire function body is parsed.
4829 (c_parser_expr_no_commas): Delayed creating array notation expressions
4830 to the end of function parsing.
4831 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
4832 whole if-statement instead of just the condition.
4833 (expand_array_notation_exprs): Added MODIFY_EXPR case.
4834
edd25645
BI
48352013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
4836
4837 PR c/57474
4838 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
4839 array to NULL_TREE if they are unused. Also added a check for the
4840 field to be NULL before its fields are used in future.
4841
065ce7f1
RO
48422013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4843
4844 PR bootstrap/57450
4845 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
4846 (build_array_notation_expr): Likewise.
4847
36536d79
BI
48482013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
4849
4850 * c-typeck.c (build_array_ref): Added a check to see if array's
4851 index is greater than one. If true, then emit an error.
4852 (build_function_call_vec): Exclude error reporting and checking
4853 for builtin array-notation functions.
4854 (convert_arguments): Likewise.
4855 (c_finish_return): Added a check for array notations as a return
4856 expression. If true, then emit an error.
4857 (c_finish_loop): Added a check for array notations in a loop
4858 condition. If true then emit an error.
4859 (lvalue_p): Added a ARRAY_NOTATION_REF case.
4860 (build_binary_op): Added a check for array notation expr inside
4861 op1 and op0. If present, we call another function to find correct
4862 type.
4863 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
4864 * c-parser.c (c_parser_compound_statement): Check if array
4865 notation code is used in tree, if so, then transform them into
4866 appropriate C code.
4867 (c_parser_expr_no_commas): Check if array notation is used in LHS
4868 or RHS, if so, then build array notation expression instead of
4869 regular modify.
4870 (c_parser_postfix_expression_after_primary): Added a check for
4871 colon(s) after square braces, if so then handle it like an array
4872 notation. Also, break up array notations in unary op if found.
4873 (c_parser_direct_declarator_inner): Added a check for array
4874 notation.
4875 (c_parser_compound_statement): Added a check for array notation in
4876 a stmt. If one is present, then expand array notation expr.
4877 (c_parser_if_statement): Likewise.
4878 (c_parser_switch_statement): Added a check for array notations in
4879 a switch statement's condition. If true, then output an error.
4880 (c_parser_while_statement): Similarly, but for a while.
4881 (c_parser_do_statement): Similarly, but for a do-while.
4882 (c_parser_for_statement): Similarly, but for a for-loop.
4883 (c_parser_unary_expression): Check if array notation is used in a
4884 pre-increment or pre-decrement expression. If true, then expand
4885 them.
4886 (c_parser_array_notation): New function.
4887 * c-array-notation.c: New file.
4888 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
4889
cd192ccc
MS
48902013-05-23 Mike Stump <mikestump@comcast.net>
4891
4892 * c-typeck.c (convert_for_assignment): Handle references to memory
4893 spaces better.
4894
427b248d
JM
48952013-05-16 Jason Merrill <jason@redhat.com>
4896
4897 * Make-lang.in (cc1$(exeext)): Use link mutex.
4898
44d90fe1
PC
48992013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
4900
4901 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
4902 to simply use OPT_Wpointer_arith.
4903 (build_unary_op): Likewise.
4904
4e7d7b3d
JJ
49052013-04-03 Jakub Jelinek <jakub@redhat.com>
4906
4907 PR c/19449
4908 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
4909 argument. If set, or it temporarily for parsing of the first
4910 argument into force_folding_builtin_constant_p.
4911 (c_parser_postfix_expression): Adjust callers.
4912
839b422f
RB
49132013-03-21 Richard Biener <rguenther@suse.de>
4914
4915 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
4916 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
4917
2ee028f1
MP
49182013-02-12 Marek Polacek <polacek@redhat.com>
4919
4920 PR c/44938
4921 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
4922 origtypes to NULL.
4923
8824edff
JJ
49242013-01-24 Jakub Jelinek <jakub@redhat.com>
4925
4926 PR c/56078
4927 * c-typeck.c (set_nonincremental_init_from_string): If
4928 constructor_max_index is NULL, treat it as if tree_int_cst_lt
4929 returned false.
4930 (process_init_element): Likewise.
4931
eadd3d0d
JJ
49322012-12-20 Jakub Jelinek <jakub@redhat.com>
4933
4934 PR c++/55619
4935 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
4936 argument, don't call default_function_array_conversion
4937 nor c_fully_fold here.
4938 (c_parser_asm_statement): Adjust callers.
4939 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
4940 and outputs here, and call default_function_array_conversion
4941 on inputs that don't need to be addressable.
4942
f8a93a2e
JJ
49432012-12-18 Jakub Jelinek <jakub@redhat.com>
4944
4945 PR c/39464
4946 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
4947 warning require that both c_common_unsigned_type as well as
4948 c_common_signed_type is the same for both mvl and mvr types.
4949
9771b263
DN
49502012-11-16 Diego Novillo <dnovillo@google.com>
4951
4952 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
4953
4954 * c-common.c: Use new vec API in vec.h.
4955 * c-common.h: Likewise.
4956 * c-gimplify.c: Likewise.
4957 * c-pragma.c: Likewise.
4958 * c-pretty-print.c: Likewise.
4959 * c-pretty-print.h: Likewise.
4960 * c-semantics.c: Likewise.
4961 * c-decl.c: Likewise.
4962 * c-parser.c: Likewise.
4963 * c-tree.h: Likewise.
4964 * c-typeck.c: Likewise.
4965
880661a4
JW
49662012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
4967
4968 PR c++/54930
4969 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
4970
077d1abe
MLI
49712012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
4972
4973 PR c/53066
4974 * c-decl.c (warn_if_shadowing): Do not warn if a variable
4975 shadows a function, unless the variable is a function or a
4976 pointer-to-function.
4977
3a785c97
JJ
49782012-10-12 Jakub Jelinek <jakub@redhat.com>
4979
4980 PR c/54381
4981 * c-parser.c (struct c_tree_loc_pair): Removed.
4982 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
4983 add location_t * and tree * arguments, fill in array of 3
4984 sizeof_arg trees and corresponding locs.
4985 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
4986 c_parser_expr_list callers.
4987 (c_parser_postfix_expression_after_primary): Likewise. Pass
4988 array of 3 sizeof_arg trees and locs (corresponding to first
4989 3 arguments) to sizeof_pointer_memaccess_warning.
4990
703c8606
LC
49912012-10-09 Lawrence Crowl <crowl@google.com>
4992
4993 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
4994 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
4995 hash table.
4996
5d9de0d0
PC
49972012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
4998
4999 PR c++/54194
5000 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
5001 call.
5002
a212e43f
MG
50032012-10-09 Marc Glisse <marc.glisse@inria.fr>
5004
5005 PR c++/54427
5006 * c-typeck.c: Include c-common.h.
5007 (enum stv_conv): Moved to c-common.h.
5008 (scalar_to_vector): Moved to c-common.c.
5009 (build_binary_op): Adapt to scalar_to_vector's new prototype.
5010 * Make-lang.in: c-typeck.c depends on c-common.h.
5011
3b78de56
AC
50122012-10-04 Arnaud Charlet <charlet@adacore.com>
5013
5014 * c-decl.c (c_write_global_declarations): Fix handling of
5015 -fdump-ada-spec*.
5016
78c60e3d
SS
50172012-09-30 Sharad Singhai <singhai@google.com>
5018
5019 * c-decl.c (c_write_global_declarations): Use a different method
5020 to determine if the dump has ben initialized.
5021
9f33203d
JM
50222012-09-14 Joseph Myers <joseph@codesourcery.com>
5023
5024 PR c/54552
5025 * c-typeck.c (c_cast_expr): When casting to a type requiring
5026 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
5027 c_fully_fold first.
5028
a27d595d
JM
50292012-09-14 Joseph Myers <joseph@codesourcery.com>
5030
5031 PR c/54103
5032 * c-typeck.c (build_unary_op): Pass original argument of
5033 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
5034 any C_MAYBE_CONST_EXPR, if it has integer operands.
5035 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
5036 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
5037 to c_objc_common_truthvalue_conversion, then remove any
5038 C_MAYBE_CONST_EXPR, if they have integer operands. Use
5039 c_objc_common_truthvalue_conversion not
5040 c_common_truthvalue_conversion.
5041 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
5042 call note_integer_operands for arguments with integer operands
5043 that are not integer constants.
5044
9feb29df
JJ
50452012-09-13 Jakub Jelinek <jakub@redhat.com>
5046
5047 PR c/54559
5048 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
5049 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
5050
d409320c
JJ
50512012-08-31 Jakub Jelinek <jakub@redhat.com>
5052
5053 PR c/54428
5054 * c-convert.c (convert): Don't call fold_convert_loc if
5055 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
5056 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
5057 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
5058
6265d07c
JJ
50592012-08-24 Jakub Jelinek <jakub@redhat.com>
5060
5061 PR c/54355
5062 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
5063 for nested and empty_ok arguments in the call to
5064 c_parser_declaration_or_fndef.
5065
1a4049e7
JJ
50662012-08-17 Jakub Jelinek <jakub@redhat.com>
5067
5068 * c-tree.h (c_last_sizeof_arg): Declare.
5069 * c-parser.c (struct c_tree_loc_pair): New type.
5070 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
5071 non-NULL.
5072 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
5073 (c_parser_postfix_expression_after_primary): Likewise. Call
5074 sizeof_pointer_memaccess_warning if needed.
5075 (sizeof_ptr_memacc_comptypes): New function.
5076 * c-typeck.c (c_last_sizeof_arg): New global variable.
5077 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
5078
0229aee9
UB
50792012-07-24 Uros Bizjak <ubizjak@gmail.com>
5080
5081 * c-lang.h (lang_decl): Add variable_size GTY option.
5082
7ee2468b
SB
50832012-07-16 Steven Bosscher <steven@gcc.gnu.org>
5084
5085 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
5086 * Make-lang.in: Fix dependencies.
5087
d4a10d0a
SB
50882012-06-29 Steven Bosscher <steven@gcc.gnu.org>
5089
5090 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
5091 and add language Makefile hooks.
5092 * config-lang.in: New file.
5093 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
5094 add the required "normal" config-lang.in rules.
5095 * c-lang.h: Moved from gcc/ to here.
5096 * c-tree.h: Likewise.
5097 * c-objc-common.c: Likewise.
5098 * c-objc-common.h: Likewise.
5099 * c-typeck.c: Likewise.
5100 * c-convert.c: Likewise.
5101 * c-lang.c: Likewise.
5102 * c-aux-info.c: Likewise.
5103 * c-errors.c: Likewise.
5104 * gccspec.c: Likewise.
5105 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
5106 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
5107\f
cbe34bb5 5108Copyright (C) 2012-2017 Free Software Foundation, Inc.
d4a10d0a
SB
5109
5110Copying and distribution of this file, with or without modification,
5111are permitted in any medium without royalty provided the copyright
5112notice and this notice are preserved.