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