]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
compiler: remove LHS/RHS context determination for var exprs
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
64a5912c
DM
12017-10-31 David Malcolm <dmalcolm@redhat.com>
2
3 * c-decl.c (implicit_decl_warning): Update for renaming of
4 pedwarn_at_rich_loc and warning_at_rich_loc.
5 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
6 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
7 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
8 (c_parser_struct_or_union_specifier): Likewise for renaming of
9 pedwarn_at_rich_loc.
10 (c_parser_parameter_declaration): Likewise for renaming of
11 error_at_rich_loc.
12 * c-typeck.c (build_component_ref): Likewise.
13 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
14 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
15 (set_init_label): Likewise for renaming of error_at_rich_loc.
16
c1136864
RB
172017-10-30 Richard Biener <rguenther@suse.de>
18
19 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
20 stmts.
21
ee5fd23a
MM
222017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
23
24 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
25 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
26
1a59ccf2
DM
272017-10-25 David Malcolm <dmalcolm@redhat.com>
28
29 PR c/7356
30 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
31 semicolons.
32
bc1a75dd
JJ
332017-10-25 Jakub Jelinek <jakub@redhat.com>
34
35 PR libstdc++/81706
36 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
37 newdecl to corresponding __builtin_ if any.
38
ff1ff960
PC
392017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
40
41 PR c++/82466
42 * c-decl.c (diagnose_mismatched_decls): Use
43 OPT_Wbuiltin_declaration_mismatch.
44
62e1c678
DM
452017-10-12 David Malcolm <dmalcolm@redhat.com>
46
47 * c-parser.c (c_parser_require): Add "type_is_unique" param and
48 use it to guard calls to maybe_suggest_missing_token_insertion.
49 (c_parser_parms_list_declarator): Override default value of new
50 "type_is_unique" param to c_parser_require.
51 (c_parser_asm_statement): Likewise.
52 * c-parser.h (c_parser_require): Add "type_is_unique" param,
53 defaulting to true.
54
a92f6726
NS
552017-10-11 Nathan Sidwell <nathan@acm.org>
56
57 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
58
8e6cdc90
RS
592017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
60
61 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
62 operating on trees as wide_ints.
63 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
64 (c_tree_equal): Likewise.
65
8139a48e
DM
662017-10-04 David Malcolm <dmalcolm@redhat.com>
67
68 * c-decl.c (push_parm_decl): Store c_parm's location into the
69 PARAM_DECL.
70 (build_c_parm): Add "loc" param and store it within the c_parm.
71 * c-parser.c (struct c_parser): Add "last_token_location" field.
72 (c_parser_consume_token): Store location of the token into the
73 new field.
74 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
75 when handling a FUNCTION_DECL, if it doesn't already have them.
76 (c_parser_parameter_declaration): Generate a location for the
77 parameter, and pass it to the call to build_c_parm.
78 * c-tree.h (struct c_parm): Add field "loc".
79 (build_c_parm): Add location_t param.
80 * c-typeck.c (get_fndecl_argument_location): New function.
81 (inform_for_arg): New function.
82 (convert_for_assignment): Use inform_for_arg when dealing with
83 ic_argpass.
84
2a389958
JJ
852017-09-29 Jakub Jelinek <jakub@redhat.com>
86
7d386d45
JJ
87 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
88 width is non-NULL.
89 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
90 don't SET_DECL_C_BIT_FIELD here.
91
2a389958
JJ
92 PR c/82340
93 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
94 instead of trying to set just TREE_READONLY manually.
95
ebc6a85e
TV
962017-09-16 Tom de Vries <tom@codesourcery.com>
97
98 PR c/81875
99 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
100 cond itself.
101
bb75facd
JM
1022017-09-15 Joseph Myers <joseph@codesourcery.com>
103
104 PR c/82071
105 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
106 for C11.
107 (build_conditional_expr): For C11, generate result with excess
108 precision when one argument is an integer and the other is of a
109 type using excess precision.
110
1d933576
BE
1112017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
112
113 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
114
267bbb6f
MP
1152017-09-13 Marek Polacek <polacek@redhat.com>
116
117 PR c/82167
118 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
119 than expr.original_type.
120
6836632e
NS
1212017-09-12 Nathan Sidwell <nathan@acm.org>
122
123 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
124 resort_sorted_fields): Moved from c-family/c-common.c.
125 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
126
e035be33
JM
1272017-09-01 Joseph Myers <joseph@codesourcery.com>
128
129 PR c/82071
130 * c-typeck.c (build_atomic_assign): Handle argument with excess
131 precision. Ensure any EXCESS_PRECISION_EXPR is present in
132 argument passed to build_binary_op and convert_for_assignment but
133 not for call to c_fully_fold.
134 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
135 Ensure build_binary_op is called with argument with original
136 semantic type. Avoid calling c_fully_fold with an
137 EXCESS_PRECISION_EXPR from build_binary_op.
138
d2e05fcb
JJ
1392017-09-01 Jakub Jelinek <jakub@redhat.com>
140
141 PR c/81887
142 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
143
b397965c
RS
1442017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
145 Alan Hayward <alan.hayward@arm.com>
146 David Sherwood <david.sherwood@arm.com>
147
148 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
149 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
150 m1 and m2 to the signed equivalent of a fixed-point
151 SCALAR_TYPE_MODE.
152
14e18d71
DM
1532017-08-24 David Malcolm <dmalcolm@redhat.com>
154
155 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
156 than CAN_HAVE_LOCATION_P when determining whether to use the
157 location_t value within "value".
158
7f204c0f
DM
1592017-08-21 David Malcolm <dmalcolm@redhat.com>
160
161 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
162 rather than peeking the location of the first token.
163 * c-tree.h (c_expr::get_location): New method.
164
2f687306
DM
1652017-08-21 David Malcolm <dmalcolm@redhat.com>
166
167 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
168 to check_function_arguments.
169
3e7b80d7
MP
1702017-08-18 Marek Polacek <polacek@redhat.com>
171
172 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
173 commentary.
174
00aa1fa2
L
1752017-08-18 H.J. Lu <hongjiu.lu@intel.com>
176
177 PR c/53037
178 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
179 (check_bitfield_type_and_width): Don't allow bit-field with
180 warn_if_not_aligned type.
181
da67acb9
MS
1822017-08-14 Martin Sebor <msebor@redhat.com>
183
184 PR c/81117
185 * c-objc-common.c (c_objc_common_init): Handle 'G'.
186
bb85aa74
MP
1872017-08-11 Marek Polacek <polacek@redhat.com>
188
189 PR c/81795
190 * c-decl.c (pushtag): Only print inform if the warning was printed.
191 (grokdeclarator): Likewise.
192
32129a17
DM
1932017-08-10 David Malcolm <dmalcolm@redhat.com>
194
195 * c-parser.c (c_parser_error): Rename to...
196 (c_parser_error_richloc): ...this, making static, and adding
197 "richloc" parameter, passing it to the c_parse_error call,
198 rather than calling c_parser_set_source_position_from_token.
199 (c_parser_error): Reintroduce, reimplementing in terms of the
200 above, converting return type from void to bool.
201 (class token_pair): New class.
202 (struct matching_paren_traits): New struct.
203 (matching_parens): New typedef.
204 (struct matching_brace_traits): New struct.
205 (matching_braces): New typedef.
206 (get_matching_symbol): New function.
207 (c_parser_require): Add param MATCHING_LOCATION, using it to
208 highlight matching "opening" tokens for missing "closing" tokens.
209 (c_parser_skip_until_found): Likewise.
210 (c_parser_static_assert_declaration_no_semi): Convert explicit
211 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
212 class matching_parens, so that the pertinent open parenthesis is
213 highlighted when there are problems locating the close
214 parenthesis.
215 (c_parser_struct_or_union_specifier): Likewise.
216 (c_parser_typeof_specifier): Likewise.
217 (c_parser_alignas_specifier): Likewise.
218 (c_parser_simple_asm_expr): Likewise.
219 (c_parser_braced_init): Likewise, for matching_braces.
220 (c_parser_paren_condition): Likewise, for matching_parens.
221 (c_parser_switch_statement): Likewise.
222 (c_parser_for_statement): Likewise.
223 (c_parser_asm_statement): Likewise.
224 (c_parser_asm_operands): Likewise.
225 (c_parser_cast_expression): Likewise.
226 (c_parser_sizeof_expression): Likewise.
227 (c_parser_alignof_expression): Likewise.
228 (c_parser_generic_selection): Likewise.
229 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
230 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
231 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
232 In case CPP_OPEN_PAREN, pass loc_open_paren to the
233 c_parser_skip_until_found call.
234 (c_parser_objc_class_definition): Use class matching_parens as
235 above.
236 (c_parser_objc_method_decl): Likewise.
237 (c_parser_objc_try_catch_finally_statement): Likewise.
238 (c_parser_objc_synchronized_statement): Likewise.
239 (c_parser_objc_at_property_declaration): Likewise.
240 (c_parser_oacc_wait_list): Likewise.
241 (c_parser_omp_var_list_parens): Likewise.
242 (c_parser_omp_clause_collapse): Likewise.
243 (c_parser_omp_clause_default): Likewise.
244 (c_parser_omp_clause_if): Likewise.
245 (c_parser_omp_clause_num_threads): Likewise.
246 (c_parser_omp_clause_num_tasks): Likewise.
247 (c_parser_omp_clause_grainsize): Likewise.
248 (c_parser_omp_clause_priority): Likewise.
249 (c_parser_omp_clause_hint): Likewise.
250 (c_parser_omp_clause_defaultmap): Likewise.
251 (c_parser_oacc_single_int_clause): Likewise.
252 (c_parser_omp_clause_ordered): Likewise.
253 (c_parser_omp_clause_reduction): Likewise.
254 (c_parser_omp_clause_schedule): Likewise.
255 (c_parser_omp_clause_num_teams): Likewise.
256 (c_parser_omp_clause_thread_limit): Likewise.
257 (c_parser_omp_clause_aligned): Likewise.
258 (c_parser_omp_clause_linear): Likewise.
259 (c_parser_omp_clause_safelen): Likewise.
260 (c_parser_omp_clause_simdlen): Likewise.
261 (c_parser_omp_clause_depend): Likewise.
262 (c_parser_omp_clause_map): Likewise.
263 (c_parser_omp_clause_device): Likewise.
264 (c_parser_omp_clause_dist_schedule): Likewise.
265 (c_parser_omp_clause_proc_bind): Likewise.
266 (c_parser_omp_clause_uniform): Likewise.
267 (c_parser_omp_for_loop): Likewise.
268 (c_parser_cilk_clause_vectorlength): Likewise.
269 (c_parser_cilk_clause_linear): Likewise.
270 (c_parser_transaction_expression): Likewise.
271 * c-parser.h (c_parser_require): Add param matching_location with
272 default UNKNOWN_LOCATION.
273 (c_parser_error): Convert return type from void to bool.
274 (c_parser_skip_until_found): Add param matching_location with
275 default UNKNOWN_LOCATION.
276
30af3a2b
MP
2772017-08-09 Marek Polacek <polacek@redhat.com>
278
279 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
280 * c-tree.h (build_external_ref): Update declaration.
281 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
282 (build_external_ref): Change the type of a parameter to bool.
283 (parser_build_binary_op): Use true/false instead of 1/0.
284 (pointer_diff): Likewise.
285 (build_modify_expr): Likewise.
286 (set_designator): Change the type of a parameter to bool.
287 (set_init_index): Use true/false instead of 1/0.
288 (set_init_label): Likewise.
289 (output_init_element): Change the type of a parameter to bool.
290 (output_pending_init_elements): Use true/false instead of 1/0.
291 (process_init_element): Likewise.
292 (build_binary_op): Change the type of a parameter to bool.
293
296c53ac
MP
2942017-08-09 Marek Polacek <polacek@redhat.com>
295
296 PR c/81233
297 * c-typeck.c (pedwarn_init): Make the function take a variable list.
298 Call emit_diagnostic_valist instead of pedwarn.
299 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
300 Print the relevant types in diagnostics.
301
a32c8316
MP
3022017-08-09 Marek Polacek <polacek@redhat.com>
303
304 PR c/81417
305 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
306 build_conditional_expr.
307 * c-parser.c (c_parser_conditional_expression): Create locations for
308 EXP1 and EXP2 from their source ranges. Pass the locations down to
309 build_conditional_expr.
310 * c-tree.h (build_conditional_expr): Update declaration.
311 * c-typeck.c (build_conditional_expr): Add location_t parameters.
312 For -Wsign-compare, also print the types.
313
314e6352
ML
3142017-08-08 Martin Liska <mliska@suse.cz>
315
316 * c-convert.c: Include header files.
317 * c-typeck.c: Likewise.
318
577eec56
ML
3192017-08-07 Martin Liska <mliska@suse.cz>
320
321 * c-parser.c (c_parser_attributes): Canonicalize name of an
322 attribute.
323
f7b6353a
MP
3242017-08-02 Marek Polacek <polacek@redhat.com>
325
326 PR c/81289
327 * c-parser.c (c_parser_unary_expression): Use set_error.
328
8a6eab34
MP
329 PR c/81448
330 PR c/81306
331 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
332 warnings. Avoid walking MACRO_MAP_LOCATIONS.
333
7fef86d3
JH
3342017-07-31 Jan Hubicka <hubicka@ucw.cz>
335 Martin Liska <mliska@suse.cz>
336
337 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 338 statement.
7fef86d3 339
f34ebeb2
ML
3402017-07-31 Martin Liska <mliska@suse.cz>
341
342 PR sanitize/81530
343 * c-convert.c (convert): Guard condition with flag_sanitize_p
344 also with current_function_decl non-null equality.
345 * c-decl.c (grokdeclarator): Likewise.
346 * c-typeck.c (build_binary_op): Likewise.
347
8595f67b
MP
3482017-07-25 Marek Polacek <polacek@redhat.com>
349
350 * c-decl.c (grokfield): Remove local variable.
351
d49718d6
MP
3522017-07-25 Marek Polacek <polacek@redhat.com>
353
354 PR c/81364
355 * c-parser.c (c_parser_else_body): Don't warn about multistatement
356 macro expansion if the body is in { }.
357 (c_parser_while_statement): Likewise.
358 (c_parser_for_statement): Likewise.
359
ff22eb12
NS
3602017-07-18 Nathan Sidwell <nathan@acm.org>
361
362 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
363
eea77d1f
DM
3642017-07-14 David Malcolm <dmalcolm@redhat.com>
365
366 * c-decl.c (implicitly_declare): When suggesting a missing
367 #include, provide a fix-it hint.
368
b6f43128
DM
3692017-07-06 David Malcolm <dmalcolm@redhat.com>
370
371 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
372 and call that instead.
373 * c-tree.h (selftest::run_c_tests): New decl.
374
3e2becc4
MP
3752017-06-26 Marek Polacek <polacek@redhat.com>
376
377 PR c/80116
378 * c-parser.c (c_parser_if_body): Set the location of the
379 body of the conditional after parsing all the labels. Call
380 warn_for_multistatement_macros.
381 (c_parser_else_body): Likewise.
382 (c_parser_switch_statement): Likewise.
383 (c_parser_while_statement): Likewise.
384 (c_parser_for_statement): Likewise.
385 (c_parser_statement): Add a default argument. Save the location
386 after labels have been parsed.
387 (c_parser_c99_block_statement): Likewise.
388
343ae898
RB
3892017-06-19 Richard Biener <rguenther@suse.de>
390
391 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
392 negated _Literals to parse _Literal (int) -1.
393
45b2222a
ML
3942017-06-13 Martin Liska <mliska@suse.cz>
395
396 PR sanitize/78204
397 * c-convert.c (convert): Use sanitize_flags_p.
398 * c-decl.c (grokdeclarator): Likewise.
399 * c-typeck.c (convert_for_assignment): Likewise.
400 (c_finish_return): Likewise.
401 (build_binary_op): Likewise.
402
8ab7005b
JJ
4032017-06-08 Jakub Jelinek <jakub@redhat.com>
404
405 PR c/81006
406 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
407 to sizetype before size_binop.
408
363dc72c
JJ
4092017-06-07 Jakub Jelinek <jakub@redhat.com>
410
411 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
412 of TDI_generic.
413
dc949728
MP
4142017-06-06 Marek Polacek <polacek@redhat.com>
415
416 PR c/79983
417 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
418 ref.
419 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
420
40ffd95f
BE
4212017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
422
423 * c-parser.c (c_parser_binary_expression): Implement the
424 -Wsizeof_pointer_div warning.
425 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
426 from a parenthesized expression.
427 (c_parser_expr_list): Use c_last_sizeof_loc.
428 * c-tree.h (c_last_sizeof_loc): New external.
429 * c-typeck.c (c_last_sizeof_loc): New variable.
430 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
431
9fc5e7a4
MM
4322017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
433
434 PR testsuite/80580
435 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
436
f012c8ef
DM
4372017-05-30 David Malcolm <dmalcolm@redhat.com>
438
439 * c-objc-common.c (c_tree_printer): Gain bool and const char **
440 parameters.
441
3cd211af
MS
4422017-05-24 Martin Sebor <msebor@redhat.com>
443
444 PR c/80731
445 * c-fold.c (c_fully_fold_internal): Adjust.
446 * c-typeck.c (parser_build_unary_op): Adjust.
447
fd71a9a2
TS
4482017-05-23 Thomas Schwinge <thomas@codesourcery.com>
449
450 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
451 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
452 "VECTOR_LENGTH".
453
92fa0f9e
MP
4542017-05-23 Marek Polacek <polacek@redhat.com>
455
456 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
457 quotes.
458
d11c168a
JJ
4592017-05-22 Jakub Jelinek <jakub@redhat.com>
460
461 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
462 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
463 it returned invariant. Call tree_invariant_p unconditionally
464 afterwards to decide whether to return expr or op0.
465
58aca9d9
NS
4662017-05-22 Nathan Sidwell <nathan@acm.org>
467
468 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
469
7fd549d2
TS
4702017-05-19 Thomas Schwinge <thomas@codesourcery.com>
471
472 * c-parser.c (c_parser_omp_clause_default): Handle
473 "OMP_CLAUSE_DEFAULT_PRESENT".
474
6ecd2339
BE
4752017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
476
477 * config-lang.in (gtfiles): Add c-family/c-format.c.
478
8a57ecff
NS
4792017-05-18 Nathan Sidwell <nathan@acm.org>
480
481 * c-decl.c (pushdecl_top_level): Delete unused function.
482
6574d78e
MP
4832017-05-18 Marek Polacek <polacek@redhat.com>
484
485 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
486 (check_earlier_gotos): Likewise.
487 (define_label): Likewise.
488 (pending_xref_error): Likewise.
489 (smallest_type_quals_location): Likewise.
490 (grokdeclarator): Likewise.
491 (grokparms): Likewise.
492 (identifier_global_value): Likewise.
493 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
494 (find_init_member): Likewise.
495
e3455240
MP
4962017-05-18 Marek Polacek <polacek@redhat.com>
497
498 * c-decl.c (start_decl): Use false/true instead of 0/1.
499 (grokdeclarator): Likewise.
500 (finish_struct): Likewise.
501 (start_function): Change the return type to bool. Use false/true
502 instead of 0/1.
503 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
504 * c-tree.h (start_function): Update.
505 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
506 (set_designator): Change the return type to bool. Use false/true
507 instead of 0/1.
508
3fa8871b
MP
5092017-05-17 Marek Polacek <polacek@redhat.com>
510
511 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
512 * c-typeck.c: Likewise.
513
142473df
MP
5142017-05-17 Marek Polacek <polacek@redhat.com>
515
516 PR sanitizer/80659
517 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
518 DECL_IGNORED_P even for non-static compound literals.
519
1a817418
ML
5202017-05-17 Martin Liska <mliska@suse.cz>
521
522 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
523 use it instead of int type.
524
b2fa0a8b
MP
5252017-05-17 Marek Polacek <polacek@redhat.com>
526
527 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
528 call c_fully_fold.
529 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
530 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
531 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
532 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
533 save_expr.
534 (c_parser_conditional_expression): Likewise.
535 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
536 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
537 (process_init_element): Likewise.
538 (build_binary_op): Likewise.
539 (handle_omp_array_sections_1): Likewise.
540
1e47f02b
TS
5412017-05-12 Thomas Schwinge <thomas@codesourcery.com>
542
543 * c-parser.c (c_parser_omp_clause_num_gangs)
544 (c_parser_omp_clause_num_workers)
545 (c_parser_omp_clause_vector_length): Merge functions into...
546 (c_parser_oacc_single_int_clause): ... this new function. Adjust
547 all users.
548
c24e924f
NS
5492017-05-11 Nathan Sidwell <nathan@acm.org>
550
551 * gimple-parser.c: Don't #include tree-dump.h.
552
c587104e
MM
5532017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
554
555 PR testsuite/80580
556 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
557
67ac9a9d
MM
5582017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
559
560 PR testsuite/80580
561 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
562 incorrect __MEM syntax.
563
ac4eb40f
MM
5642017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
565
566 PR testsuite/80580
567 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
568 type of unary '*'.
569
641da50a
NS
5702017-05-09 Nathan Sidwell <nathan@acm.org>
571
572 * c-tree.h (pushdecl): Declare.
573
56d35585
DM
5742017-05-05 David Malcolm <dmalcolm@redhat.com>
575
576 * c-decl.c (warn_defaults_to): Replace report_diagnostic
577 with diagnostic_report_diagnostic.
578 * c-errors.c (pedwarn_c99): Likewise.
579 (pedwarn_c90): Likewise.
580
815d9cc6
XR
5812017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
582
583 PR c++/80038
584 * c-gimplify.c (c_gimplify_expr): Remove calls to
585 cilk_gimplifY_call_params_in_spawned_fn.
586
1c4ea66f
DM
5872017-04-25 David Malcolm <dmalcolm@redhat.com>
588
589 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
590 hint for removing extra semicolon.
591
666f7903
JJ
5922017-04-21 Jakub Jelinek <jakub@redhat.com>
593
594 PR c/80468
595 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
596 enabled, set specs->type to integer_type_node.
597
5764ee3c
JW
5982017-04-03 Jonathan Wakely <jwakely@redhat.com>
599
600 * c-array-notation.c: Fix typo in comment.
601
10fa8dfb
MP
6022017-03-29 Marek Polacek <polacek@redhat.com>
603
604 PR c/79730
605 * c-decl.c (finish_decl): Check VAR_P.
606
a9e4a1a5
JJ
6072017-03-27 Jakub Jelinek <jakub@redhat.com>
608
609 PR middle-end/80162
610 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
611 * c-typeck.c (c_mark_addressable): Likewise. Look through
612 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
613 to ARRAY_TYPE.
614 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
615
ee3ff394
MP
6162017-03-23 Marek Polacek <polacek@redhat.com>
617
618 * c-tree.h: Remove a C_RID_YYCODE reference.
619
4d1b8e70
JJ
6202017-03-21 Jakub Jelinek <jakub@redhat.com>
621
622 PR c/80097
623 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
624 optional COMPOUND_EXPR with ubsan instrumentation.
625
31dc71a8
MP
6262017-03-17 Marek Polacek <polacek@redhat.com>
627
628 * c-parser.c: Add C11 references.
629
d579c385
MP
6302017-03-15 Marek Polacek <polacek@redhat.com>
631
632 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
633
85059a38
MP
6342017-03-11 Marek Polacek <polacek@redhat.com>
635
636 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
637
2f6f187a
DM
6382017-03-10 David Malcolm <dmalcolm@redhat.com>
639
640 PR translation/79848
641 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
642 "%qs".
643 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
644
36618428
MP
6452017-03-09 Marek Polacek <polacek@redhat.com>
646
647 PR sanitizer/79757
648 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
649 parameter declarations with initializers.
650
01e5af5a
JJ
6512017-03-09 Jakub Jelinek <jakub@redhat.com>
652
653 PR c/79969
654 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
655 TYPE_STUB_DECL.
656
a71dbc63
JJ
6572017-03-07 Jakub Jelinek <jakub@redhat.com>
658
659 PR c/79834
660 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
661 for "may only be used in compound statements" diagnostics, change it
662 such that the same translatable string is used for all pragmas. For
663 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
664 diagnostics.
665 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
666 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
667 "may only be used in compound statements" diagnostics, such that the
668 same translatable string is used for all pragmas.
669
1ff4bae6
MP
6702017-03-04 Marek Polacek <polacek@redhat.com>
671
672 PR c/79847
673 * c-decl.c (implicit_decl_warning): Add missing space.
674
7f5a7d78
MP
6752017-03-03 Marek Polacek <polacek@redhat.com>
676
677 PR c/79758
678 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
679 current_function_prototype_arg_types is error_mark_node. Fix
680 formatting. Use TREE_VALUE instead of TREE_TYPE.
681
883c8f06
JJ
6822017-03-03 Jakub Jelinek <jakub@redhat.com>
683
79c9b7a8
JJ
684 PR c/79837
685 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
686 %<min%> or %<max%> in the diagnostics, instead mention identifier.
687 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
688 diagnostics.
689
883c8f06
JJ
690 PR c/79836
691 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
692 instead of %<_Generic>.
693 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
694 (c_parser_omp_target_exit_data): Use %<release%> instead of
695 %<release>.
696
324ff1a0
JJ
6972017-02-28 Jakub Jelinek <jakub@redhat.com>
698
699 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
700 instead of just cond ? "..." : "...".
701 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
702 for "enter"/"exit" keyword.
703 (c_finish_oacc_routine): Don't use %s to supply portions of the
704 message.
705
4227c9ad
JJ
7062017-02-24 Jakub Jelinek <jakub@redhat.com>
707
708 PR c++/79588
709 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
710 handle -Wrestrict here.
711 * c-typeck.c (build_function_call_vec): Adjust
712 check_function_arguments caller.
713
5d972e66
RB
7142017-02-23 Richard Biener <rguenther@suse.de>
715
716 PR c/79684
717 * gimple-parser.c (c_parser_gimple_statement): Use set_error
718 to initialize c_exprs to return.
719 (c_parser_gimple_binary_expression): Likewise.
720 (c_parser_gimple_unary_expression): Likewise.
721 (c_parser_gimple_postfix_expression): Likewise.
722
61ac5ebe
MP
7232017-02-22 Marek Polacek <polacek@redhat.com>
724
725 PR c/79662
726 * c-typeck.c (convert_arguments): Handle error_mark_node.
727
41d1b0b1
PK
7282017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
729
730 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
731 value of c_parser_parse_ssa_name against error_mark_node and emit
732 error if ssa name is anonymous and written as default definition.
733
eab1f169
PK
7342017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
735
736 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
737 FMA_EXPR.
738
bcac0b4d
JJ
7392017-02-16 Jakub Jelinek <jakub@redhat.com>
740
741 PR c++/79512
742 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
743 ignore #pragma omp target even when not followed by identifier.
744
1be33173
PK
7452017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
746
747 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
748 (c_parser_gimple_unary_expression): Likewise.
749
aa326bfb
JJ
7502017-02-13 Jakub Jelinek <jakub@redhat.com>
751
752 * c-parser.c (c_parser_oacc_declare): Add missing space in
753 diagnostics.
754
8a398bc5
PK
7552017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
756
757 PR c/79478
758 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
759 set_c_expr_source_range when parsing ssa-name.
760
3dcde5ef
PG
7612017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
762 Richard Biener <rguenther@suse.de>
763
764 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
765 building IL when arguments are error_mark_node.
766 (c_parser_gimple_unary_expression): Likewise.
767 (c_parser_gimple_if_stmt): Likewise.
768 (c_parser_gimple_switch_stmt): Likewise.
769 (c_parser_gimple_return_stmt): Likewise.
770 (c_parser_parse_ssa_name): When name lookup fails do not build
771 an SSA name. Use undeclared rather than not declared in error
772 reporting.
773
192b048b
MP
7742017-02-09 Marek Polacek <polacek@redhat.com>
775
776 PR c/79428
777 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
778 instead of c_parser_skip_until_found.
779
56f71478
JJ
7802017-02-09 Jakub Jelinek <jakub@redhat.com>
781
782 PR c/79431
783 * c-parser.c (c_parser_omp_declare_target): Don't invoke
784 symtab_node::get on automatic variables.
785
02889d23
CLT
7862016-02-09 Nathan Sidwell <nathan@codesourcery.com>
787 Chung-Lin Tang <cltang@codesourcery.com>
788
789 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
790 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
791 semantic checking.
792 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
793
7af4b20d
RB
7942017-02-07 Richard Biener <rguenther@suse.de>
795
796 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
797 (c_parser_gimple_postfix_expression_after_primary):
798 Do not use c_build_function_call_vec to avoid folding and promotion.
799 Simplify.
800
e5e391d6
MO
8012017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
802
803 PR lto/79061
804 * c-decl.c (pop_scope): Pass main_input_filename to
805 build_translation_unit_decl.
806
c2e84327
DM
8072017-01-24 David Malcolm <dmalcolm@redhat.com>
808
809 * c-parser.c: Include "read-rtl-function.h" and
810 "run-rtl-passes.h".
811 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
812 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
813 production. Update for renaming of field "gimple_pass" to
814 "gimple_or_rtl_pass". If __RTL was seen, call
815 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
816 to an auto_timevar, to cope with early exit.
817 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
818 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
819 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
820 Handle RID_RTL.
821 (c_parser_parse_rtl_body): New function.
822 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
823 (struct c_declspecs): Rename field "gimple_pass" to
824 "gimple_or_rtl_pass". Add field "rtl_p".
825 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
826 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
827 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
828 (c_parser_gimple_or_rtl_pass_list): ...this.
829
2ebd93e1
MP
8302017-01-20 Marek Polacek <polacek@redhat.com>
831
832 PR c/64279
833 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
834
b1c95bb5
RB
8352017-01-13 Richard Biener <rguenther@suse.de>
836
837 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
838 nops.
839
25329913
RB
8402017-01-13 Richard Biener <rguenther@suse.de>
841
842 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
843 _Literal ( type-name ) number.
844
6bb4ea5c
RB
8452017-01-12 Richard Biener <rguenther@suse.de>
846
847 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
848 __MEM.
849
6b5b4e9c
JJ
8502017-01-11 Jakub Jelinek <jakub@redhat.com>
851
852 PR c++/72813
853 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
854 PCH file.
855
e3252775
RB
8562017-01-11 Richard Biener <rguenther@suse.de>
857
858 PR bootstrap/79052
859 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
860 returns on parse errors.
861
a9342885
MP
8622017-01-04 Marek Polacek <polacek@redhat.com>
863
864 PR c++/64767
865 * c-parser.c (c_parser_postfix_expression): Mark zero character
866 constants by setting original_type in c_expr.
867 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
868 with a zero character constant.
869 (char_type_p): New function.
870
5dd9a9d0
DM
8712017-01-04 David Malcolm <dmalcolm@redhat.com>
872
873 * c-parser.c (c_parser_declaration_or_fndef): Create a
874 rich_location at init_loc and parse it to start_init.
875 (last_init_list_comma): New global.
876 (c_parser_braced_init): Update last_init_list_comma when parsing
877 commas. Pass it to pop_init_level. Pass location of closing
878 brace to pop_init_level.
879 (c_parser_postfix_expression_after_paren_type): Create a
880 rich_location at type_loc and parse it to start_init.
881 (c_parser_omp_declare_reduction): Likewise for loc.
882 * c-tree.h (start_init): Add rich_location * param.
883 (pop_init_level): Add location_t param.
884 * c-typeck.c (struct initializer_stack): Add field
885 "missing_brace_richloc".
886 (start_init): Add richloc param, use it to initialize
887 the stack node's missing_brace_richloc.
888 (last_init_list_comma): New decl.
889 (finish_implicit_inits): Pass last_init_list_comma to
890 pop_init_level.
891 (push_init_level): When finding missing open braces, add fix-it
892 hints to the richloc.
893 (pop_init_level): Add "insert_before" param and pass it
894 when calling pop_init_level. Add fixits about missing
895 close braces to any richloc. Use the richloc for the
896 -Wmissing-braces warning.
897 (set_designator): Pass last_init_list_comma to pop_init_level.
898 (process_init_element): Likewise.
899
cbe34bb5
JJ
9002017-01-01 Jakub Jelinek <jakub@redhat.com>
901
902 Update copyright years.
903
d17680f3
JJ
9042016-12-21 Jakub Jelinek <jakub@redhat.com>
905
0dba7960
JJ
906 PR bootstrap/78817
907 * c-typeck.c (build_function_call_vec): If check_function_arguments
908 returns true, set TREE_NO_WARNING on CALL_EXPR.
909
d17680f3
JJ
910 PR c/77767
911 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
912 to *expr instead of overwriting it.
913
aa90531e
RB
9142016-12-20 Richard Biener <rguenther@suse.de>
915
916 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
917 error recovery.
918 (c_parser_gimple_statement): Only build assigns for non-error
919 stmts.
920 (c_parser_gimple_postfix_expression_after): Improve error recovery.
921
629b3d75
MJ
9222016-12-14 Martin Jambor <mjambor@suse.cz>
923
924 * c-parser.c: Include omp-general.h and omp-offload.h instead of
925 omp-low.h.
926 (c_finish_oacc_routine): Adjusted call to
927 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
928 to use their new names.
929 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
930 use its new name.
931 (c_parser_oacc_update): Likewise.
932 (c_parser_omp_simd): Likewise.
933 (c_parser_omp_target_update): Likewise.
934 * c-typeck.c: Include omp-general.h instead of omp-low.h.
935 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
936 name.
937 (c_finish_omp_cancellation_point): Likewise.
938 * gimple-parser.c: Do not include omp-low.h
939
c5af52eb
CP
9402016-12-02 Cesar Philippidis <cesar@codesourcery.com>
941 James Norris <jnorris@codesourcery.com>
942
943 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
944 EXIT_DATA,WAIT} are not used in compound statements.
945 (c_parser_oacc_enter_exit_data): Update diagnostics.
946
48330c93
BE
9472016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
948
949 PR c++/71973
950 * c-decl.c (diagnose_mismatched_decls): Use
951 OPT_Wbuiltin_declaration_mismatch here too.
952
899ca90e 9532016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
954 Alan Hayward <alan.hayward@arm.com>
955 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
956
957 * c-decl.c (merge_decls): Use SET_DECL_MODE.
958 (make_label, finish_struct): Likewise.
959
1ee62b92 9602016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 961 Richard Biener <rguenther@suse.de>
22b15758 962
8e745a17
JJ
963 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
964 * config-lang.in (gtfiles): Add c/c-parser.h.
965 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
966 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
967 * c-parser.c (enum c_id_kind, struct c_token,
968 c_parser_next_token_is, c_parser_next_token_is_not,
969 c_parser_next_token_is_keyword,
970 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
971 Split out to ...
972 * c-parser.h: ... new header.
973 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 974 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
975 c_token_starts_typename, c_parser_next_token_starts_declspecs,
976 c_parser_next_tokens_start_declaration, c_parser_consume_token,
977 c_parser_error, c_parser_require, c_parser_skip_until_found,
978 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
979 c_parser_type_name): Export.
980 (c_parser_tokens_buf): New function.
981 (c_parser_error): Likewise.
982 (c_parser_set_error): Likewise.
983 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
984 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
985 via c_parser_parse_gimple_body.
8e745a17
JJ
986 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
987 c_token_starts_typename, c_parser_next_token_starts_declspecs,
988 c_parser_next_tokens_start_declaration, c_parser_consume_token,
989 c_parser_error, c_parser_require, c_parser_skip_until_found,
990 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
991 c_parser_type_name): Declare.
1ee62b92
PG
992 (struct c_parser): Declare forward.
993 (c_parser_tokens_buf): Declare.
8e745a17
JJ
994 (c_parser_error): Likewise.
995 (c_parser_set_error): Likewise.
996 * gimple-parser.c: New file.
997 * gimple-parser.h: Likewise.
1ee62b92 998
22b15758
UB
9992016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1000
1001 PR c/35503
1002 * c-parser.c (c_parser_postfix_expression_after_primary): Call
1003 warn_for_restrict.
1004
84ff4775
LCW
10052016-09-11 Le-Chun Wu <lcwu@google.com>
1006 Mark Wielaard <mjw@redhat.com>
1007
1008 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
1009 to the given -Wshadow= variant.
1010
4d0cdd0c
TP
10112016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
1012
1013 * c-typeck.c: Include memmodel.h.
1014
1202f33e
JJ
10152016-10-13 Jakub Jelinek <jakub@redhat.com>
1016
1017 PR target/77957
1018 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
1019 instead of lhd_return_null_tree_v.
1020
8a14afd0
BS
10212016-10-07 Bernd Schmidt <bschmidt@redhat.com>
1022
1023 PR c++/69733
1024 * c-decl.c (smallest_type_quals_location): New static function.
1025 (grokdeclarator): Try to find the correct location for an ignored
1026 qualifier.
1027
81fea426
MP
10282016-09-26 Marek Polacek <polacek@redhat.com>
1029
1030 PR c/7652
1031 * c-decl.c (pop_scope): Add gcc_fallthrough.
1032
10332016-09-26 Marek Polacek <polacek@redhat.com>
1034
1035 PR c/7652
1036 * c-parser.c (struct c_token): Add flags field.
1037 (c_lex_one_token): Pass it to c_lex_with_flags.
1038 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
1039 into IFN_FALLTHROUGH.
1040 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
1041 attribute fallthrough after a case label or default label.
1042 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
1043
9a2300e9
MP
10442016-09-24 Marek Polacek <polacek@redhat.com>
1045
1046 PR c/77490
1047 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
1048 have boolean value. Warn about ++/-- on booleans.
1049
7de76362
JJ
10502016-09-23 Jakub Jelinek <jakub@redhat.com>
1051
1052 * c-parser.c (incomplete_record_decls): Remove unnecessary
1053 = vNULL initialization of file scope vec.
1054
5b73d2ab
MP
10552016-09-16 Marek Polacek <polacek@redhat.com>
1056
1057 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
1058
e51fbec3
MP
10592016-09-14 Marek Polacek <polacek@redhat.com>
1060
1061 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
1062 (fix_array_notation_expr): Likewise.
1063 * c-decl.c (finish_decl): Likewise.
1064 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1065 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
1066 (function_to_pointer_conversion): Use false instead of 0.
1067 (convert_lvalue_to_rvalue): Likewise.
1068 (parser_build_unary_op): Likewise.
1069 (build_atomic_assign): Likewise.
1070 (build_unary_op): Change nonconvert parameter type to bool, use
1071 true/false instead of 1/0.
1072 (build_binary_op): Use true instead of 1.
1073
254830ba
DM
10742016-09-13 David Malcolm <dmalcolm@redhat.com>
1075
1076 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
1077 of add_fixit_insert to add_fixit_insert_before.
1078
4c13ba17
MP
10792016-09-13 Marek Polacek <polacek@redhat.com>
1080
1081 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
1082 it.
1083
54dcdb88
BE
10842016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
1085
1086 PR c++/77496
1087 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
1088 COMPOUND_EXPR to warn_for_omitted_condop.
1089
e5106e27
DM
10902016-09-07 David Malcolm <dmalcolm@redhat.com>
1091
1092 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
1093 c_get_substring_location for this new langhook.
1094
9dc5773f
JJ
10952016-09-02 Jakub Jelinek <jakub@redhat.com>
1096
1097 PR c/65467
1098 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
1099 flag_openmp.
1100 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
1101 instead of mark_exp_read on low_bound/length expression.
1102 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
1103 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
1104 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
1105 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
1106 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
1107 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
1108 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
1109 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
1110 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
1111 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
1112 instead of mark_expr_read.
1113 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
1114 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
1115 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
1116 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
1117 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
1118 array section bases outside of depend clause, for depend clause
1119 use convert_lvalue_to_rvalue on the base.
1120 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
1121 linear, aligned, map, to and from clauses.
1122 (c_omp_clause_copy_ctor): New function.
1123
295844f6
MP
11242016-09-01 Marek Polacek <polacek@redhat.com>
1125
1126 PR c/7652
1127 * c-typeck.c (composite_type): Add FALLTHRU comment.
1128
089af25c
DM
11292016-08-31 David Malcolm <dmalcolm@redhat.com>
1130
1131 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
1132 to the insertion fixits for "struct", "union", and "enum".
1133
f9087798
DM
11342016-08-30 David Malcolm <dmalcolm@redhat.com>
1135
1136 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
1137 rather than add_fixit_misspelled_id.
1138 (undeclared_variable): Likewise.
1139 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
1140 now-redundant "here" params from add_fixit_insert method calls.
1141 (c_parser_parameter_declaration): Likewise.
1142 * c-typeck.c (build_component_ref): Remove now-redundant range
1143 param from add_fixit_replace method calls.
1144
ebef225f
MP
11452016-08-25 Marek Polacek <polacek@redhat.com>
1146
1147 * c-typeck.c (parser_build_binary_op): Pass LHS to
1148 warn_logical_not_parentheses.
1149
fe377a48
MP
11502016-08-25 Marek Polacek <polacek@redhat.com>
1151
1152 PR c/77323
1153 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
1154 or _FloatN or _FloatNx is not supported.
1155 (finish_declspecs): Set type to integer_type_node when _FloatN or
1156 _FloatNx is not supported.
1157
c65699ef
JM
11582016-08-19 Joseph Myers <joseph@codesourcery.com>
1159
1160 PR c/32187
1161 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
1162 (struct c_declspecs): Add field floatn_nx_idx.
1163 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
1164 and _FloatNx type specifiers.
1165 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
1166 (c_parser_declspecs, c_parser_attribute_any_word)
1167 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
1168 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
1169 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
1170 narrower than double.
1171
2f1364c2
JJ
11722016-08-12 Jakub Jelinek <jakub@redhat.com>
1173 Martin Liska <mliska@suse.cz>
1174
1175 PR c/67410
1176 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
1177 % to determine val element to change. Assert that
1178 wchar_bytes * charwidth fits into val array.
1179
191816a3
MP
11802016-08-12 Marek Polacek <polacek@redhat.com>
1181
1182 PR c/7652
1183 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
1184 (c_parser_postfix_expression): Likewise.
1185 * c-typeck.c (build_unary_op): Adjust fall through comment.
1186 (c_mark_addressable): Likewise.
1187
b95a64bb
JJ
11882016-08-11 Jakub Jelinek <jakub@redhat.com>
1189
1190 PR c/72816
1191 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
1192 array member through typedef, for orig_qual_indirect == 0 clear
1193 orig_qual_type.
1194
895aa8e1
DM
11952016-08-08 David Malcolm <dmalcolm@redhat.com>
1196
1197 PR c/64955
1198 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
1199 this up to selftest::run_c_tests.
1200 (selftest::run_c_tests): New function.
1201
0b212d8c
TS
12022016-08-04 Thomas Schwinge <thomas@codesourcery.com>
1203
ae9281fc
TS
1204 * c-parser.c (struct oacc_routine_data): Add error_seen and
1205 fndecl_seen members.
1206 (c_finish_oacc_routine): Use these.
1207 (c_parser_declaration_or_fndef): Adjust.
1208 (c_parser_oacc_routine): Likewise. Support more C language
1209 constructs, and improve diagnostics. Move pragma context
1210 checking...
1211 (c_parser_pragma): ... here.
1212
0b212d8c
TS
1213 * c-parser.c (struct oacc_routine_data): New.
1214 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
1215 Simplify code.
1216 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
1217 declare target" attribute.
1218
76e2c821
JB
12192016-08-01 Jan Beulich <jbeulich@suse.com>
1220
1221 * c-fold.c (c_fully_fold_internal): Also emit shift count
1222 warnings for vector types.
1223 * c-typeck.c (build_binary_op): Likewise.
1224
f618a472
MP
12252016-07-29 Marek Polacek <polacek@redhat.com>
1226
1227 PR c/71742
1228 * c-decl.c (finish_struct): Rephrase an error message.
1229
efd0786f
MP
1230 PR c/71853
1231 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
1232 to error node for invalid code.
1233
e00dceaf
MP
1234 PR c/71573
1235 * c-decl.c (implicitly_declare): Return decl early not only for
1236 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
1237
673a107a
JJ
12382016-07-29 Jakub Jelinek <jakub@redhat.com>
1239
1240 PR c/71969
1241 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
1242 on GNU extern inline functions.
1243
a5b5c8b6
MP
12442016-07-29 Marek Polacek <polacek@redhat.com>
1245
1246 PR c/71583
1247 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
1248 check expr.value.
1249
e3fe09c1
UB
12502016-07-22 Uros Bizjak <ubizjak@gmail.com>
1251
1252 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
1253
7c8f7eaa
DM
12542016-07-20 David Malcolm <dmalcolm@redhat.com>
1255
1256 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
1257 spellcheck-tree.h
1258 (best_macro_match): Likewise, converting from a typedef to a
1259 subclass.
1260 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
1261 (lookup_name_fuzzy): Update for change of best_macro_match to a
1262 subclass with a ctor that calls cpp_forall_identifiers.
1263
de6a69ee
DM
12642016-07-20 David Malcolm <dmalcolm@redhat.com>
1265
1266 * c-decl.c (implicit_decl_warning): Update for conversion of
1267 return type of lookup_name_fuzzy to const char *.
1268 (undeclared_variable): Likewise.
1269 (lookup_name_fuzzy): Convert return type from tree to
1270 const char *.
1271 * c-parser.c (c_parser_declaration_or_fndef): Update for
1272 conversion of return type of lookup_name_fuzzy to const char *.
1273 (c_parser_parameter_declaration): Likewise.
1274
b1c9c068
CP
12752016-07-15 Cesar Philippidis <cesar@codesourcery.com>
1276
1277 * c-parser.c (c_parser_oacc_declare): Don't scan for
1278 GOMP_MAP_POINTER.
1279 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
1280 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
1281 zero-length subarrays.
1282
ddbbcb19
JJ
12832016-07-15 Jakub Jelinek <jakub@redhat.com>
1284
1285 PR c/71858
1286 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
1287 instead of FUZZY_LOOKUP_NAME.
1288 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
1289 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
1290
dd36b877
JJ
12912016-07-14 Jakub Jelinek <jakub@redhat.com>
1292
1293 PR c/71858
1294 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
1295
8c681247
TS
12962016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1297
1298 * c-parser.c (c_parser_generic_selection): Make type of variable
1299 auto_vec.
1300 (c_parser_omp_declare_simd): Likewise.
1301
bf4fa671
TS
13022016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1303
1304 * c-decl.c (struct c_struct_parse_info): Change member types
1305 from vec to auto_vec.
1306 (start_struct): Adjust.
1307 (finish_struct): Likewise.
1308
557e8c49
JJ
13092016-07-02 Jakub Jelinek <jakub@redhat.com>
1310
1311 PR c/71719
1312 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
1313
54d19c3b
TS
13142016-06-29 Thomas Schwinge <thomas@codesourcery.com>
1315
1316 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
1317 Move pragma context checking into...
1318 (c_parser_omp_cancellation_point): ... here, and improve
1319 diagnostic messages.
1320 * c-typeck.c (c_finish_omp_cancel)
1321 (c_finish_omp_cancellation_point): Improve diagnostic messages.
1322
152ef731
JJ
13232016-06-29 Jakub Jelinek <jakub@redhat.com>
1324
1325 PR c/71685
1326 * c-typeck.c (c_build_qualified_type): Don't clear
1327 C_TYPE_INCOMPLETE_VARS for the main variant.
1328
13292016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
1330
1331 PR c/71552
1332 * c-typeck.c (output_init_element): Diagnose incompatible types
1333 before non-constant initializers.
1334
e9ac1f86
JJ
13352016-06-28 Jakub Jelinek <jakub@redhat.com>
1336
1337 * Make-lang.in: Don't cat ../stage_current if it does not exist.
1338
277d7ee0
AK
13392016-06-23 Andi Kleen <ak@linux.intel.com>
1340
1341 * Make-lang.in: Add support for autofdo.
1342
1a4f11c8
DM
13432016-06-22 David Malcolm <dmalcolm@redhat.com>
1344
1345 PR c/70339
1346 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
1347 (implicit_decl_warning): When issuing warnings for implicit
1348 declarations, attempt to provide a suggestion via
1349 lookup_name_fuzzy.
1350 (undeclared_variable): Likewise when issuing errors.
1351 (lookup_name_in_scope): Likewise.
1352 (struct edit_distance_traits<cpp_hashnode *>): New struct.
1353 (best_macro_match): New typedef.
1354 (find_closest_macro_cpp_cb): New function.
1355 (lookup_name_fuzzy): New function.
1356 * c-parser.c: Include gcc-rich-location.h.
1357 (c_token_starts_typename): Split out case CPP_KEYWORD into...
1358 (c_keyword_starts_typename): ...this new function.
1359 (c_parser_declaration_or_fndef): When issuing errors about
1360 missing "struct" etc, add a fixit. For other kinds of errors,
1361 attempt to provide a suggestion via lookup_name_fuzzy.
1362 (c_parser_parms_declarator): When looking ahead to detect typos in
1363 type names, also reject CPP_KEYWORD.
1364 (c_parser_parameter_declaration): When issuing errors about
1365 unknown type names, attempt to provide a suggestion via
1366 lookup_name_fuzzy.
1367 * c-tree.h (c_keyword_starts_typename): New prototype.
1368
5a578671
JM
13692016-06-20 Joseph Myers <joseph@codesourcery.com>
1370
1371 PR c/71601
1372 * c-typeck.c (build_conditional_expr): Return error_mark_node if
1373 c_common_type returns error_mark_node.
1374
3f8257db 13752016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
1376
1377 PR c/69507
1378 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
1379 __alignof__ (expression).
1380
6a3f203c
DM
13812016-06-14 David Malcolm <dmalcolm@redhat.com>
1382
1383 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
1384
264757fb
DM
13852016-06-14 David Malcolm <dmalcolm@redhat.com>
1386
1387 * c-typeck.c (build_component_ref): Simplify fixit code by
1388 using gcc_rich_location::add_fixit_misspelled_id.
1389 (set_init_label): Likewise.
1390
f7e4f2e3
DM
13912016-06-13 David Malcolm <dmalcolm@redhat.com>
1392
1393 * c-parser.c (c_parser_initelt): Provide location of name for new
1394 location_t param of set_init_label.
1395 * c-tree.h (set_init_label): Add location_t param.
1396 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
1397 param and use it when issuing error messages about unrecognized
1398 field names. Attempt to provide a fixit hint if appropriate,
1399 otherwise update the error message to provide the type name.
1400
4b1ffdb1
TS
14012016-06-10 Thomas Schwinge <thomas@codesourcery.com>
1402
1403 PR c/71381
1404 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
1405 Loosen checking.
1406
44a845ca
MS
14072016-06-08 Martin Sebor <msebor@redhat.com>
1408 Jakub Jelinek <jakub@redhat.com>
1409
1410 PR c++/70507
1411 PR c/68120
1412 * c-typeck.c (convert_arguments): Don't promote last argument
1413 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
1414
92a5f2ba
MP
14152016-06-08 Marek Polacek <polacek@redhat.com>
1416
1417 PR c/71418
1418 * c-decl.c (grokdeclarator): Check TYPE_P.
1419
08203f73
MP
1420 PR c/71426
1421 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
1422 code.
1423
6ffd47b7
DM
14242016-06-07 David Malcolm <dmalcolm@redhat.com>
1425
1426 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
1427 and structure element reference, capture the location of the
1428 element name token and pass it to build_component_ref.
1429 (c_parser_postfix_expression_after_primary): Likewise for
1430 structure element dereference.
1431 (c_parser_omp_variable_list): Likewise for
1432 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
1433 * c-tree.h (build_component_ref): Add location_t param.
1434 * c-typeck.c (build_component_ref): Add location_t param
1435 COMPONENT_LOC. Use it, if available, when issuing hints about
1436 mispelled member names to provide a fixit replacement hint.
1437
1f40cff3
MP
14382016-06-06 Marek Polacek <polacek@redhat.com>
1439
1440 PR c/71362
1441 * c-parser.c (c_parser_direct_declarator): Set location.
1442
5545a907
MP
14432016-06-06 Marek Polacek <polacek@redhat.com>
1444
1445 * c-typeck.c (comptypes_internal): Handle comparisons of
1446 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
1447 TYPE_REF_CAN_ALIAS_ALL.
1448
b605f663
CLT
14492016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
1450
1451 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
1452 arguments as addressable when async clause exists.
1453
00631022
JJ
14542016-05-30 Jakub Jelinek <jakub@redhat.com>
1455
1456 PR c++/71349
1457 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
1458 when combined with target construct.
1459
7211a097
JJ
14602016-05-26 Jakub Jelinek <jakub@redhat.com>
1461
1462 * c-parser.c (c_parser_omp_clause_schedule): Warn if
1463 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
1464
95efe6b6
MP
14652016-05-25 Marek Polacek <polacek@redhat.com>
1466
1467 PR c/71265
1468 * c-decl.c (c_make_fname_decl): Don't check seen_error.
1469
a23faf7a
MP
1470 PR c/71266
1471 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
1472
e46c7770
CP
14732016-05-24 Cesar Philippidis <cesar@codesourcery.com>
1474
1475 * c-parser.c (c_parser_oacc_declare): Add support for
1476 GOMP_MAP_FIRSTPRIVATE_POINTER.
1477 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
1478 argument with enum c_omp_region_type ort.
1479 (handle_omp_array_sections): Likewise. Update call to
1480 handle_omp_array_sections_1.
1481 (c_finish_omp_clauses): Add specific errors and warning messages for
1482 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
1483 call to handle_omp_array_sections.
1484
a04e69c0
TS
14852016-05-24 Thomas Schwinge <thomas@codesourcery.com>
1486
1487 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
1488
f17a223d
RB
14892016-05-24 Richard Biener <rguenther@suse.de>
1490
1491 PR middle-end/70434
1492 PR c/69504
1493 * c-typeck.c (build_array_ref): Do not complain about indexing
1494 non-lvalue vectors. Adjust for function name change.
1495
79063edd
MS
14962016-05-20 Martin Sebor <msebor@redhat.com>
1497
1498 PR c/71115
1499 * c-typeck.c (error_init): Use
1500 expansion_point_location_if_in_system_header.
1501 (warning_init): Same.
1502
8a40fef3
DM
15032016-05-19 David Malcolm <dmalcolm@redhat.com>
1504
1505 PR c/71171
1506 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
1507 in error-handling.
1508 (c_parser_postfix_expression): Likewise.
1509 * c-tree.h (c_expr::set_error): New method.
1510 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
1511 that result's range is initialized.
1512
e9892350
JG
15132016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
1514
1515 * c-typeck.c (parser_build_unary_op): Fix formatting.
1516
8fad45f5
MW
15172016-05-16 Matthew Wahab <matthew.wahab@arm.com>
1518
1519 * c-decl.c (grokdeclarator): Remove errmsg and use of
1520 targetm.invalid_return_type.
1521 (grokparms): Remove errmsg and use of
1522 targetm.invalid_parameter_type.
1523
aa4b467b
JM
15242016-05-13 Joseph Myers <joseph@codesourcery.com>
1525
1526 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
1527 function return type.
1528
4f2e1536
MP
15292016-05-12 Marek Polacek <polacek@redhat.com>
1530
1531 PR c/70756
1532 * c-decl.c (build_compound_literal): Pass LOC down to
1533 c_incomplete_type_error.
1534 * c-tree.h (require_complete_type): Adjust declaration.
1535 (c_incomplete_type_error): Likewise.
1536 * c-typeck.c (require_complete_type): Add location parameter, pass it
1537 down to c_incomplete_type_error.
1538 (c_incomplete_type_error): Add location parameter, pass it down to
1539 error_at.
1540 (build_component_ref): Pass location down to c_incomplete_type_error.
1541 (default_conversion): Pass location down to require_complete_type.
1542 (build_array_ref): Likewise.
1543 (build_function_call_vec): Likewise.
1544 (convert_arguments): Likewise.
1545 (build_unary_op): Likewise.
1546 (build_c_cast): Likewise.
1547 (build_modify_expr): Likewise.
1548 (convert_for_assignment): Likewise.
1549 (c_finish_omp_clauses): Likewise.
1550
d6e83a8d
MM
15512016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1552
1553 PR c/43651
1554 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
1555 is enabled.
1556 * c-errors.c (pedwarn_c90): Return true if warned.
1557 * c-tree.h (pedwarn_c90): Change return type to bool.
1558 (enum c_declspec_word): Add new enumerator cdw_atomic.
1559
5c3a10fb
MP
15602016-05-11 Marek Polacek <polacek@redhat.com>
1561
1562 PR c++/71024
1563 * c-decl.c (diagnose_mismatched_decls): Factor out code to
1564 diagnose_mismatched_attributes and call it.
1565
cf68d92c
MP
15662016-05-10 Marek Polacek <polacek@redhat.com>
1567
1568 PR c/70255
1569 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
1570 on a declaration following the definition.
1571
351f85c5
JJ
15722016-05-05 Jakub Jelinek <jakub@redhat.com>
1573
1574 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
1575 parse it through to c_parser_c99_block_statement.
1576 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
1577 caller.
1578
deef7113
MP
15792016-05-04 Marek Polacek <polacek@redhat.com>
1580
1581 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
1582 OPT_Wdangling_else.
1583
de55efd5
MP
15842016-05-04 Marek Polacek <polacek@redhat.com>
1585
1586 PR c/48778
1587 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
1588 for macro expansions.
1589
79ce98bc
MP
15902016-05-03 Marek Polacek <polacek@redhat.com>
1591
1592 PR c/70859
1593 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
1594 check_builtin_function_arguments.
1595
fb2647aa
RB
15962016-05-03 Richard Biener <rguenther@suse.de>
1597
1598 * Make-lang.in (cc1-checksum.c): For stage-final re-use
1599 the checksum from the previous stage.
1600
77886428
CP
16012016-05-02 Cesar Philippidis <cesar@codesourcery.com>
1602
1603 * c-parser.c (c_parser_oacc_all_clauses): Update call to
1604 c_finish_omp_clauses.
1605 (c_parser_omp_all_clauses): Likewise.
1606 (c_parser_oacc_cache): Likewise.
1607 (c_parser_oacc_loop): Likewise.
1608 (omp_split_clauses): Likewise.
1609 (c_parser_omp_declare_target): Likewise.
1610 (c_parser_cilk_all_clauses): Likewise.
1611 (c_parser_cilk_for): Likewise.
1612 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
1613 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
1614
7176a4a0
MP
16152016-05-02 Marek Polacek <polacek@redhat.com>
1616
1617 PR c/70851
1618 * c-decl.c (grokdeclarator): Diagnose when array's size has an
1619 incomplete type.
1620
e7ff0319
CP
16212016-04-29 Cesar Philippidis <cesar@codesourcery.com>
1622
1623 PR middle-end/70626
1624 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
1625 OACC_LOOP_CLAUSE_MASK.
1626 (c_parser_oacc_kernels_parallel): Update call to
1627 c_oacc_split_loop_clauses.
1628
9f405ce1
AM
16292016-04-28 Andrew MacLeod <amacleod@redhat.com>
1630
1631 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
1632 argument to build_modify_expr in two cases.
1633
c1e1f433
BS
16342016-04-27 Bernd Schmidt <bschmidt@redhat.com>
1635
1636 * c-parser.c (c_parser_postfix_expression_after_primary): Call
1637 warn_for_memset instead of warning directly here.
1638
2448a956
MP
16392016-04-26 Marek Polacek <polacek@redhat.com>
1640
1641 PR c/67784
1642 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
1643 out of ...
1644 (c_parser_for_statement): ... here.
1645 (c_parser_if_statement): Use it.
1646 (c_parser_switch_statement): Use it.
1647 (c_parser_while_statement): Use it.
1648
b02a5e26
MP
1649 PR c/70791
1650 * c-decl.c (pushdecl): Pass LOCUS down to warning.
1651
477d4906
IV
16522016-04-20 Ilya Verbin <ilya.verbin@intel.com>
1653
1654 PR c++/69363
1655 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
1656 instead of c_finish_cilk_clauses.
1657 * c-tree.h (c_finish_omp_clauses): Add new default argument.
1658 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
1659 floating-point variables in the linear clause for Cilk Plus.
1660
fe37c7af
MM
16612016-04-18 Michael Matz <matz@suse.de>
1662
1663 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
1664 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
1665
949505a9
MP
16662016-04-15 Marek Polacek <polacek@redhat.com>
1667
1668 PR c/70671
1669 * c-typeck.c (build_unary_op): Pass location down to error and
1670 warning call.
1671
dda1bf61
JJ
16722016-04-15 Jakub Jelinek <jakub@redhat.com>
1673
1674 PR c/70436
1675 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
1676 where needed.
1677 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
1678 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
1679 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
1680 Adjust c_parser_pragma callers.
1681 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
1682 caller.
1683 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
1684 c_parser_statement.
1685 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
1686 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
1687 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
1688 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
1689 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
1690 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
1691 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
1692 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
1693 down where needed.
1694 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
1695 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
1696 calls.
1697
99cd9857
MP
16982016-04-13 Marek Polacek <polacek@redhat.com>
1699
1700 PR c/70436
1701 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
1702 adjust callers.
1703 (c_parser_statement): Likewise.
1704 (c_parser_c99_block_statement): Likewise.
1705 (c_parser_while_statement): Likewise.
1706 (c_parser_for_statement): Likewise.
1707 (c_parser_if_body): Don't set IF_P here.
1708 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
1709 about dangling else here.
1710 * c-tree.h (c_finish_if_stmt): Adjust declaration.
1711 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
1712 warn about dangling else here.
1713
f13355da
MP
17142016-04-04 Marek Polacek <polacek@redhat.com>
1715
1716 PR c/70307
1717 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
1718
5fde6a45
MP
17192016-03-31 Marek Polacek <polacek@redhat.com>
1720
1721 PR c/70297
1722 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
1723
4bbf545b
DM
17242016-03-18 David Malcolm <dmalcolm@redhat.com>
1725
1726 PR c/70281
1727 * c-parser.c (c_parser_postfix_expression): Set the source range
1728 for uses of "__builtin_types_compatible_p".
1729
fcc2b74f
JJ
17302016-03-17 Jakub Jelinek <jakub@redhat.com>
1731
1732 PR c/70280
1733 * c-typeck.c (composite_type): Don't count void_list_node
1734 into len, if the list is terminated by void_list_node, start
1735 with void_list_node instead of NULL for newargs. Stop
1736 at void_list_node.
1737
ab4c578f
MP
17382016-03-16 Marek Polacek <polacek@redhat.com>
1739
1740 PR c/70093
1741 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
1742 nested functions returning VM types.
1743
96b3c82d
CP
17442016-03-09 Cesar Philippidis <cesar@codesourcery.com>
1745
1746 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
1747 when calling c_finish_omp_clauses.
1748
29b9828f
BS
17492016-03-04 Bernd Schmidt <bschmidt@redhat.com>
1750
1751 PR c/69824
1752 * c-decl.c (get_parm_info): Don't queue implicit function declarations
1753 for later.
1754
7ff6ca38
MP
17552016-03-04 Marek Polacek <polacek@redhat.com>
1756
1757 PR c/69798
1758 * c-parser.c (c_parser_postfix_expression): Call
1759 c_parser_cast_expression rather than c_parser_postfix_expression.
1760
686e2237
JJ
17612016-03-01 Jakub Jelinek <jakub@redhat.com>
1762
1763 PR c/69796
1764 PR c/69974
1765 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
1766 of incomplete decls to error_mark_node.
1767
0b05329b
MP
17682016-02-24 Marek Polacek <polacek@redhat.com>
1769
1770 PR c/69819
1771 * c-decl.c (finish_decl): Don't update the copy of the type of a
1772 different decl type.
1773
067fbd8b
JJ
17742016-02-23 Jakub Jelinek <jakub@redhat.com>
1775
1776 PR objc/69844
1777 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
1778 in id_kind reclassification.
1779
bf14eba2
JJ
17802016-02-16 Jakub Jelinek <jakub@redhat.com>
1781
1782 PR c/69835
1783 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
1784
ba539195
JN
17852016-02-16 James Norris <jnorris@codesourcery.com>
1786
1787 PR c/64748
1788 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
1789
16595a1f
BS
17902016-02-12 Bernd Schmidt <bschmidt@redhat.com>
1791
f48dfe98
BS
1792 * c-decl.c (build_null_declspecs): Zero the entire struct.
1793
16595a1f
BS
1794 PR c/69522
1795 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
1796 callers changed. If nested_p is true, use it to call
1797 finish_implicit_inits.
1798 * c-tree.h (finish_implicit_inits): Declare.
1799 * c-typeck.c (finish_implicit_inits): New function. Move code
1800 from ...
1801 (push_init_level): ... here.
1802 (set_designator, process_init_element): Call finish_implicit_inits.
1803
66756373
JJ
18042016-02-11 Jakub Jelinek <jakub@redhat.com>
1805
1806 PR c/69768
1807 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
1808 arguments for -Waddress warning.
1809
1066e9b5
JJ
18102016-02-04 Jakub Jelinek <jakub@redhat.com>
1811
1812 PR c/69669
1813 * c-decl.c (finish_enum): When honoring mode attribute,
1814 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
1815
3a5d2ba4
JJ
18162016-01-29 Jakub Jelinek <jakub@redhat.com>
1817
1818 PR debug/69518
1819 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
1820 all type variants, not just TYPE_MAIN_VARIANT.
1821
cbdd8ae0
JJ
18222016-01-27 Jakub Jelinek <jakub@redhat.com>
1823
1824 PR debug/66869
1825 * c-decl.c (c_write_global_declarations_1): Warn with
1826 warn_unused_function if static prototype without definition
1827 is not C_DECL_USED.
1828
fa74a4bc
MP
18292016-01-27 Marek Polacek <polacek@redhat.com>
1830
1831 PR c/68062
1832 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
1833 to unsigned, if needed. Add -Wsign-compare warning.
1834
13f92e8d
JJ
18352016-01-26 Jakub Jelinek <jakub@redhat.com>
1836
1837 PR tree-optimization/69483
1838 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
1839
cd8e73dc 18402016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
1841
1842 PR c/24293
1843 * c-tree.h (incomplete_record_decls): Declare.
1844 * c-parser.c (incomplete_record_decls): Define.
1845 (c_parser_translation_unit): Iterate through incomplete_record_decls and
1846 report error if any decl has zero size.
1847 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
1848 or enum type to incomplete_record_decls.
1849
e6d6ec9e
TV
18502016-01-14 Tom de Vries <tom@codesourcery.com>
1851
1852 PR tree-optimization/68773
1853 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
1854 set force_output.
1855
00083992
MP
18562016-01-14 Marek Polacek <polacek@redhat.com>
1857
1858 PR c/69262
1859 * c-decl.c (grokdeclarator): Provide more information for invalid
1860 array declarations.
1861
7443cf13
DM
18622016-01-06 David Malcolm <dmalcolm@redhat.com>
1863
1864 * c-parser.c (c_parser_unary_expression): For dereferences, build
1865 a combined location before calling build_indirect_ref, so that
1866 error reports cover the full range, manually updating the c_expr
1867 src_range.
1868
6b131d5b
MP
18692016-01-06 Marek Polacek <polacek@redhat.com>
1870
1871 PR sanitizer/69099
1872 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
1873 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
1874 NULL.
1875
818ab71a
JJ
18762016-01-04 Jakub Jelinek <jakub@redhat.com>
1877
1878 Update copyright years.
1879
2fe0a208
MP
18802016-01-04 Marek Polacek <polacek@redhat.com>
1881
1882 PR c/68908
1883 * c-typeck.c (build_atomic_assign): Improve commentary. Add
1884 optimization to use __atomic_fetch_* built-in if possible.
1885
c7b48c8a
TS
18862015-12-23 Thomas Schwinge <thomas@codesourcery.com>
1887
1888 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
1889 into...
1890 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
1891 all users.
1892
fda5652f
MP
18932015-12-22 Marek Polacek <polacek@redhat.com>
1894
1895 PR c/69002
1896 * c-typeck.c (build_component_ref): Warn when acessing elements of
1897 atomic structures or unions.
1898
745e411d
DM
18992015-12-21 David Malcolm <dmalcolm@redhat.com>
1900
1901 * c-typeck.c: Include "gcc-rich-location.h".
1902 (build_binary_op): In the two places that call binary_op_error,
1903 create a gcc_rich_location and populate it with the location of
1904 the binary op and its two operands.
1905
94c40e19
DM
19062015-12-16 David Malcolm <dmalcolm@redhat.com>
1907
1908 * c-parser.c (c_parser_statement_after_labels): When calling
1909 c_finish_return, Use the return expression's location if it has
1910 one, falling back to the location of the first token within it.
1911 * c-typeck.c (c_finish_return): When issuing warnings about
1912 the incorrect presence/absence of a return value, issue a note
1913 showing the declaration of the function.
1914
de67c4c3
DM
19152015-12-16 David Malcolm <dmalcolm@redhat.com>
1916
1917 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
1918 to 4.
1919 (c_parser_peek_nth_token): New function.
1920 (c_parser_peek_conflict_marker): New function.
1921 (c_parser_error): Detect conflict markers and report them as such.
1922
a10704e1
DM
19232015-12-16 David Malcolm <dmalcolm@redhat.com>
1924
1925 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
1926 to preserve range information for the primary expression
1927 in the call to c_parser_postfix_expression_after_primary.
1928
8062bca6
DM
19292015-12-16 David Malcolm <dmalcolm@redhat.com>
1930
1931 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
1932 expression location, falling back on the first token location,
1933 rather than always using the latter.
1934
d06f8b75
MP
19352015-12-16 Marek Polacek <polacek@redhat.com>
1936
1937 PR c/64637
1938 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
1939 available.
1940
2994fb91
MP
19412015-12-15 Marek Polacek <polacek@redhat.com>
1942
1943 PR c/68907
1944 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
1945 artificial decl.
1946
a1b93f8d
DM
19472015-12-08 David Malcolm <dmalcolm@redhat.com>
1948
1949 * c-parser.c (c_parser_alignof_expression): Capture location of
1950 closing parenthesis (if any), or of end of unary expression, and
1951 use it to build a src_range for the expression.
1952
46c6e1e2
DM
19532015-12-08 David Malcolm <dmalcolm@redhat.com>
1954
1955 PR c/68757
1956 * c-parser.c (c_parser_get_builtin_args): Add
1957 "out_close_paren_loc" param, and write back to it.
1958 (c_parser_postfix_expression): Capture the closing
1959 parenthesis location for RID_CHOOSE_EXPR,
1960 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
1961 RID_BUILTIN_SHUFFLE and use it to set the source range
1962 for such expressions; within RID_BUILTIN_COMPLEX set
1963 the underlying location.
1964
66189108
MP
19652015-12-07 Marek Polacek <polacek@redhat.com>
1966
1967 PR c/68668
1968 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
1969 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
1970
f187980b
EB
19712015-12-04 Eric Botcazou <ebotcazou@adacore.com>
1972
1973 * c-tree.h (c_build_va_arg): Adjust prototype.
1974 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
1975 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
1976 parameter, adjust throughout and issue an error if EXPR is a component
1977 with reverse storage order.
1978
4250754e
JM
19792015-12-02 Jason Merrill <jason@redhat.com>
1980
1981 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
1982 (c_fully_fold_internal, decl_constant_value_for_optimization):
1983 Move from c-common.c.
1984 * c-tree.h: Declare decl_constant_value_for_optimization.
1985 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
1986
e9e32ee6
JM
19872015-12-02 Joseph Myers <joseph@codesourcery.com>
1988
1989 PR c/68162
1990 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
1991 following link from declarator to next declarator. Track original
1992 qualified type and pass it to c_build_qualified_type.
1993 * c-typeck.c (c_build_qualified_type): Add arguments
1994 orig_qual_type and orig_qual_indirect.
1995
ff7a55bf
TS
19962015-12-02 Thomas Schwinge <thomas@codesourcery.com>
1997
1998 * c-parser.c (c_parser_omp_clause_name)
1999 (c_parser_oacc_all_clauses): Alphabetical sorting.
2000
657e4e47
JJ
20012015-12-02 Jakub Jelinek <jakub@redhat.com>
2002
2003 PR c/68533
2004 * c-decl.c (get_parm_info): Use b->locus instead of input_location
2005 for diagnostics.
2006
37d5ad46
JB
20072015-12-01 Julian Brown <julian@codesourcery.com>
2008 Cesar Philippidis <cesar@codesourcery.com>
2009 James Norris <James_Norris@mentor.com>
2010
2011 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
2012 (c_parser_oacc_clause_use_device): New function.
2013 (c_parser_oacc_all_clauses): Add use_device support.
2014 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
2015 (c_parser_oacc_host_data): New function.
2016 (c_parser_omp_construct): Add host_data support.
2017 * c-tree.h (c_finish_oacc_host_data): Add prototype.
2018 * c-typeck.c (c_finish_oacc_host_data): New function.
2019 (c_finish_omp_clauses): Add use_device support.
2020
a4850ce9
JH
20212015-11-29 Jan Hubicka <hubicka@ucw.cz>
2022
2023 PR c/67106
2024 * c-decl.c: Set TYPE_PACKED in variants.
2025
b58d3df2
ML
20262015-11-27 Martin Liska <mliska@suse.cz>
2027
2028 PR c++/68312
2029 * c-array-notation.c (fix_builtin_array_notation_fn):
2030 Use release_vec_vec instead of vec::release.
2031 (build_array_notation_expr): Likewise.
2032 (fix_conditional_array_notations_1): Likewise.
2033 (fix_array_notation_expr): Likewise.
2034 (fix_array_notation_call_expr): Likewise.
2035
aec17bfe
JJ
20362015-11-27 Jakub Jelinek <jakub@redhat.com>
2037
2038 PR c/63326
2039 * c-parser.c (c_parser_compound_statement_nostart): If
2040 last_label is true, use pragma_stmt instead of pragma_compound
2041 as second c_parser_pragma argument.
2042 (c_parser_omp_ordered, c_parser_omp_target_update,
2043 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
2044 false as second argument to c_parser_skip_to_pragma_eol after
2045 diagnosing standalone directives used in pragma_stmt context.
2046
688c4de0
IV
20472015-11-24 Ilya Verbin <ilya.verbin@intel.com>
2048
2049 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
2050 with "if (ENABLE_OFFLOADING)".
2051
cbd03aee
DM
20522015-11-23 David Malcolm <dmalcolm@redhat.com>
2053
2054 PR objc/68438
2055 * c-parser.c (c_parser_postfix_expression): Set up source ranges
2056 for various Objective-C constructs: Class.name syntax,
2057 @selector(), @protocol(), @encode(), and [] message syntax.
2058
a87a86e1
DM
20592015-11-20 David Malcolm <dmalcolm@redhat.com>
2060
2061 PR 62314
2062 * c-typeck.c (should_suggest_deref_p): New function.
2063 (build_component_ref): Special-case POINTER_TYPE when
2064 generating a "not a structure of union" error message, and
2065 suggest a "->" rather than a ".", providing a fix-it hint.
2066
8ece8dfb
DM
20672015-11-19 David Malcolm <dmalcolm@redhat.com>
2068
2069 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
2070 candidate into a new function, find_closest_identifier.
2071
433068cc
MP
20722015-11-19 Marek Polacek <polacek@redhat.com>
2073
2074 PR c/68412
2075 * c-typeck.c (parser_build_binary_op): Properly handle
2076 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
2077
bef08b71
DM
20782015-11-17 David Malcolm <dmalcolm@redhat.com>
2079
2080 * c-parser.c (set_c_expr_source_range): Bulletproof both
2081 overloaded implementations against NULL expr->value.
2082 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
2083 values.
2084 (c_parser_unary_expression): Likewise when handling addresses of
2085 labels.
2086 (c_parser_postfix_expression): Likewise for statement expressions,
2087 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
2088 __builtin_va_arg, and for __builtin_offset_of.
2089 (c_parser_postfix_expression_after_paren_type): Initialize expr's
2090 src_range using the range of the braced initializer.
2091 (c_parser_transaction_expression): Set src_range for "ret" to a
2092 sane pair of values.
2093
fff77217
KY
20942015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
2095
2096 * c-parser.c (c_finish_omp_declare_simd): Look for
2097 "simd" attribute as well. Update error message.
2098
1d899da2
TS
20992015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2100
2101 * c-parser.c (c_parser_omp_declare_target): Adjust.
2102
e4606348
JJ
21032015-11-14 Jakub Jelinek <jakub@redhat.com>
2104
2105 * c-typeck.c (c_finish_omp_clauses): Don't mark
2106 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
2107
3e636daf
MP
21082015-11-14 Marek Polacek <polacek@redhat.com>
2109
2110 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
2111 * c-typeck.c: Likewise.
2112
ebedc9a3
DM
21132015-11-13 David Malcolm <dmalcolm@redhat.com>
2114
2115 * c-decl.c (warn_defaults_to): Pass line_table to
2116 rich_location ctor.
2117 * c-errors.c (pedwarn_c99): Likewise.
2118 (pedwarn_c90): Likewise.
2119 * c-parser.c (set_c_expr_source_range): New functions.
2120 (c_token::get_range): New method.
2121 (c_token::get_finish): New method.
2122 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
2123 based on the range from the start of the LHS to the end of the
2124 RHS.
2125 (c_parser_conditional_expression): Likewise, based on the range
2126 from the start of the cond.value to the end of exp2.value.
2127 (c_parser_binary_expression): Call set_c_expr_source_range on
2128 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
2129 (c_parser_cast_expression): Call set_c_expr_source_range on ret
2130 based on the cast_loc through to the end of the expr.
2131 (c_parser_unary_expression): Likewise, based on the
2132 op_loc through to the end of op.
2133 (c_parser_sizeof_expression) Likewise, based on the start of the
2134 sizeof token through to either the closing paren or the end of
2135 expr.
2136 (c_parser_postfix_expression): Likewise, using the token range,
2137 or from the open paren through to the close paren for
2138 parenthesized expressions.
2139 (c_parser_postfix_expression_after_primary): Likewise, for
2140 various kinds of expression.
2141 * c-tree.h (struct c_expr): Add field "src_range".
2142 (c_expr::get_start): New method.
2143 (c_expr::get_finish): New method.
2144 (set_c_expr_source_range): New decls.
2145 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
2146 on ret for prefix unary ops.
2147 (parser_build_binary_op): Likewise, running from the start of
2148 arg1.value through to the end of arg2.value.
2149
ec8b536f
MP
21502015-11-13 Marek Polacek <polacek@redhat.com>
2151
2152 PR c/68320
2153 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
2154
277fe616
DM
21552015-11-13 David Malcolm <dmalcolm@redhat.com>
2156
2157 * c-typeck.c: Include spellcheck.h.
2158 (lookup_field_fuzzy_find_candidates): New function.
2159 (lookup_field_fuzzy): New function.
2160 (build_component_ref): If the field was not found, try using
2161 lookup_field_fuzzy and potentially offer a suggestion.
2162
6e232ba4
JN
21632015-11-12 James Norris <jnorris@codesourcery.com>
2164 Joseph Myers <joseph@codesourcery.com>
2165
2166 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
2167 (c_parser_omp_clause_name): Handle 'device_resident' clause.
2168 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
2169 and PRAGMA_OMP_CLAUSE_LINK.
2170 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
2171 and PRAGMA_OACC_CLAUSE_LINK.
2172 (OACC_DECLARE_CLAUSE_MASK): New definition.
2173 (c_parser_oacc_declare): New function.
2174
9be4f715
MP
21752015-11-12 Marek Polacek <polacek@redhat.com>
2176
2177 PR c/67784
2178 * c-parser.c (c_parser_for_statement): Reclassify the token in
2179 a correct scope.
2180
e78bede6
MP
21812015-11-11 Marek Polacek <polacek@redhat.com>
2182
2183 PR c/68107
2184 PR c++/68266
2185 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
2186 checking the size of an array.
2187
69f293c9
AM
21882015-11-11 Andrew MacLeod <amacleod@redhat.com>
2189
2190 * c-array-notation.c: Remove unused header files.
2191 * c-aux-info.c: Likewise.
2192 * c-convert.c: Likewise.
2193 * c-decl.c: Likewise.
2194 * c-errors.c: Likewise.
2195 * c-lang.c: Likewise.
2196 * c-objc-common.c: Likewise.
2197 * c-parser.c: Likewise.
2198 * c-typeck.c: Likewise.
2199 * gccspec.c: Likewise.
2200
3a40d81d
NS
22012015-11-09 Thomas Schwinge <thomas@codesourcery.com>
2202 Cesar Philippidis <cesar@codesourcery.com>
2203 James Norris <jnorris@codesourcery.com>
2204 Julian Brown <julian@codesourcery.com>
2205 Nathan Sidwell <nathan@codesourcery.com>
2206
2207 c/
2208 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
2209 routine arg.
2210 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
2211 (c_parser_pragma): Parse 'acc routine'.
2212 (OACC_ROUTINE_CLAUSE_MARK): Define.
2213 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
2214
fc402eec
AA
22152015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
2216
2217 PR debug/67192
2218 * c-typeck.c (c_finish_loop): For unconditional loops, set the
2219 location of the backward-goto to the start of the loop body.
2220
f6b0b3db
AA
22212015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
2222
2223 PR debug/67192
2224 * c-parser.c (c_parser_while_statement): Finish the loop before
2225 parsing ahead for misleading indentation.
2226 (c_parser_for_statement): Likewise.
2227
ee45a32d
EB
22282015-11-08 Eric Botcazou <ebotcazou@adacore.com>
2229
2230 * c-decl.c (finish_struct): If the structure has reverse storage
2231 order, rewrite the type of array fields with scalar component. Call
2232 maybe_apply_pragma_scalar_storage_order on entry.
2233 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
2234 errors on bit-fields and reverse SSO here and not...
2235 (c_mark_addressable): ...here.
2236 (output_init_element): Adjust call to initializer_constant_valid_p.
2237 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
2238
8a645150
DM
22392015-11-06 David Malcolm <dmalcolm@redhat.com>
2240
2241 * c-decl.c (warn_defaults_to): Update for change in signature
2242 of diagnostic_set_info.
2243 * c-errors.c (pedwarn_c99): Likewise.
2244 (pedwarn_c90): Likewise.
2245 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
2246 for textinfo::set_location.
2247
7a5e4956
CP
22482015-11-05 Cesar Philippidis <cesar@codesourcery.com>
2249 Thomas Schwinge <thomas@codesourcery.com>
2250 James Norris <jnorris@codesourcery.com>
2251
2252 * c-parser.c (c_parser_omp_clause_name): Add support for
2253 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
2254 (c_parser_omp_clause_default): Add is_oacc argument. Handle
2255 default(none) in OpenACC.
2256 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
2257 arguments.
2258 (c_parser_oacc_clause_tile): New function.
2259 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
2260 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
2261 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
2262 TILE}.
2263 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
2264 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
2265 FIRSTPRIVATE}.
2266 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
2267 (c_parser_oacc_update): Update the error message for missing clauses.
2268 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
2269 and OMP_CLAUSE_INDEPENDENT.
2270
bfcfbfa0
MP
22712015-11-05 Marek Polacek <polacek@redhat.com>
2272
2273 PR c/68090
2274 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
2275 deal with pre-evaluation on invalid types.
2276
e01d41e5
JJ
22772015-11-05 Jakub Jelinek <jakub@redhat.com>
2278 Ilya Verbin <ilya.verbin@intel.com>
2279
2280 * c-parser.c: Include context.h and gimple-expr.h.
2281 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
2282 monotonic together with nonmonotonic.
2283 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
2284 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
2285 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
2286 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
2287 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
2288 expressions on combined target teams before the target.
2289 (c_parser_omp_declare_target): If decl has "omp declare target" or
2290 "omp declare target link" attribute, and cgraph or varpool node already
2291 exists, then set corresponding flags. Call c_finish_omp_clauses
2292 in the parenthesized extended-list syntax case.
2293 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
2294 declare target.
2295 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
2296 on OMP_CLAUSE_REDUCTION array sections.
2297 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
2298 into the constant offset, or for variable low-bound using
2299 POINTER_PLUS_EXPR. For structure element based array sections use
2300 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
2301 (c_finish_omp_clauses): Drop generic_field_head, structure
2302 elements are now always mapped even as array section bases,
2303 diagnose same var in data sharing and mapping clauses. Diagnose if
2304 linear step on declare simd is neither a constant nor a uniform
2305 parameter. Look through POINTER_PLUS_EXPR for array section
2306 reductions. Diagnose the same var or function appearing multiple
2307 times on the same directive. Fix up wording for the to clause if t
2308 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
2309 modifier on kinds other than dynamic or guided or nonmonotonic
2310 modifier together with ordered clause.
2311
4bf9e5a8
TS
23122015-11-03 Thomas Schwinge <thomas@codesourcery.com>
2313 Chung-Lin Tang <cltang@codesourcery.com>
2314
2315 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
2316
2adfab87
AM
23172015-10-29 Andrew MacLeod <amacleod@redhat.com>
2318
2319 * c-array-notation.c: Reorder #include's and remove duplicates.
2320 * c-aux-info.c: Likewise.
2321 * c-convert.c: Likewise.
2322 * c-decl.c: Likewise.
2323 * c-errors.c: Likewise.
2324 * c-lang.c: Likewise.
2325 * c-objc-common.c: Likewise.
2326 * c-parser.c: Likewise.
2327 * c-typeck.c: Likewise.
2328
e922069e
JW
23292015-10-26 Jim Wilson <jim.wilson@linaro.org>
2330
2331 PR debug/66068
2332 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
2333 after calling build_qualified_type.
2334
765dd391
CP
23352015-10-27 Cesar Philippidis <cesar@codesourcery.com>
2336 Thomas Schwinge <thomas@codesourcery.com>
2337 James Norris <jnorris@codesourcery.com>
2338 Joseph Myers <joseph@codesourcery.com>
2339 Julian Brown <julian@codesourcery.com>
2340 Bernd Schmidt <bschmidt@redhat.com>
2341
2342 * c-parser.c (c_parser_oacc_shape_clause): New.
2343 (c_parser_oacc_simple_clause): New.
2344 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
2345 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
2346
88bae6f4
TS
23472015-10-27 Thomas Schwinge <thomas@codesourcery.com>
2348 James Norris <jnorris@codesourcery.com>
2349 Cesar Philippidis <cesar@codesourcery.com>
2350
2351 PR c/64765
2352 PR c/64880
2353 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
2354 parameters, and handle these. Adjust all users.
2355 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
2356 into...
2357 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
2358 all users.
2359 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
2360 declare functions.
2361 (c_finish_omp_construct): Declare function.
2362 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
2363 Merge functions into...
2364 (c_finish_omp_construct): ... this new function.
2365
a8fc2579
RB
23662015-10-22 Richard Biener <rguenther@suse.de>
2367
2368 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
2369 before folding a MINUS_EXPR.
2370
e9122ef6
MP
23712015-10-21 Marek Polacek <polacek@redhat.com>
2372
2373 PR c/68024
2374 * c-decl.c (start_function): Warn about vararg functions without
2375 a prototype.
2376
9f47c7e5
IE
23772015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
2378
2379 * c-typeck.c (build_conditional_expr): Use boolean vector
2380 type for vector comparison.
2381 (build_vec_cmp): New.
2382 (build_binary_op): Use build_vec_cmp for comparison.
2383
fa60eeb9
MP
23842015-10-20 Marek Polacek <polacek@redhat.com>
2385
2386 * c-parser.c (is_cilkplus_vector_p): Don't define here.
2387
2c7020eb
MP
23882015-10-20 Marek Polacek <polacek@redhat.com>
2389
2390 PR c/67964
2391 * c-parser.c (c_parser_attributes): Break out of the loop if the
2392 token after an attribute isn't a comma.
2393
d9a6bd32
JJ
23942015-10-13 Jakub Jelinek <jakub@redhat.com>
2395 Aldy Hernandez <aldyh@redhat.com>
2396
2397 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
2398 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
2399 (c_parser_omp_variable_list): Handle structure elements for
2400 map, to and from clauses. Handle array sections in reduction
2401 clause. Formatting fixes.
2402 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
2403 if clause modifiers.
2404 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
2405 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
2406 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
2407 c_parser_omp_clause_is_device_ptr): New functions.
2408 (c_parser_omp_clause_ordered): Parse optional parameter.
2409 (c_parser_omp_clause_reduction): Handle array reductions.
2410 (c_parser_omp_clause_schedule): Parse optional simd modifier.
2411 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
2412 functions.
2413 (c_parser_omp_clause_linear): Parse linear clause modifiers.
2414 (c_parser_omp_clause_depend_sink): New function.
2415 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
2416 (c_parser_omp_clause_map): Parse release/delete map kinds and
2417 optional always modifier.
2418 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
2419 and c_finish_omp_clauses callers.
2420 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
2421 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
2422 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
2423 (OMP_CRITICAL_CLAUSE_MASK): Define.
2424 (c_parser_omp_critical): Parse critical clauses.
2425 (c_parser_omp_for_loop): Handle doacross loops, adjust
2426 c_finish_omp_for and c_finish_omp_clauses callers.
2427 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
2428 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
2429 (OMP_FOR_CLAUSE_MASK): Add linear clause.
2430 (c_parser_omp_for): Disallow ordered clause when combined with
2431 distribute. Disallow linear clause when combined with distribute
2432 and not combined with simd.
2433 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
2434 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
2435 parse clauses and if depend clause is found, don't parse a body.
2436 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
2437 Allow target parallel without for after it.
2438 (OMP_TASK_CLAUSE_MASK): Add priority clause.
2439 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
2440 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
2441 invalid kinds.
2442 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
2443 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
2444 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
2445 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
2446 functions.
2447 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
2448 defaultmap and is_device_ptr clauses.
2449 (c_parser_omp_target): Parse target parallel and target simd. Set
2450 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
2451 and target exit data. Diagnose invalid map kinds.
2452 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
2453 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
2454 construct.
2455 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
2456 &omp_priv.
2457 (OMP_TASKLOOP_CLAUSE_MASK): Define.
2458 (c_parser_omp_taskloop): New function.
2459 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
2460 handle PRAGMA_OMP_TASKLOOP.
2461 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
2462 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
2463 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
2464 Add IS_OMP argument, handle structure element bases, diagnose
2465 bitfields, pass IS_OMP recursively, diagnose known zero length
2466 array sections in depend clauses, handle array sections in reduction
2467 clause, diagnose negative length even for pointers.
2468 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
2469 types, pass IS_OMP down to handle_omp_array_sections_1, handle
2470 array sections in reduction clause, set
2471 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
2472 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
2473 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
2474 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
2475
21ba0cea
MP
24762015-10-06 Marek Polacek <polacek@redhat.com>
2477
2478 * c-parser.c (c_parser_statement_after_labels): Use
2479 protected_set_expr_location.
2480 (c_parser_omp_clause_num_gangs): Likewise.
2481 (c_parser_omp_clause_num_threads): Likewise.
2482 (c_parser_omp_clause_num_workers): Likewise.
2483 (c_parser_omp_clause_vector_length): Likewise.
2484 (c_parser_omp_clause_num_teams): Likewise.
2485 (c_parser_omp_clause_thread_limit): Likewise.
2486 * c-typeck.c (build_c_cast): Likewise.
2487 (c_cast_expr): Likewise.
2488
624d31fe
RS
24892015-10-05 Richard Sandiford <richard.sandiford@arm.com>
2490
2491 * c-typeck.c (c_tree_equal): Use real_equal instead of
2492 REAL_VALUES_EQUAL.
2493
b8fd7909
JM
24942015-10-04 Jason Merrill <jason@redhat.com>
2495
2496 * c-parser.c (c_lex_one_token): Handle @synchronized.
2497 * c-decl.c (match_builtin_function_types): A declaration of a built-in
2498 can change whether the function is transaction_safe.
2499
1c7485af
MP
25002015-10-02 Marek Polacek <polacek@redhat.com>
2501
2502 PR c/67730
2503 * c-typeck.c (convert_for_assignment): Use the expansion point
2504 location throughout.
2505
3e3b8d63
MP
25062015-10-02 Marek Polacek <polacek@redhat.com>
2507
2508 PR c/64249
2509 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
2510 and pass it down to c_parser_if_statement.
2511 (c_parser_else_body): Add CHAIN parameter and pass it down to
2512 c_parser_statement_after_labels.
2513 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
2514 duplicated if-else-if conditions.
2515
aabef2de
MP
25162015-10-01 Marek Polacek <polacek@redhat.com>
2517
2518 * c-typeck.c (convert_for_assignment): Improve commentary.
2519
de8ddd5f
MP
25202015-09-30 Marek Polacek <polacek@redhat.com>
2521
2522 PR c/67730
2523 * c-typeck.c (c_finish_return): Use the expansion point location for
2524 certain "return with value" warnings.
2525
c4914de6
MLI
25262015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
2527
2528 * c-parser.c (pragma_lex): Add loc argument.
2529
0e36f5c7
MP
25302015-09-15 Marek Polacek <polacek@redhat.com>
2531
2532 PR c/67580
2533 * c-decl.c (tag_exists_p): New function.
2534 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
2535 struct/union/enum keywords are missing.
2536 * c-tree.h (tag_exists_p): Declare.
2537
2f3bb934
MP
25382015-09-15 Marek Polacek <polacek@redhat.com>
2539
2540 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
2541 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
2542 Return NULL_TREE instead of 0.
2543 (lookup_name): Return NULL_TREE instead of 0.
2544 (lookup_name_in_scope): Likewise.
2545 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
2546 (parser_xref_tag): Use false instead of 0.
2547 (start_struct): Use true instead of 1.
2548 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
2549
aa256c4a
MP
25502015-09-14 Marek Polacek <polacek@redhat.com>
2551
2552 * c-typeck.c (set_nonincremental_init_from_string): Use
2553 HOST_WIDE_INT_M1U when shifting a negative value.
2554
dbb68221
MW
25552015-09-09 Mark Wielaard <mjw@redhat.com>
2556
2557 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
2558 parm against NULL.
2559
a8a098ac
JJ
25602015-09-10 Jakub Jelinek <jakub@redhat.com>
2561
2562 PR c/67502
2563 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
2564 into OMP_FOR_PRE_BODY rather than before the loop.
2565
f4b189d5
JJ
25662015-09-09 Jakub Jelinek <jakub@redhat.com>
2567
0bb99c11
JJ
2568 PR c/67501
2569 * c-parser.c (c_parser_oacc_all_clauses,
2570 c_parser_omp_all_clauses): Remove invalid clause from
2571 list of clauses even if parser->error is set.
2572
fce5e5e3
JJ
2573 PR c/67500
2574 * c-parser.c (c_parser_omp_clause_aligned,
2575 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
2576 test for errors.
2577 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
2578 error_mark_node.
2579
f4b189d5
JJ
2580 PR c/67495
2581 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
2582 instead of c_parser_unary_expression. If the result is !lvalue_p,
2583 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
2584
b2aaf235
MP
25852015-09-04 Marek Polacek <polacek@redhat.com>
2586
2587 PR sanitizer/67279
2588 * c-typeck.c (build_binary_op): Don't instrument static initializers.
2589
1807ffc1
MS
25902015-09-03 Martin Sebor <msebor@redhat.com>
2591
2592 PR c/66516
8b652e65
JJ
2593 * c-typeck.c (convert_arguments, parser_build_unary_op,
2594 build_conditional_expr, c_cast_expr, convert_for_assignment,
2595 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
2596 reject_gcc_builtin.
2597 (c_decl_implicit): Define.
2598
d04ff417
MP
25992015-09-02 Marek Polacek <polacek@redhat.com>
2600
2601 PR c/67432
2602 * c-parser.c (c_parser_enum_specifier): Give a better error for
2603 an empty enum.
2604
a79683d5
TS
26052015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
2606
2607 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
2608
191a6b94
MP
26092015-08-12 Marek Polacek <polacek@redhat.com>
2610
2611 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
2612 LOC to it.
2613
420a9d9b
MP
26142015-08-03 Marek Polacek <polacek@redhat.com>
2615
2616 PR c/67088
2617 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
2618 Use it.
2619 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
2620
992118a1
PP
26212015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
2622
2623 * c-parser.c (c_parser_if_body): Take token_indent_info
2624 argument. Call warn_for_misleading_indentation even when the
2625 body is a semicolon. Extract token_indent_infos corresponding
2626 to the guard, body and next tokens. Adjust call to
2627 warn_for_misleading_indentation accordingly.
2628 (c_parser_else_body): Likewise.
2629 (c_parser_if_statement): Likewise.
2630 (c_parser_while_statement): Likewise.
2631 (c_parser_for_statement): Likewise.
2632
46308474
LFSM
26332015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
2634 Manuel López-Ibáñez <manu@gcc.gnu.org>
2635
2636 * c-decl.c (get_parm_info): Remove static var. Update warning
2637 message.
2638
05b28fd6
MP
26392015-07-27 Marek Polacek <polacek@redhat.com>
2640
2641 PR c++/66555
2642 PR c/54979
2643 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
2644
451b5e48
MP
26452015-07-20 Marek Polacek <polacek@redhat.com>
2646
2647 PR c++/55095
2648 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
2649 (build_binary_op): Warn about left shift overflows.
2650
1916bcb5
AM
26512015-07-09 Andrew MacLeod <amacleod@redhat.com>
2652
2653 * c-array-notation.c: Adjust includes for flags.h changes.
2654 * c-objc-common.c: Likewise.
2655
c7131fb2
AM
26562015-07-07 Andrew MacLeod <amacleod@redhat.com>
2657
2658 * c-array-notation.c: Adjust includes.
2659 * c-aux-info.c: Likewise.
2660 * c-convert.c: Likewise.
2661 * c-decl.c: Likewise.
2662 * c-errors.c: Likewise.
2663 * c-lang.c: Likewise.
2664 * c-objc-common.c: Likewise.
2665 * c-parser.c: Likewise.
2666 * c-typeck.c: Likewise.
2667
da2e71c9
MLI
26682015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
2669
2670 PR fortran/66605
2671 * c-decl.c (finish_function): Call do_warn_unused_parameter.
2672
b155cfd9
MP
26732015-06-29 Marek Polacek <polacek@redhat.com>
2674
2675 PR c/66322
2676 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
2677 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
2678 about -Wswitch-bool here.
2679 (do_case): Update c_add_case_label call.
2680 (c_finish_case): Update c_do_switch_warnings call.
2681
31521951
MP
26822015-06-27 Marek Polacek <polacek@redhat.com>
2683
2684 * c-typeck.c: Use VECTOR_TYPE_P throughout.
2685
22d03525
MP
26862015-06-26 Marek Polacek <polacek@redhat.com>
2687
2688 * c-array-notation.c (fix_builtin_array_notation_fn): Use
2689 INDIRECT_REF_P.
2690 * c-typeck.c (array_to_pointer_conversion): Likewise.
2691 (build_unary_op): Likewise.
2692 (c_finish_return): Likewise.
2693
f0889939
AM
26942015-06-25 Andrew MacLeod <amacleod@redhat.com>
2695
2696 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
2697 * c-parser.c: Likewise.
2698
8d67ee55
RS
26992015-06-25 Richard Sandiford <richard.sandiford@arm.com>
2700
2701 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
2702 instead of pointer_hash.
2703 (detect_field_duplicates): Likewise.
2704
0ae9bd27
MP
27052015-06-25 Marek Polacek <polacek@redhat.com>
2706
2707 * c-array-notation.c: Use VAR_P throughout.
2708 * c-decl.c: Likewise.
2709 * c-objc-common.c: Likewise.
2710 * c-parser.c: Likewise.
2711 * c-typeck.c: Likewise.
2712
62f9079a
MP
27132015-06-25 Marek Polacek <polacek@redhat.com>
2714
2715 * c-decl.c: Use is_global_var throughout.
2716 * c-parser.c: Likewise.
2717 * c-typeck.c: Likewise.
2718
abb226c9
AM
27192015-06-17 Andrew MacLeod <amacleod@redhat.com>
2720
2721 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
2722 * c-aux-info.c: Likewise.
2723 * c-convert.c: Likewise.
2724 * c-decl.c: Likewise.
2725 * c-errors.c: Likewise.
2726 * c-lang.c: Likewise.
2727 * c-objc-common.c: Likewise.
2728 * c-parser.c: Likewise.
2729 * c-typeck.c: Likewise.
2730
8cbababc
JH
27312015-06-11 Jan Hubicka <hubicka@ucw.cz>
2732
2733 PR middle-end/66325
2734 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
2735 variants.
2736
a0349665
PMR
27372015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
2738
2739 * c-decl.c (pop_scope): Register the main translation unit
2740 through the new debug hook.
2741
13fdf2e2
AM
27422015-06-08 Andrew MacLeod <amacleod@redhat.com>
2743
2744 * c-array-notation.c : Adjust include files.
2745 * c-aux-info.c : Likewise.
2746 * c-convert.c : Likewise.
2747 * c-decl.c : Likewise.
2748 * c-errors.c : Likewise.
2749 * c-lang.c : Likewise.
2750 * c-lang.h : Likewise.
2751 * c-objc-common.c : Likewise.
2752 * c-parser.c : Likewise.
2753 * c-typeck.c : Likewise.
2754
d7438551
AH
27552015-06-05 Aldy Hernandez <aldyh@redhat.com>
2756
2757 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
2758 immediately clobber it.
2759 (c_write_global_declarations_1): Remove call to
2760 check_global_declaration_1.
2761 (c_write_global_declarations_2): Remove.
2762 (c_write_final_cleanups): Rename from c_write_global_declarations.
2763 Remove call to finalize_compilation_unit.
2764 Remove calls to debugging hooks.
2765 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
2766 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
2767 * c-tree.h: Remove c_write_global_declarations.
2768
ecb9f223
AM
27692015-06-04 Andrew MacLeod <amacleod@redhat.com>
2770
2771 * c-array-notation.c: Adjust includes for restructured coretypes.h.
2772 * c-aux-info.c: Likewise.
2773 * c-convert.c: Likewise.
2774 * c-decl.c: Likewise.
2775 * c-errors.c: Likewise.
2776 * c-lang.c: Likewise.
2777 * c-objc-common.c: Likewise.
2778 * c-parser.c: Likewise.
2779 * c-typeck.c: Likewise.
2780
9482b620
MP
27812015-06-04 Marek Polacek <polacek@redhat.com>
2782
2783 PR c/66341
2784 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
2785 it is a lvalue.
2786
bc51ace3
PK
27872015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2788
2789 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
2790 Warn for empty struct.
2791 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
2792
ea5b45b6
AT
27932015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
2794
2795 * c-decl.c (start_function): Call plugin before parsing.
2796 (finish_function): Call plugin after parsing.
2797
c2d47482
PK
27982015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2799
2800 PR c/49551
2801 * c-decl.c (merge_decls): Merge DECL_COMMON.
2802
a95492ab
JW
28032015-05-22 Jim Wilson <jim.wilson@linaro.org>
2804
2805 * Make-lang.in (check_gcc_pallelize): Define.
2806
fd5c817a
MP
28072015-05-22 Marek Polacek <polacek@redhat.com>
2808
2809 PR c/47043
2810 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
2811 attributes.
2812
c7b70a3c
MP
28132015-05-21 Marek Polacek <polacek@redhat.com>
2814
2815 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
2816 DECL_BUILT_IN.
2817
21b634ae
MP
28182015-05-20 Marek Polacek <polacek@redhat.com>
2819
2820 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
2821 * c-typeck.c: Likewise.
2822
296a8c2f
MP
28232015-05-19 Marek Polacek <polacek@redhat.com>
2824
2825 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
2826
41b37d5e
JJ
28272015-05-19 Jakub Jelinek <jakub@redhat.com>
2828
2829 PR middle-end/66199
2830 * c-parser.c (c_parser_omp_for_loop): Don't add
2831 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
2832 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
2833 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
2834 constructs.
2835
fab27f52
MM
28362015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
2837
2838 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 2839 swaps.
fab27f52 2840
40de31cf
MLI
28412015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
2842
2843 PR fortran/44054
2844 * c-objc-common.c (c_tree_printer): Replace locus pointer with
2845 accessor function.
2846
3aa3c9fc
MP
28472015-05-14 Marek Polacek <polacek@redhat.com>
2848
2849 PR c/66066
2850 PR c/66127
2851 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
2852 rather than with 0.
2853
c3388e62
DM
28542015-05-12 David Malcolm <dmalcolm@redhat.com>
2855
2856 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
2857 to add a call to warn_for_misleading_indentation.
2858 (c_parser_else_body): Likewise, adding param "else_loc".
2859 (c_parser_if_statement): Check for misleading indentation.
2860 (c_parser_while_statement): Likewise.
2861 (c_parser_for_statement): Likewise.
2862
755e528f
MP
28632015-05-08 Marek Polacek <polacek@redhat.com>
2864
2865 PR c/64918
2866 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
2867 (output_init_element): Likewise.
2868
0173bd2a
MP
28692015-05-07 Marek Polacek <polacek@redhat.com>
2870
2871 PR c/65179
2872 * c-typeck.c (build_binary_op): Warn when left shifting a negative
2873 value.
2874
9babc352
MP
28752015-04-30 Marek Polacek <polacek@redhat.com>
2876
2877 * c-typeck.c (set_init_label): Call error_at instead of error and
2878 pass LOC to it.
2879
ac9f18db
MP
2880 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
2881 the type of a decl.
2882
ec3fba51
MP
2883 * c-typeck.c (c_build_va_arg): Clarify the error message.
2884
b811915d
TS
28852015-04-29 Thomas Schwinge <thomas@codesourcery.com>
2886
2887 * c-parser.c (c_parser_oacc_enter_exit_data): Use
2888 OMP_STANDALONE_CLAUSES.
2889
f3075008
MP
28902015-04-28 Marek Polacek <polacek@redhat.com>
2891
2892 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
2893
4e81b788
MP
28942015-04-28 Marek Polacek <polacek@redhat.com>
2895
2896 PR c/65901
2897 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
2898
6c1db78e
MP
28992015-04-25 Marek Polacek <polacek@redhat.com>
2900
2901 PR c/52085
2902 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
2903 attribute.
2904
5c4abbb8
MP
29052015-04-23 Marek Polacek <polacek@redhat.com>
2906
2907 PR c/65345
2908 * c-decl.c (set_labels_context_r): New function.
2909 (store_parm_decls): Call it via walk_tree_without_duplicates.
2910 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
2911 instead of create_tmp_var. Build TARGET_EXPR instead of
2912 COMPOUND_EXPR.
2913 (build_atomic_assign): Use create_tmp_var_raw instead of
2914 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
2915
06aca1d5
IV
29162015-04-20 Ilya Verbin <ilya.verbin@intel.com>
2917
2918 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
2919 (c_parser_omp_target_update): Add missed %> to error_at ().
2920
8fba1830
BRF
29212015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
2922
2923 PR target/55143
2924 * c-decl.c (c_default_pointer_mode): Remove definition.
2925 * c-tree.h (c_default_pointer_mode): Remove declaration.
2926
62021f64
TB
29272015-03-27 Tobias Burnus <burnus@net-b.de>
2928
2929 PR c/65586
2930 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
2931 error out.
2932 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
2933 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
2934 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
2935
9b65e171
JJ
29362015-03-19 Jakub Jelinek <jakub@redhat.com>
2937
2938 * c-decl.c (c_decl_attributes): Also add "omp declare target"
2939 attribute for DECL_EXTERNAL VAR_DECLs.
2940
17958621
JJ
29412015-03-11 Jakub Jelinek <jakub@redhat.com>
2942
2943 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
2944 argument.
2945
7ccb1a11
JJ
29462015-03-10 Jakub Jelinek <jakub@redhat.com>
2947
2948 PR c/65120
2949 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
2950 before preparing arguments to warn_logical_not_parentheses.
2951
01177669
JJ
29522015-03-09 Jakub Jelinek <jakub@redhat.com>
2953
2954 PR c/65120
2955 * c-typeck.c (parser_build_binary_op): Don't warn for
2956 !!x == y or !b == y where b is _Bool.
2957
802ac282
MP
29582015-03-09 Marek Polacek <polacek@redhat.com>
2959
2960 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
2961 * c-decl.c (grokdeclarator): Likewise.
2962 * c-typeck.c (build_binary_op): Likewise.
2963
e5165b60
MP
29642015-02-27 Marek Polacek <polacek@redhat.com>
2965
2966 PR c/65228
2967 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
2968
065d214c
MP
29692015-02-14 Marek Polacek <polacek@redhat.com>
2970
2971 PR c/64768
2972 * c-decl.c (grokdeclarator): Set the range of a flexible array member
2973 declared through a typedef name.
2974
e5d9235b
MP
29752015-02-13 Marek Polacek <polacek@redhat.com>
2976
2977 PR c/65050
2978 * c-decl.c (grokdeclarator): Print also the type when giving
2979 the error message about array's incomplete element type.
2980
fa01ffcc
JJ
29812015-02-11 Jakub Jelinek <jakub@redhat.com>
2982
2983 PR c/64824
2984 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
2985 check in the POP macro.
2986
c3e38a03
MP
29872015-02-09 Marek Polacek <polacek@redhat.com>
2988
2989 PR c/64856
2990 * c-typeck.c (process_init_element): Don't always wrap
2991 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
2992 initializing a range of elements.
2993
4886ec8e
JJ
29942015-02-04 Jakub Jelinek <jakub@redhat.com>
2995
2996 PR c/64824
2997 PR c/64868
2998 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
2999
c3e38a03 30002015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
3001
3002 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
3003 processing enum declaration.
3004
7b33f0c8
MP
30052015-01-29 Marek Polacek <polacek@redhat.com>
3006
3007 PR c/64709
3008 * c-typeck.c (pop_init_level): If constructor_elements has
3009 exactly one element with integer_zerop value, set constructor_zeroinit
3010 to 1. Remove braces around warning_init call.
3011
dea63e49
JJ
30122015-01-27 Jakub Jelinek <jakub@redhat.com>
3013
3014 PR c/64766
3015 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
3016 of FUNCTION_DECLs with error_mark_node.
3017
d38f7dce
JJ
30182015-01-26 Jakub Jelinek <jakub@redhat.com>
3019
3020 PR c/64778
3021 * c-typeck.c (convert_arguments): Return -1 if there are
3022 error_args, even if we've diagnosed too many arguments.
3023
cbf5d0e7
RB
30242015-01-21 Richard Biener <rguenther@suse.de>
3025
3026 PR middle-end/64313
3027 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
3028 for builtins the user declared correctly.
3029
41dbbb37
TS
30302015-01-15 Thomas Schwinge <thomas@codesourcery.com>
3031 Bernd Schmidt <bernds@codesourcery.com>
3032 Cesar Philippidis <cesar@codesourcery.com>
3033 James Norris <jnorris@codesourcery.com>
3034 Jakub Jelinek <jakub@redhat.com>
3035 Ilmir Usmanov <i.usmanov@samsung.com>
3036
3037 * c-parser.c: Include "gomp-constants.h".
3038 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
3039 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
3040 Use OMP_CLAUSE_SET_MAP_KIND.
3041 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
3042 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
3043 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
3044 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
3045 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
3046 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
3047 "copyout", "create", "delete", "deviceptr", "gang", "host",
3048 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
3049 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
3050 "present_or_create", "pcreate", "seq", "self", "vector",
3051 "vector_length", "wait", "worker".
3052 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
3053 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
3054 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
3055 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
3056 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
3057 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
3058 (c_parser_oacc_data_clause_deviceptr)
3059 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
3060 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
3061 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
3062 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
3063 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
3064 (c_parser_oacc_parallel, c_parser_oacc_update)
3065 (c_parser_oacc_wait): New functions.
3066 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
3067 (c_finish_oacc_data): New prototypes.
3068 * c-typeck.c: Include "gomp-constants.h".
3069 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
3070 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
3071 OMP_CLAUSE_SET_MAP_KIND.
3072 (c_finish_oacc_parallel, c_finish_oacc_kernels)
3073 (c_finish_oacc_data): New functions.
3074 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
3075 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
3076 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
3077 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
3078 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
3079 GOMP_MAP_FORCE_DEVICEPTR.
3080
adfac8df
JJ
30812015-01-09 Michael Collison <michael.collison@linaro.org>
3082
3083 * c-array-notation.c: Include hash-set.h, machmode.h,
3084 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3085 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
3086 * c-aux-info.c: Ditto.
3087 * c-convert.c: Ditto.
3088 * c-decl.c: Ditto.
3089 * c-errors.c: Ditto.
3090 * c-lang.c: Dittoxs.
3091 * c-objc-common.c: Ditto.
3092 * c-parser.c: Ditto.
3093 * c-typeck.c: Include hash-set.h, machmode.h,
3094 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3095 fold-const.h, wide-int.h, inchash.h, real.h and
3096 fixed-value.h due to flattening of tree.h.
3097
2cc901dc
MP
30982015-01-07 Marek Polacek <polacek@redhat.com>
3099
3100 PR c/64417
3101 * c-typeck.c (process_init_element): Disallow initialization of
3102 a flexible array member with a string constant if the structure
3103 is in an array.
3104
5624e564
JJ
31052015-01-05 Jakub Jelinek <jakub@redhat.com>
3106
e5341100
JJ
3107 PR sanitizer/64344
3108 * c-typeck.c (convert_for_assignment, c_finish_return): For
3109 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
3110 types also set in_late_binary_op around convert call.
3111 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
3112 to integral type casts, if not in_late_binary_op, pass c_fully_fold
3113 result on expr as last argument to ubsan_instrument_float_cast,
3114 if in_late_binary_op, don't use c_save_expr but save_expr.
3115
5624e564
JJ
3116 Update copyright years.
3117
5bd012f8
MP
31182015-01-05 Marek Polacek <polacek@redhat.com>
3119
3120 PR c/64423
3121 * c-typeck.c (build_array_ref): Pass loc down to
3122 warn_array_subscript_with_type_char.
3123
3f8257db 31242014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
3125
3126 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 3127 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 3128 element type.
8e745a17 3129 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 3130 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 3131 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 3132 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 3133 to PEDWARN_FOR_QUALIFIERS.
768952be 3134
8f94a8c4
JJ
31352014-12-17 Jakub Jelinek <jakub@redhat.com>
3136
3137 PR sanitizer/64289
3138 * c-convert.c: Include ubsan.h.
3139 (convert): For real -> integral casts and
3140 -fsanitize=float-cast-overflow don't call convert_to_integer, but
3141 instead instrument the float cast directly.
3142
b731b390
JJ
31432014-11-29 Jakub Jelinek <jakub@redhat.com>
3144
3145 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
3146 c_finish_stmt_expr): Remove NULL last argument from
3147 create_tmp_var_raw and create_tmp_var calls.
3148 * c-array-notation.c (fix_builtin_array_notation_fn,
3149 build_array_notation_expr, fix_conditional_array_notations_1,
3150 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
3151
541e35a6
MP
31522014-11-28 Marek Polacek <polacek@redhat.com>
3153
3154 PR c/63862
3155 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
3156 convert the right operand to integer type.
3157
b286be94
MP
31582014-11-25 Marek Polacek <polacek@redhat.com>
3159
3160 PR c/63877
3161 * c-decl.c (start_function): Disable -Wmissing-declarations warning
3162 for inline functions.
3163
aa7da51a
JJ
31642014-11-21 Jakub Jelinek <jakub@redhat.com>
3165
3166 PR target/63764
3167 * c-typeck.c (build_array_ref): Adjust
3168 convert_vector_to_pointer_for_subscript caller. If it returns true,
3169 call non_lvalue_loc on the result.
3170
d876207f
RB
31712014-11-11 Richard Biener <rguenther@suse.de>
3172
3173 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
3174 to true.
3175
e5e44252
AK
31762014-11-10 Andi Kleen <ak@linux.intel.com>
3177
3178 PR c/60804
3179 * c-parser.c (c_parser_statement_after_labels): Call
3180 check_no_cilk.
3181 (c_parser_if_statement): Dito.
3182 (c_parser_switch_statement): Dito.
3183 (c_parser_while_statement): Dito.
3184 (c_parser_do_statement): Dito.
3185 (c_parser_for_statement): Dito.
3186 * c-typeck.c (c_finish_loop): Dito.
3187
13c21655
PC
31882014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
3189
3190 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
3191 OPT_Wshift_count_overflow in the warnings.
3192
2d51fcef
MP
31932014-10-30 Marek Polacek <polacek@redhat.com>
3194
3195 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
3196 print the stripped version as well, if they're not the same.
3197
ef4bddc2
RS
31982014-10-29 Richard Sandiford <richard.sandiford@arm.com>
3199
3200 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
3201 machine_mode.
3202
c582198b
AM
32032014-10-28 Andrew MacLeod <amacleod@redhat.com>
3204
3205 * c-decl.c: Adjust include files.
3206 * c-parser.c: Ditto.
3207
ddc8de03
PM
32082014-10-27 Phil Muldoon <pmuldoon@redhat.com>
3209 Tom Tromey <tromey@redhat.com>
3210
3211 * c-tree.h (enum c_oracle_request): New.
3212 (c_binding_oracle_function): New typedef.
3213 (c_binding_oracle, c_pushtag, c_bind): Declare.
3214 * c-decl.c (c_binding_oracle): New global.
3215 (I_SYMBOL_CHECKED): New macro.
3216 (i_symbol_binding): New function.
3217 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
3218 (I_TAG_CHECKED): New macro.
3219 (i_tag_binding): New function.
3220 (I_TAG_BINDING, I_TAG_DECL): Redefine.
3221 (I_LABEL_CHECKED): New macro.
3222 (i_label_binding): New function.
3223 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
3224 (c_print_identifier): Save and restore c_binding_oracle.
3225 (c_pushtag, c_bind): New functions.
3226
60393bbc
AM
32272014-10-27 Andrew MacLeod <amacleod@redhat.com>
3228
3229 * c-typeck.c: Adjust include files.
3230
d723bb7c
MLI
32312014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
3232
3233 PR c++/53061
3234 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
3235 initialization here...
3236 (c_initialize_diagnostics): ... but here. Set defaults after
3237 building pretty-printer.
3238
1bc5a451
MP
32392014-10-23 Marek Polacek <polacek@redhat.com>
3240
3241 PR c/63626
3242 * c-decl.c (pop_scope): Don't print warning in external_scope.
3243
4435bb92
MP
32442014-10-19 Marek Polacek <polacek@redhat.com>
3245
3246 PR c/63567
3247 * c-typeck.c (output_init_element): Allow initializing objects with
3248 static storage duration with compound literals even in C99 and add
3249 pedwarn for it.
3250
7278465e
MP
32512014-10-17 Marek Polacek <polacek@redhat.com>
3252
3253 PR c/63567
3254 * c-typeck.c (digest_init): Allow initializing objects with static
3255 storage duration with compound literals even in C99 and add pedwarn
3256 for it.
3257
d9b7be2e
MP
32582014-10-17 Marek Polacek <polacek@redhat.com>
3259
3260 PR c/63543
3261 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
3262 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
3263 error multiple times. Print the type.
3264
f406ae1f
MP
32652014-10-17 Marek Polacek <polacek@redhat.com>
3266
3267 PR c/63549
3268 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
3269 type.
3270
92574c7c
MP
32712014-10-17 Marek Polacek <polacek@redhat.com>
3272
3273 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
3274 (start_function): Use OPT_Wimplicit_int instead of 0.
3275 (store_parm_decls_oldstyle): Likewise.
3276
1bc4a978
MT
32772014-10-17 Alan Modra <amodra@gmail.com>
3278
3279 PR middle-end/61848
3280 * c-decl.c (merge_decls): Don't merge section name or tls model
3281 to newdecl symtab node, instead merge to olddecl. Override
3282 existing olddecl section name. Set tls_model for all thread-local
3283 vars, not just OMP thread-private ones. Remove incorrect comment.
3284
83685514
AM
32852014-10-16 Andrew MacLeod <amacleod@redhat.com>
3286
3287 * c-decl.c: Adjust include files.
3288
78a7c317
DD
32892014-10-14 DJ Delorie <dj@redhat.com>
3290
3291 * c-parser.c (c_parse_init): Add RID entries for each __intN.
3292 (c_token_starts_typename): Check all __intN, not just __int128.
3293 (c_token_starts_declspecs): Likewise.
3294 (c_parser_declspecs): Likewise.
3295 (c_parser_attribute_any_word): Likewise.
3296 (c_parser_objc_selector): Likewise.
3297 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
3298 (struct c_declspecs): Add int_n_idx field to record *which* __intN
3299 is specified.
3300 * c-decl.c (declspecs_add_type): Check for all __intN, not just
3301 __int128.
3302 (finish_declspecs): Likewise.
3303
74d98c1e
AB
33042014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
3305
8e745a17 3306 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 3307 the duplicate code.
8e745a17 3308 (c_parser_statement): Call the new function.
74d98c1e 3309
84937de2
MP
33102014-10-09 Marek Polacek <polacek@redhat.com>
3311
3312 PR c/63480
3313 * c-typeck.c (pop_init_level): Don't warn about initializing
3314 with { }.
3315
0382aaa0
MP
33162014-10-07 Marek Polacek <polacek@redhat.com>
3317
3318 PR c/59717
3319 * c-decl.c (header_for_builtin_fn): New function.
3320 (implicitly_declare): Suggest which header to include.
3321
7a0ca710
MP
33222014-10-07 Marek Polacek <polacek@redhat.com>
3323
3324 * c-convert.c (convert): Use error_operand_p.
3325 * c-typeck.c (require_complete_type): Likewise.
3326 (really_atomic_lvalue): Likewise.
3327 (digest_init): Likewise.
3328 (handle_omp_array_sections_1): Likewise.
3329
6bc8a126
MP
33302014-10-03 Marek Polacek <polacek@redhat.com>
3331
3332 PR c/63453
3333 * c-decl.c (pop_scope): Don't warn about "inline function declared
3334 but never defined" for functions marked with gnu_inline attribute.
3335
d90c0a59
JJ
33362014-09-25 Jakub Jelinek <jakub@redhat.com>
3337
3338 PR c++/63249
3339 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
3340 on low_bound and length.
3341
083e891e
MP
33422014-09-24 Marek Polacek <polacek@redhat.com>
3343
3344 PR c/61405
3345 PR c/53874
3346 * c-parser.c: Don't define CPP_KEYWORD.
3347 (c_parser_switch_statement): Pass original type to c_finish_case.
3348 * c-tree.h (c_finish_case): Update declaration.
3349 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
3350 conditionally to c_do_switch_warnings.
3351
8d95fe25
MP
33522014-09-03 Marek Polacek <polacek@redhat.com>
3353
3354 PR c/62024
3355 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
3356 conversions.
3357
9a771876
JJ
33582014-09-02 Jakub Jelinek <jakub@redhat.com>
3359 Balaji V. Iyer <balaji.v.iyer@intel.com>
3360 Igor Zamyatin <igor.zamyatin@intel.com>
3361
3362 * c-parser.c (c_parser_cilk_for): New function.
3363 (c_parser_cilk_grainsize): Likewise.
3364 (c_get_temp_regvar): Likewise.
3365 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
3366 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
3367 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
3368 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
3369 case.
3370
b7679d96
CG
33712014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
3372
3373 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
3374 with using HOST_WIDE_INT without truncation to 'int'
3375
59ea0364
MP
33762014-08-22 Marek Polacek <polacek@redhat.com>
3377
3378 PR c++/62199
3379 * c-typeck.c (parser_build_binary_op): Adjust call to
3380 warn_logical_not_parentheses.
3381
671a475e
IZ
33822014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
3383
3384 PR other/62008
3385 * c-parser.c (c_parser_array_notation): Check for correct
3386 type of an array added.
3387
04159acf
MP
33882014-08-19 Marek Polacek <polacek@redhat.com>
3389
3390 PR c++/62153
3391 * c-typeck.c (build_binary_op): If either operand of a comparison
3392 is a boolean expression, call maybe_warn_bool_compare.
3393
c77935ee
PP
33942014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
3395
3396 PR c/45584
3397 * c-typeck.c (build_c_cast): Do a conversion even when the
3398 TYPE_MAIN_VARIANTs are the same.
3399
35aff4fb
MP
34002014-08-19 Marek Polacek <polacek@redhat.com>
3401
3402 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
3403 pedwarn_c99 instead of pedwarn.
3404 (grokfield): Likewise.
3405 (warn_defaults_to): New function.
3406 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
3407 Unconditionally call pedwarn_c99 instead of pedwarn.
3408 (start_function): Call warn_defaults_to instead of pedwarn_c99.
3409 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
3410 check flag_isoc11 before.
3411 * c-errors.c (pedwarn_c99): Change the return type to bool.
3412 Handle -Wc99-c11-compat.
3413 * c-parser.c (disable_extension_diagnostics): Handle
3414 warn_c99_c11_compat.
3415 (restore_extension_diagnostics): Likewise.
3416 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
3417 instead of pedwarn, don't check flag_isoc11 before.
3418 (c_parser_declspecs): Likewise.
3419 (c_parser_alignas_specifier): Likewise.
3420 (c_parser_alignof_expression): Likewise.
3421 (c_parser_generic_selection): Likewise.
3422 * c-tree.h (pedwarn_c99): Update declaration.
3423 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
3424 of pedwarn_c99.
3425
177cce46
MP
34262014-08-19 Marek Polacek <polacek@redhat.com>
3427
3428 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
3429 to pedwarn_c90.
3430 * c-errors.c: Include "opts.h".
3431 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
3432 * c-parser.c (disable_extension_diagnostics): Handle negative value
3433 of warn_c90_c99_compat, too.
3434 (restore_extension_diagnostics): Likewise.
3435 (c_parser_compound_statement_nostart): Pass
3436 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
3437
6dc99c33
MP
34382014-08-12 Marek Polacek <polacek@redhat.com>
3439
3440 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
3441 Add pedwarn.
3442 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
3443 Likewise.
3444 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
3445
3f8257db 34462014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
3447
3448 PR c/51849
3449 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
3450 Call pedwarn_c90 instead of pedwarn.
3451 (check_bitfield_type_and_width): Likewise.
3452 (declspecs_add_qual): Likewise.
3453 (declspecs_add_type): Likewise.
3454 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
3455 Adjust to only call pedwarn_c90.
3456 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
3457 pedwarn_c90 instead of pedwarn.
3458 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
3459 * c-parser.c (disable_extension_diagnostics): Handle
3460 warn_c90_c99_compat.
3461 (restore_extension_diagnostics): Likewise.
3462 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
3463 pedwarn_c90 instead of pedwarn.
3464 (c_parser_initelt): Likewise.
3465 (c_parser_postfix_expression): Likewise.
3466 (c_parser_postfix_expression_after_paren_type): Likewise.
3467 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
3468 * c-tree.h: Fix formatting.
3469 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
3470 pedwarn_c90 instead of pedwarn.
3471
9f25a338
TS
34722014-08-07 Trevor Saunders <tsaunders@mozilla.com>
3473
3474 * c-typeck.c: Remove include of pointer-set.h.
3475
044331a8
MP
34762014-08-07 Marek Polacek <polacek@redhat.com>
3477
3478 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
3479
b787e7a2
TS
34802014-08-02 Trevor Saunders <tsaunders@mozilla.com>
3481
3482 * c-typeck.c: Use hash_map instead of pointer_map.
3483
6e2830c3
TS
34842014-08-02 Trevor Saunders <tsaunders@mozilla.com>
3485
3486 * c-decl.c: Use hash_set instead of pointer_set.
3487
a7ee52fb
IZ
34882014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
3489
3490 PR middle-end/61455
3491 * c-array-notation.c (expand_array_notations): Handling
3492 of DECL_EXPR added.
3493
b4dfdc11
MG
34942014-07-31 Marc Glisse <marc.glisse@inria.fr>
3495
3496 PR c++/60517
3497 * c-typeck.c (c_finish_return): Return 0 instead of the address of
3498 a local variable.
3499
976d5a22
TT
35002014-07-30 Tom Tromey <tromey@redhat.com>
3501
3502 * c-typeck.c (struct constructor_stack) <designator_depth>: New
3503 field.
3504 (really_start_incremental_init, push_init_level): Initialize
3505 designator_depth.
3506 (pop_init_level): Set global designator_depth.
3507 (process_init_element): Check for designated_init attribute.
3508
30281de2
MP
35092014-07-20 Marek Polacek <polacek@redhat.com>
3510
3511 PR c/61852
3512 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
3513 (implicitly_declare): Pass location to implicit_decl_warning.
3514
b108f48f
JJ
35152014-07-14 Jakub Jelinek <jakub@redhat.com>
3516
3517 PR middle-end/61294
3518 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
3519 If non-NULL, call c_parser_check_literal_zero.
3520 (c_parser_check_literal_zero): New function.
3521 (c_parser_postfix_expression_after_primary): Adjust
3522 c_parser_expr_list caller, handle -Wmemset-transposed-args.
3523
773ec47f
MP
35242014-07-06 Marek Polacek <polacek@redhat.com>
3525
3526 PR c/6940
3527 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
3528 * c-tree.h (C_ARRAY_PARAMETER): Define.
3529 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
3530 function parameter.
3531
22e1cf1c 35322014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 3533 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
3534
3535 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
3536 releasing symbol.
3537
52ec0ea3
MP
35382014-07-01 Marek Polacek <polacek@redhat.com>
3539
3540 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
3541 instead of 0 to WARN_FOR_ASSIGNMENT.
3542
d5c3d343
MP
35432014-07-01 Marek Polacek <polacek@redhat.com>
3544
3545 PR c/58286
3546 * c-typeck.c (convert_for_assignment): Pass
3547 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
3548
6a7253a4
MP
35492014-06-30 Marek Polacek <polacek@redhat.com>
3550
3551 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
3552 has no_sanitize_undefined attribute.
3553
5e88a8f4
IZ
35542014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
3555
3556 PR middle-end/57541
3557 * c-array-notation.c (fix_builtin_array_notation_fn):
3558 Check for 0 arguments in builtin call. Check that bultin argument is
3559 correct.
3560 * c-parser.c (c_parser_array_notation): Check for incorrect initial
3561 index.
3562
9698b078
SH
35632014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
3564
3565 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
3566 qualifiers in __auto_type for atomic types.
3567 (c_parser_typeof_specifier): Discard all type qualifiers in
3568 __typeof__ for atomic types.
3569
6e07c515
MP
35702014-06-25 Marek Polacek <polacek@redhat.com>
3571
3572 PR c/61162
3573 * c-parser.c (c_parser_statement_after_labels): Pass the location of
3574 the return expression to c_finish_return.
3575
da6f124d
JJ
35762014-06-25 Jakub Jelinek <jakub@redhat.com>
3577
3578 * c-typeck.c (c_finish_omp_clauses): Make sure
3579 OMP_CLAUSE_LINEAR_STEP has correct type.
3580
c203e8a7
TS
35812014-06-24 Trevor Saunders <tsaunders@mozilla.com>
3582
3583 * c-decl.c: Adjust.
3584
56ad0e38
JJ
35852014-06-24 Jakub Jelinek <jakub@redhat.com>
3586
3587 * c-parser.c (c_parser_omp_for_loop): For
3588 #pragma omp parallel for simd move lastprivate clause from parallel
3589 to for rather than simd.
3590
47c2554f
MP
35912014-06-23 Marek Polacek <polacek@redhat.com>
3592
3593 * c-typeck.c (parser_build_binary_op): Don't call
3594 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
3595
56363ffd
JH
35962014-06-15 Jan Hubicka <hubicka@ucw.cz>
3597
3598 * c-parser.c (c_parser_omp_threadprivate): Likewise.
3599 * c-decl.c (merge_decls): Likewise.
3600
d7ff7ae5
MP
36012014-06-09 Marek Polacek <polacek@redhat.com>
3602
3603 PR c/36446
3604 * c-typeck.c (error_init): Call inform instead of error_at.
3605 (pedwarn_init): Call inform instead of pedwarn.
3606 (warning_init): Call inform instead of warning_at.
3607
24d047a3
JH
36082014-06-07 Jan Hubicka <hubicka@ucw.cz>
3609
3610 * c-decl.c (merge_decls): Use set_decl_section_name.
3611 (duplicate_decls): Remove node if it exists.
3612
9bac5cbb
G
36132014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
3614
3615 PR c/53119
3616 * c-typeck.c (push_init_level, process_init_element,
3617 pop_init_level): Correct check for zero initialization, move
3618 missing brace warning to respect zero initialization.
3619
8ffcdea8
MP
36202014-06-05 Marek Polacek <polacek@redhat.com>
3621
3622 PR c/56724
3623 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
3624
742938c9
MP
36252014-06-05 Marek Polacek <polacek@redhat.com>
3626
3627 PR c/49706
3628 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
3629 on the left hand side operand of a comparison.
3630
6447c55d
MP
36312014-06-05 Marek Polacek <polacek@redhat.com>
3632
3633 PR c/48062
3634 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
3635 Print note only if the warning was printed.
3636
9dc7743c
IZ
36372014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
3638
3639 PR c/58942
3640 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
3641 with a pointer.
3642
fedfecef
MP
36432014-06-03 Marek Polacek <polacek@redhat.com>
3644
3645 PR c/60439
3646 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
3647 c_start_case.
3648 * c-tree.h (c_start_case): Update.
3649 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
3650 switch condition has boolean value.
3651
9b2b7279
AM
36522014-06-02 Andrew MacLeod <amacleod@redhat.com>
3653
3654 * c-decl.c: Include builtins.h.
3655 * c-parser.c: Likewise.
3656
5c1bc275
MP
36572014-05-27 Marek Polacek <polacek@redhat.com>
3658
3659 PR c/56724
3660 * c-typeck.c (convert_arguments): Get location of a parameter. Change
3661 error and warning calls to error_at and warning_at. Pass location of
3662 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
3663 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
3664 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
3665
97563bc8
IZ
36662014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
3667
3668 PR c/61191
3669 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
3670 function parameters.
3671
aede2c10
JH
36722014-05-23 Jan Hubicka <hubicka@ucw.cz>
3673
3674 * c-decl.c (merge_decls): Preserve symtab node pointers.
3675 (duplicate_decls): Free new decl.
3676
edbba2ce
TS
36772014-05-23 Thomas Schwinge <thomas@codesourcery.com>
3678
f3316c6d
TS
3679 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
3680 initialization.
3681
edbba2ce
TS
3682 * c-parser.c (c_parser_omp_target): Return bool values.
3683
68c81f24
TS
36842014-05-22 Thomas Schwinge <thomas@codesourcery.com>
3685
3686 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
3687 num_teams_loc variable to num_thread_limit_loc.
3688
632f2871
RS
36892014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
3690
3691 * c-array-notation.c (expand_array_notations): Use void_node
3692 instead of void_zero_node.
3693
766090c2
TS
36942014-05-17 Trevor Saunders <tsaunders@mozilla.com>
3695
3696 * c-decl.c (finish_struct): Adjust.
3697 (finish_enum): Likewise.
3698 (bind): Adjust.
3699 (record_inline_static): Likewise.
3700 (push_scope): Likewise.
3701 (make_label): Likewise.
3702 (lookup_label_for_goto): Likewise.
3703 (finish_struct): Likewise.
3704 (finish_enum): Likewise.
3705 (store_parm_decls): Likewise.
3706 (c_push_function_context): Likewise.
3707 * c-lang.h: Remove usage of variable_size gty attribute.
3708 * c-parser.c (c_parse_init): Adjust.
3709 (c_parse_file): Likewise.
3710
2b107f6b
MP
37112014-05-13 Marek Polacek <polacek@redhat.com>
3712
3713 PR c/61162
3714 * c-typeck.c (convert_for_assignment): Pass location to
3715 WARN_FOR_ASSIGNMENT instead of input_location.
3716
d033409e
MP
37172014-05-10 Marek Polacek <polacek@redhat.com>
3718
3719 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
3720 maybe_warn_string_init.
3721 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
3722 maybe_warn_string_init.
3723 * c-tree.h (maybe_warn_string_init): Update declaration.
3724 * c-typeck.c (maybe_warn_string_init): Add location parameter.
3725 Call pedwarn_init with loc instead of with input_location.
3726 (digest_init): Pass init_loc to maybe_warn_string_init.
3727 (pop_init_level): Call pedwarn_init with loc instead of with
3728 input_location.
3729 (set_init_index): Likewise.
3730 (process_init_element): Likewise.
3731
ea58ef42
MP
37322014-05-09 Marek Polacek <polacek@redhat.com>
3733
3734 PR c/61096
3735 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
3736 (c_parser_initelt): Pass location to set_init_label. Pass array index
3737 location to set_init_index.
3738 * c-tree.h (push_init_level): Update declaration.
3739 (pop_init_level): Likewise.
3740 (set_init_index): Likewise.
3741 (set_init_label): Likewise.
3742 * c-typeck.c (error_init): Add location parameter. Call error_at
3743 instead of error.
3744 (digest_init): Pass init_loc to error_init.
3745 (really_start_incremental_init):
3746 (push_init_level): Add location parameter. Pass loc to pop_init_level
3747 and error_init.
3748 (pop_init_level): Likewise.
3749 (set_designator): Add location parameter. Pass loc to pop_init_level,
3750 push_init_level, and error_init.
3751 (set_init_index): Add location parameter. Pass loc to error_init and
3752 set_designator.
3753 (set_init_label): Likewise.
3754 (output_init_element): Pass loc to error_init.
3755 (process_init_element): Pass loc to error_init, pop_init_level,
3756 pedwarn_init, and push_init_level.
3757
661a0813
MP
37582014-05-09 Marek Polacek <polacek@redhat.com>
3759
3760 PR c/50459
3761 * c-parser.c (c_parser_attributes): Parse the arguments as an
3762 expression-list if the attribute takes identifier.
3763
2793eeab
MP
37642014-05-08 Marek Polacek <polacek@redhat.com>
3765
3766 PR c/61053
3767 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
3768 TYPE_ALIGN_UNIT.
3769
f827930a
MP
37702014-05-08 Marek Polacek <polacek@redhat.com>
3771
3772 PR c/61077
3773 * c-decl.c (start_function): Warn for _Atomic-qualified return type
3774 of main.
3775
1d60af08
KZ
37762014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
3777 Mike Stump <mikestump@comcast.net>
3778 Richard Sandiford <rdsandiford@googlemail.com>
3779
3780 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
3781 (finish_enum): Use wide-int interfaces.
3782 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
3783 * c-typeck.c (build_c_cast): Likewise.
3784 (set_nonincremental_init_from_string): Likewise.
3785 (c_tree_equal): Likewise.
3786
a0e24419
MP
37872014-05-02 Marek Polacek <polacek@redhat.com>
3788
3789 PR c/25801
3790 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
3791 Return size_one_node when the type is not complete.
3792 (pointer_diff): Remove comment.
3793 (build_unary_op): Improve error messages.
3794
19fc9faa
MP
37952014-05-02 Marek Polacek <polacek@redhat.com>
3796
3797 * c-typeck.c (c_finish_return): Separate warning_at calls.
3798
63bc4e87
MP
37992014-05-02 Marek Polacek <polacek@redhat.com>
3800
3801 * c-tree.h (error_init): Remove declaration.
3802 (pedwarn_init): Likewise.
3803 * c-typeck.c (error_init): Make static and move above.
3804 (pedwarn_init): Likewise.
3805 (warning_init): Move above.
3806 (maybe_warn_string_init): Likewise.
3807
4bd2511b
JL
38082014-05-01 Jeff Law <law@redhat.com>
3809
3810 Revert:
3811
3812 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3813 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
3814 avoid goto.
3815
6a358dcb
MP
38162014-05-02 Marek Polacek <polacek@redhat.com>
3817
3818 PR c/60784
3819 * c-typeck.c (push_init_level): Set constructor_designated to
3820 p->designated for structures.
3821
ae5ebda4
MP
38222014-05-01 Marek Polacek <polacek@redhat.com>
3823
3824 PR c/60915
3825 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
3826 function-definition has an attribute after the declarator.
3827
96b40f8d
MP
38282014-05-01 Marek Polacek <polacek@redhat.com>
3829
3830 PR c/60257
3831 * c-typeck.c (warning_init): Add location_t parameter. Call
3832 warning_at instead of warning.
3833 (push_init_level): Pass input_location to warning_init.
3834 (add_pending_init): Add location_t parameter. Pass loc to
3835 warning_init.
3836 (set_nonincremental_init): Pass input_location to add_pending_init.
3837 (set_nonincremental_init_from_string): Likewise.
3838 (output_init_element): Pass loc to warning_init and to
3839 add_pending_init.
3840
32e00768
MP
38412014-05-01 Marek Polacek <polacek@redhat.com>
3842
3843 PR c/43395
3844 * c-typeck.c (c_finish_return): Distinguish between label and variable
3845 when warning about returning local address.
3846
c9379ce2
MP
38472014-05-01 Marek Polacek <polacek@redhat.com>
3848
3849 PR c/29467
3850 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
3851 in C89 mode.
3852
d00887e8
MP
38532014-05-01 Marek Polacek <polacek@redhat.com>
3854
3855 PR c/43245
3856 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
3857 instead of 0 to WARN_FOR_QUALIFIERS.
3858
5436fa2e
MP
38592014-05-01 Marek Polacek <polacek@redhat.com>
3860
3861 PR c/56989
3862 * c-typeck.c (default_conversion): Use better location for
3863 error call.
3864
f8ed5150
MP
38652014-04-30 Marek Polacek <polacek@redhat.com>
3866
3867 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
3868 also when SANITIZE_FLOAT_DIVIDE is on.
3869
8337d1db
MP
38702014-04-30 Marek Polacek <polacek@redhat.com>
3871
3872 PR c/60139
3873 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
3874 and pedwarn_init. Use loc insted of input_location.
3875
c4bdc42f
MP
38762014-04-30 Marek Polacek <polacek@redhat.com>
3877
3878 PR c/60351
3879 * c-typeck.c (build_binary_op): Use location when warning about
3880 shift count.
3881
45484dcf
MP
38822014-04-25 Marek Polacek <polacek@redhat.com>
3883
3884 PR c/18079
3885 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
3886 always_inline/noinline and hot/cold attributes.
3887
34cf811f
MP
38882014-04-25 Marek Polacek <polacek@redhat.com>
3889
3890 PR c/60114
3891 * c-parser.c (c_parser_initelt): Pass input_location to
3892 process_init_element.
3893 (c_parser_initval): Pass loc to process_init_element.
3894 * c-tree.h (process_init_element): Adjust declaration.
3895 * c-typeck.c (push_init_level): Pass input_location to
3896 process_init_element.
3897 (pop_init_level): Likewise.
3898 (set_designator): Likewise.
3899 (output_init_element): Add location_t parameter. Pass loc to
3900 digest_init.
3901 (output_pending_init_elements): Pass input_location to
3902 output_init_element.
3903 (process_init_element): Add location_t parameter. Pass loc to
3904 output_init_element.
3905
42056eac
JJ
39062014-04-24 Jakub Jelinek <jakub@redhat.com>
3907
3908 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
3909 atomic-clause, allow comma in between atomic-clause and
3910 seq_cst.
3911
e162a134
JJ
39122014-04-22 Jakub Jelinek <jakub@redhat.com>
3913
3914 PR c/59073
3915 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
3916 fails, don't set OM_PARALLEL_COMBINED and return NULL.
3917
2f6babac
IZ
39182014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
3919
3920 PR middle-end/60469
3921 * c-array-notation.c (fix_builtin_array_notation_fn): Use
3922 create_tmp_var instead build_decl for creating temps.
3923 (build_array_notation_expr): Likewise.
3924 (fix_conditional_array_notations_1): Likewise.
3925 (fix_array_notation_expr): Likewise.
3926 (fix_array_notation_call_expr): Likewise.
3927
8edbfaa6
JJ
39282014-03-28 Jakub Jelinek <jakub@redhat.com>
3929
3930 PR c++/60689
3931 * c-tree.h (c_build_function_call_vec): New prototype.
3932 * c-typeck.c (build_function_call_vec): Don't call
3933 resolve_overloaded_builtin here.
3934 (c_build_function_call_vec): New wrapper function around
3935 build_function_call_vec. Call resolve_overloaded_builtin here.
3936 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
3937 Call c_build_function_call_vec instead of build_function_call_vec.
3938 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
3939 * c-decl.c (finish_decl): Likewise.
3940
7485aeea
MLI
39412014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3942
3943 PR c/55383
3944 * c-typeck.c: Use correct format string in cast-qual warning
3945
b17a8b07
TS
39462014-03-07 Thomas Schwinge <thomas@codesourcery.com>
3947
3948 * c-decl.c (c_decl_attributes): Use
3949 lang_hooks.types.omp_mappable_type.
3950 * c-typeck.c (c_finish_omp_clauses): Likewise.
3951
3af9c5e9
MP
39522014-03-06 Marek Polacek <polacek@redhat.com>
3953
3954 PR c/60197
3955 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
3956 of checking tree code.
3957
1c9f5f33
PK
39582014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3959
3960 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
3961 (c_parser_parameter_declaration): Likewise.
3962
cc28fc7f
MP
39632014-02-19 Marek Polacek <polacek@redhat.com>
3964
3965 PR c/60195
3966 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
3967 Call mark_exp_read on exp.value.
3968 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
3969 TREE_ADDRESSABLE on old instead of val.
3970 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
3971
b581c05c
PK
39722014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3973
3974 * c-parser.c (c_parser_get_builtin_args): Replace calls to
3975 C_EXPR_APPEND by vec_safe_push.
3976 * c-tree.h (C_EXPR_APPEND): Remove.
3977
81e5eca8
MP
39782014-01-31 Marek Polacek <polacek@redhat.com>
3979
3980 PR c/59963
3981 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
3982 build_function_call_vec.
3983 (build_function_call): Likewise.
3984 (build_atomic_assign): Likewise.
3985 (build_function_call_vec): Add arg_loc parameter. Use it.
3986 (convert_arguments): Likewise.
3987 (convert_for_assignment): Rename rhs_loc to expr_loc.
3988 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
3989 (c_parser_objc_keywordexpr): Likewise.
3990 (c_parser_postfix_expression_after_primary): Call
3991 build_function_call_vec with expr_loc rather than op_loc.
3992 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
3993 build_function_call_vec.
3994 (c_parser_expr_list): Add locations parameter. Fill it with locations
3995 of function arguments.
3996 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
3997
68fca595
MP
39982014-01-30 Marek Polacek <polacek@redhat.com>
3999
4000 PR c/59940
4001 * c-typeck.c (build_function_call_vec): Use loc parameter.
4002 (convert_arguments): Add location parameter. Use it.
4003 (ep_convert_and_check): Likewise.
4004 (build_atomic_assign): Adjust convert_for_assignment call.
4005 (build_modify_expr): Likewise.
4006 (digest_init): Likewise.
4007 (c_finish_return): Likewise.
4008 (build_conditional_expr): Adjust ep_convert_and_check calls.
4009 (convert_for_assignment): Add rhs_loc parameter. Use it.
4010 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
4011 calls.
4012
fa337f3a
RB
40132014-01-30 Richard Biener <rguenther@suse.de>
4014
4015 PR c/59905
4016 * c-typeck.c (build_function_call_vec): Do not replace calls
4017 to a function via an incompatible type with a runtime abort.
4018
b72271b9
BI
40192014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
4020
4021 * c-parser.c (c_parser_declaration_or_fndef): Replaced
4022 flag_enable_cilkplus with flag_cilkplus.
4023 (c_parser_direct_declarator_inner): Likewise.
4024 (c_parser_attribute_any_word): Likewise.
4025 (c_parser_attributes): Likewise.
4026 (c_parser_compound_statement): Likewise.
4027 (c_parser_statement_after_labels): Likewise.
4028 (c_parser_if_statement): Likewise.
4029 (c_parser_switch_statement): Likewise.
4030 (c_parser_do_statement): Likewise.
4031 (c_parser_for_statement): Likewise.
4032 (c_parser_unary_expression): Likewise.
4033 (c_parser_postfix_expression): Likewise.
4034 (c_parser_postfix_expression_after_primary): Likewise.
4035 (c_parser_postfix_expression_after_primary): Likewise.
4036 (c_parser_omp_clause_name): Likewise.
4037 (c_finish_omp_declare_simd): Likewise.
4038 (c_parser_cilk_verify_simd): Likewise.
4039 * c-typeck.c (build_array_ref): Likewise.
4040 (build_function_call_vec): Likewise.
4041 (convert_arguments): Likewise.
4042 (build_compound_expr): Likewise.
4043 (c_finish_return): Likewise.
4044 (c_finish_if_stmt): Likewise.
4045 (c_finish_loop): Likewise.
4046 (build_binary_op): Likewise.
4047
393e8e8b
MP
40482014-01-23 Marek Polacek <polacek@redhat.com>
4049
4050 PR c/59846
4051 * c-typeck.c (parser_build_binary_op): Use location instead of
4052 input_location.
4053 (build_binary_op): Pass location to shorten_compare.
4054
f04dda30
MP
40552014-01-23 Marek Polacek <polacek@redhat.com>
4056
4057 PR c/58346
4058 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
4059 an empty aggregate.
4060
789eadcd
MP
40612014-01-23 Marek Polacek <polacek@redhat.com>
4062
4063 PR c/59871
4064 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
4065 of a comma expression.
4066 (emit_side_effect_warnings): Likewise.
4067
40f14e9f
BI
40682014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
4069
4070 PR c/59825
4071 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
4072 function to use walk_tree and moved a lot of its functionality to
4073 expand_array_notations.
4074 (expand_array_notations): New function.
4075
74558dd9
BI
40762014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
4077
4078 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
4079 attribute an attribute without value.
4080
652fea39
JJ
40812014-01-23 Jakub Jelinek <jakub@redhat.com>
4082
4083 PR middle-end/58809
4084 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
4085 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
4086
f34f1c87
MP
40872014-01-22 Marek Polacek <polacek@redhat.com>
4088
4089 PR c/59891
4090 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
4091 of remove_c_maybe_const_expr on op1 and op2.
4092
241f845a
JJ
40932014-01-15 Jakub Jelinek <jakub@redhat.com>
4094
4095 PR c/58943
4096 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
4097 effects, preevaluate rhs using SAVE_EXPR first.
4098
9a74f20c
BI
40992014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
4100
4101 PR c++/59631
4102 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
4103 statements with if-elseif statements.
4104
96066ce1
MP
41052014-01-06 Marek Polacek <polacek@redhat.com>
4106
4107 PR c/57773
4108 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
4109 defined bit-field types only in ISO C.
4110
23a5b65a
RS
41112014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
4112
4113 Update copyright years
4114
f9030485
RS
41152014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
4116
4117 * c-array-notation.c: Use the standard form for the copyright notice.
4118
41958c28
BI
41192013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
4120
4121 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
4122 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
4123 field in parser is not empty. If not-empty, call the function
4124 c_parser_finish_omp_declare_simd.
4125 (c_parser_cilk_clause_vectorlength): Modified function to be shared
4126 between SIMD-enabled functions and #pragma simd. Added new parameter.
4127 (c_parser_cilk_all_clauses): Modified the usage of the function
4128 c_parser_cilk_clause_vectorlength as mentioned above.
4129 (c_parser_cilk_simd_fn_vector_attrs): New function.
4130 (c_finish_cilk_simd_fn_tokens): Likewise.
4131 (is_cilkplus_vector_p): Likewise.
4132 (c_parser_omp_clause_name): Added checking for "vectorlength,"
4133 "nomask," and "mask" strings in clause name.
4134 (c_parser_omp_all_clauses): Added 3 new case statements:
4135 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
4136 PRAGMA_CILK_CLAUSE_NOMASK.
4137 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
4138 check for vector attribute and if so call the function
4139 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
4140 called the function c_finish_cilk_simd_fn_tokens.
4141 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
4142 parser field is non-empty. If so, parse them as you would parse
4143 the omp declare simd pragma.
4144 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
4145 Added a check when step is a parameter and flag it as error.
4146 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
4147 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
4148 pragma_omp_clause.
4149
cef0fd0e
TS
41502013-12-17 Thomas Schwinge <thomas@codesourcery.com>
4151
4152 * c-parser.c (c_parser_omp_parallel): Fix description.
4153
12893402
BI
41542013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
4155
4156 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
4157 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
4158 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
4159 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
4160
296674db
JM
41612013-12-04 Joseph Myers <joseph@codesourcery.com>
4162
4163 PR c/52023
4164 * c-parser.c (c_parser_alignas_specifier): Use
4165 c_sizeof_or_alignof_type instead of c_alignof.
4166 (c_parser_alignof_expression): Likewise, with min_alignof
4167 parameter depending on alignof spelling used.
4168
edd28054
MP
41692013-12-04 Marek Polacek <polacek@redhat.com>
4170
4171 PR c/54113
4172 * c-decl.c (start_function): Don't warn for missing prototype for
4173 inline functions.
4174
da0fc454
MP
41752013-12-03 Marek Polacek <polacek@redhat.com>
4176
4177 PR c/59351
4178 * c-decl.c (build_compound_literal): Allow compound literals with
4179 empty initial value.
4180
4c2ecab0
JM
41812013-12-02 Joseph Myers <joseph@codesourcery.com>
4182
4183 PR c/58235
4184 * c-typeck.c (build_modify_expr): Diagnose assignment to
4185 expression with array type.
4186
340baef7
JM
41872013-11-29 Joseph Myers <joseph@codesourcery.com>
4188
4189 PR c/42262
4190 * c-typeck.c (process_init_element): Do not treat a string as
4191 initializing a whole array when used with a designator for an
4192 individual element.
4193
6763b9f7
JM
41942013-11-29 Joseph Myers <joseph@codesourcery.com>
4195
4196 PR c/57574
4197 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
4198 an inline function following a static declaration.
4199
e7bd1de1
JJ
42002013-11-28 Jakub Jelinek <jakub@redhat.com>
4201
4202 PR c/59310
4203 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
4204 to p_name before calling c_parser_omp_teams instead of after.
4205 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
4206 argument. Remove unused p_name variable.
4207
0136f8f0
AH
42082013-11-27 Aldy Hernandez <aldyh@redhat.com>
4209 Jakub Jelinek <jakub@redhat.com>
4210
4211 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
4212 external_scope is NULL.
4213
241b71bb
TV
42142013-11-27 Tom de Vries <tom@codesourcery.com>
4215 Marc Glisse <marc.glisse@inria.fr>
4216
4217 PR c++/59032
4218 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
4219
2fb9a547
AM
42202013-11-22 Andrew MacLeod <amacleod@redhat.com>
4221
4222 * c-typeck.c: Add required include files from gimple.h.
4223
8400e75e
DM
42242013-11-22 David Malcolm <dmalcolm@redhat.com>
4225
4226 * c-decl.c (define_label, shadow_tag_warned)
4227 (check_bitfield_type_and_width, grokdeclarator, grokparms,
4228 store_parm_decls_newstyle, store_parm_decls_oldstyle)
4229 (declspecs_add_type): Remove use of in_system_header macro.
4230 * c-parser.c (c_parser_unary_expression): Likewise.
4231 * c-typeck.c (store_init_value, process_init_element)
4232 (c_start_case): Likewise.
4233
4234 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
4235 macro.
4236
4237 * c-parser.c (c_parser_set_source_position_from_token): Remove
4238 reference to in_system_header from comment.
4239
386b1f1f
RS
42402013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4241
4242 * c-decl.c (grokdeclarator): Update comment to refer to
4243 tree_to_[su]hwi rather than tree_low_cst.
4244
ae7e9ddd
RS
42452013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4246
4247 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
4248 tree_to_uhwi throughout.
4249
9439e9a1
RS
42502013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4251
4252 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
4253 throughout.
4254
9541ffee
RS
42552013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4256
4257 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
4258 throughout.
4259
c02065fc
AH
42602013-11-15 Aldy Hernandez <aldyh@redhat.com>
4261
4262 * c-parser.c (c_parser_cilk_simd): New.
4263 (c_parser_cilk_verify_simd): New.
4264 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
4265 (c_parser_omp_for_loop): Add case for NE_EXPR.
4266 Set c_break_label for CILK_SIMD.
4267 (c_parser_cilk_clause_vectorlength): New.
4268 (c_parser_cilk_clause_linear): New.
4269 (c_parser_cilk_clause_name): New.
4270 (c_parser_cilk_all_clauses): New.
4271 * c-typeck.c (build_unary_op): Pass location argument to
4272 readonly_error.
4273 (build_modify_expr): Same.
4274 (build_asm_expr): Same.
4275 (c_finish_bc_stmt): Error on break/continue in loops.
4276
18f429e2
AM
42772013-11-14 Andrew MacLeod <amacleod@redhat.com>
4278
4279 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
4280
d8a2d370
DN
42812013-11-14 Diego Novillo <dnovillo@google.com>
4282
4283 * c-decl.c: Include print-tree.h.
4284 Include stor-layout.h.
4285 Include varasm.h.
4286 Include attribs.h.
4287 Include stringpool.h.
4288 * c-lang.c: Include fold-const.h.
4289 * c-parser.c: Include stringpool.h.
4290 Include attribs.h.
4291 Include stor-layout.h.
4292 Include varasm.h.
4293 Include trans-mem.h.
4294 * c-typeck.c: Include stor-layout.h.
4295 Include trans-mem.h.
4296 Include varasm.h.
4297 Include stmt.h.
4298
38b7bc7f
JM
42992013-11-13 Joseph Myers <joseph@codesourcery.com>
4300
4301 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
4302 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
4303 __auto_type.
4304 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
4305 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
4306 RID_AUTO_TYPE.
4307 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
4308 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
4309 (c_parser_declarator, c_parser_direct_declarator_inner)
4310 (c_parser_parameter_declaration, c_parser_type_name): All callers
4311 changed.
4312 (c_parser_declaration_or_fndef): Handle declarations with type
4313 determined from the initializer.
4314
45b0be94
AM
43152013-11-12 Andrew MacLeod <amacleod@redhat.com>
4316
18f429e2 4317 * c-typeck.c: Include gimplify.h.
45b0be94 4318
582d9b50
JM
43192013-11-12 Joseph Myers <joseph@codesourcery.com>
4320
4321 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
4322 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
4323 comment.
4324 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
4325 or _Thread_local as appropriate in diagnostics.
4326 (build_null_declspecs): Initialize ret->thread_gnu_p.
4327 (declspecs_add_scspec): Handle either __thread or _Thread_local
4328 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
4329 pedantic. Do not disallow _Thread_local extern and _Thread_local
4330 static.
4331
267bac10
JM
43322013-11-07 Joseph Myers <joseph@codesourcery.com>
4333 Andrew MacLeod <amacleod@redhat.com>
4334
4335 * c-aux-info.c (gen_type): Handle atomic qualifier.
4336 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
4337 qualifiers when compating types.
4338 (shadow_tag_warned): Handle atomic_p in declspecs.
4339 (quals_from_declspecs): Likewise.
4340 (start_decl): Use c_type_promotes_to when promoting argument
4341 types.
4342 (grokdeclarator): Handle _Atomic.
4343 (get_parm_info): Diagnose any qualifier on "void" as only
4344 parameter.
4345 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
4346 comparing types. Use c_type_promotes_to when promoting argument
4347 types.
4348 (finish_function): Use c_type_promotes_to when promoting argument
4349 types.
4350 (build_null_declspecs): Handle atomic_p in declspecs.
4351 (declspecs_add_qual): Handle RID_ATOMIC.
4352 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
4353 (c_token_starts_declspecs): Handle RID_ATOMIC.
4354 (c_parser_declspecs): Handle atomic type specifiers and
4355 qualifiers.
4356 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
4357 from types of expressions with atomic type.
4358 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
4359 (c_parser_attribute_any_word): Handle RID_ATOMIC.
4360 (c_parser_initializer, c_parser_initelt, c_parser_initval)
4361 (c_parser_statement_after_labels, c_parser_switch_statement)
4362 (c_parser_for_statement, c_parser_expr_no_commas)
4363 (c_parser_conditional_expression, c_parser_binary_expression)
4364 (c_parser_cast_expression, c_parser_unary_expression)
4365 (c_parser_postfix_expression)
4366 (c_parser_postfix_expression_after_primary, c_parser_expression):
4367 Use convert_lvalue_to_rvalue.
4368 (c_parser_expression_conv, c_parser_expr_list): Document
4369 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
4370 (c_parser_objc_synchronized_statement): Use
4371 convert_lvalue_to_rvalue.
4372 (c_parser_objc_selector): Handle RID_ATOMIC.
4373 (c_parser_objc_receiver, c_parser_array_notation): Use
4374 convert_lvalue_to_rvalue.
4375 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
4376 _Atomic (type-name).
4377 (struct c_declspecs): Add atomic_p field.
4378 (convert_lvalue_to_rvalue): Declare.
4379 * c-typeck.c (c_type_promotes_to): Promote atomic types to
4380 corresponding atomic types.
4381 (qualify_type): Don't add _Atomic qualifiers from second argument.
4382 (comp_target_types): Do not allow _Atomic mismatches.
4383 (type_lists_compatible_p): Do not remove atomic qualifiers when
4384 comparing types.
4385 (really_atomic_lvalue, convert_lvalue_to_rvalue)
4386 (build_atomic_assign): New functions.
4387 (build_unary_op): Use build_atomic_assign for atomic increment and
4388 decrement.
4389 (build_conditional_expr): Do not treat _Atomic void as a qualified
4390 version of void.
4391 (build_modify_expr): Use build_atomic_assign for atomic LHS.
4392 (find_anonymous_field_with_type, convert_to_anonymous_field)
4393 (convert_for_assignment): Do not remove atomic qualifiers when
4394 comparing types.
4395 (digest_init): Do not accept initialization of arrays of atomic
4396 elements by string constants.
4397 (build_asm_expr): Use convert_lvalue_to_rvalue.
4398 (build_binary_op): Do not treat _Atomic void as a qualified
4399 version of void.
4400
0c249d4b
DD
44012013-11-06 DJ Delorie <dj@redhat.com>
4402
4403 * c-decl.c (locate_old_decl): If a previous conflicting decl is
4404 both explicit and builtin, print the location of the explicit one.
4405
6d7f7e0a
TB
44062013-11-05 Tobias Burnus <burnus@net-b.de>
4407
4408 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
4409 c_parser_omp_distribute, c_parser_omp_teams,
4410 c_parser_omp_target, c_parser_omp_declare): Handle
4411 -fopenmp-simd.
4412
b906f4ca
MP
44132013-11-03 Marek Polacek <polacek@redhat.com>
4414
4415 * c-decl.c (grokdeclarator): Add VLA instrumentation.
4416
ee1d5a02
JJ
44172013-11-01 Jakub Jelinek <jakub@redhat.com>
4418
4419 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
4420 check_dup_generic at the end, unless remove is true.
4421 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
4422 remove = true;.
4423 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
4424
5a9785fb
JJ
44252013-10-31 Jakub Jelinek <jakub@redhat.com>
4426
4427 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
4428 with decl that is not pointer nor array.
4429
939b37da
BI
44302013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
4431
4432 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
4433 a spawning function is found.
4434 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
4435 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
4436 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
4437 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
4438 case.
4439 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
4440 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
4441 expr.
4442 (c_finish_return): Added a check to reject _Cilk_spawn in return
4443 expression.
4444 (build_cilk_spawn): New function.
4445 (build_cilk_sync): Likewise.
4446 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
4447
d4af74d4
TB
44482013-10-27 Tobias Burnus <burnus@net-b.de>
4449
4450 PR other/33426
4451 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
4452 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
4453 (c_parser_statement_after_labels): Update calls.
4454
d73749df 44552013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
4456
4457 PR other/33426
4458 * c-parser.c (c_parser_pragma, c_parser_for_statement):
4459 Handle PRAGMA_IVDEP.
4460 (c_parser_statement_after_labels): Update call.
4461
f28aa681
MP
44622013-10-24 Marek Polacek <polacek@redhat.com>
4463
4464 * c-parser.c (c_parser_struct_declaration): Add a comment.
4465 (c_parser_declarator): Don't allow _Alignas here.
4466
0645c1a2
AM
44672013-10-17 Andrew MacLeod <amacleod@redhat.com>
4468
4469 * c-parser.c: Include omp-low.h.
4470 * c-typeck.c: Likewise.
4471
568a31f2
MP
44722013-10-17 Marek Polacek <polacek@redhat.com>
4473
4474 PR c/58267
4475 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
4476 Document syntax of the array-declarator.
4477 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
4478 are not permitted.
4479 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
4480 (c_parser_struct_declaration): Likewise.
4481 (c_parser_declarator): Likewise.
4482 (c_parser_direct_declarator_inner): Likewise.
4483 (c_parser_parameter_declaration): Likewise.
4484 (c_parser_type_name): Likewise.
4485
acf0174b
JJ
44862013-10-11 Jakub Jelinek <jakub@redhat.com>
4487
4488 * c-lang.h (current_omp_declare_target_attribute): New extern
4489 decl.
4490 * c-parser.c: Include c-lang.h.
4491 (struct c_parser): Change tokens to c_token *.
4492 Add tokens_buf field. Change tokens_avail type to unsigned int.
4493 (c_parser_consume_token): If parser->tokens isn't
4494 &parser->tokens_buf[0], increment parser->tokens.
4495 (c_parser_consume_pragma): Likewise.
4496 (enum pragma_context): Add pragma_struct and pragma_param.
4497 (c_parser_external_declaration): Adjust
4498 c_parser_declaration_or_fndef caller.
4499 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
4500 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
4501 Adjust recursive call.
4502 (c_parser_struct_or_union_specifier): Use pragma_struct instead
4503 of pragma_external.
4504 (c_parser_parameter_declaration): Use pragma_param instead of
4505 pragma_external.
4506 (c_parser_compound_statement_nostart, c_parser_label,
4507 c_parser_for_statement): Adjust
4508 c_parser_declaration_or_fndef callers.
4509 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
4510 it through to c_parser_conditional_expression.
4511 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
4512 pass it through to c_parser_binary_expression. Adjust recursive
4513 call.
4514 (c_parser_binary_expression): Remove prec argument, add
4515 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
4516 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
4517 binop matches it, use build2 instead of parser_build_binary_op.
4518 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
4519 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
4520 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
4521 Handle pragma_struct and pragma_param the same as pragma_external.
4522 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
4523 (c_parser_omp_variable_list): Parse array sections for
4524 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
4525 (c_parser_omp_clause_collapse): Fully fold collapse expression.
4526 (c_parser_omp_clause_reduction): Handle user defined reductions.
4527 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
4528 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
4529 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
4530 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
4531 c_parser_omp_clause_depend, c_parser_omp_clause_map,
4532 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
4533 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
4534 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
4535 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
4536 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
4537 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
4538 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
4539 (c_parser_omp_for_loop): Add CODE argument, pass it through
4540 to c_finish_omp_for. Change last argument to cclauses,
4541 and adjust uses to grab parallel clauses from the array of all
4542 the split clauses. Adjust c_parser_binary_expression,
4543 c_parser_declaration_or_fndef and c_finish_omp_for callers.
4544 (omp_split_clauses): New function.
4545 (c_parser_omp_simd): New function.
4546 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
4547 Allow the function to be called also when parsing combined constructs,
4548 and call c_parser_omp_simd when parsing for simd.
4549 (c_parser_omp_sections_scope): If section-sequence doesn't start with
4550 #pragma omp section, require exactly one structured-block instead of
4551 sequence of statements.
4552 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
4553 Allow the function to be called also when parsing combined constructs.
4554 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
4555 Allow the function to be called also when parsing combined
4556 constructs.
4557 (c_parser_omp_taskgroup, c_parser_omp_cancel,
4558 c_parser_omp_cancellation_point, c_parser_omp_distribute,
4559 c_parser_omp_teams, c_parser_omp_target_data,
4560 c_parser_omp_target_update, c_parser_omp_target,
4561 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
4562 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
4563 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
4564 (c_parser_omp_construct): Add p_name and mask vars. Handle
4565 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
4566 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
4567 and c_parser_omp_sections callers.
4568 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
4569 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
4570 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
4571 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
4572 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
4573 OMP_CLAUSE_DEPEND.
4574 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
4575 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
4576 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
4577 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
4578 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
4579 * c-typeck.c: Include tree-inline.h.
4580 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
4581 handle_omp_array_sections_1, handle_omp_array_sections,
4582 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
4583 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
4584 user defined reductions.
4585 (c_tree_equal): New function.
4586 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
4587 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
4588 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
4589 c_check_omp_declare_reduction_r): New prototypes.
4590 * c-decl.c (current_omp_declare_target_attribute): New variable.
4591 (c_decl_attributes): New function.
4592 (start_decl, start_function): Use it instead of decl_attributes.
4593 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
4594 c_omp_reduction_decl, c_omp_reduction_lookup,
4595 c_check_omp_declare_reduction_r): New functions.
4596
0a6c2227
TT
45972013-09-25 Tom Tromey <tromey@redhat.com>
4598
4599 * Make-lang.in (c/gccspec.o): Remove.
4600 (CFLAGS-c/gccspec.o): New variable.
4601 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
4602 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
4603 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
4604
f3bc55f0
TT
46052013-09-25 Tom Tromey <tromey@redhat.com>
4606
4607 * Make-lang.in (c/gccspec.o): Don't use subshell.
4608
a24d975c
MP
46092013-09-18 Marek Polacek <polacek@redhat.com>
4610
4611 PR sanitize/58443
4612 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
4613 Remove unnecessary check.
4614
ce6923c5
MP
46152013-09-18 Marek Polacek <polacek@redhat.com>
4616
4617 PR sanitizer/58411
4618 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
4619 no_sanitize_undefined attribute.
4620
a1e51df9
KT
46212013-09-13 Kai Tietz <ktietz@redhat.com>
4622
4623 PR target/57848
4624 * c-decl.c (c_builtin_function_ext_scope): Remove
4625 wrong assumption that it is never called on prexisting
4626 symbol.
4627
0af94e6f
JR
46282013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
4629
4630 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
4631
20059c8b
GDR
46322013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
4633
4634 * c-objc-common.c (c_tree_printer): Tidy.
4635
de5a5fa1
MP
46362013-08-30 Marek Polacek <polacek@redhat.com>
4637
4638 * c-typeck.c (build_binary_op): Add division by zero and shift
4639 instrumentation.
4640
2531a1d9 46412013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 4642 Joseph Myers <joseph@codesourcery.com>
2531a1d9 4643
6e2bcc98 4644 PR c/35649
2531a1d9
JR
4645 * c-typeck.c (c_common_type): Prefer double_type_node over
4646 other REAL_TYPE types with the same precision.
4647 (convert_arguments): Likewise.
4648
025311c4
GDR
46492013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
4650
4651 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
4652 (c_initialize_diagnostics): Call a destructor for the early printer.
4653
da6ca2b5
GDR
46542013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
4655
4656 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
4657 printer initialization.
4658
318cda85 46592013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 4660
318cda85
BI
4661 PR c/57490
4662 * c-array-notation.c (fix_conditional_array_notations_1): Added a
4663 check for truth values.
4664 (expand_array_notation_exprs): Added truth values case. Removed an
4665 unwanted else. Added for-loop to walk through subtrees in default
4666 case.
4667
b066401f
GDR
46682013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
4669
4670 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
4671
fb48aadc
JM
46722013-07-23 Joseph Myers <joseph@codesourcery.com>
4673
4674 * c-parser.c (struct c_generic_association): Fix typo.
4675
433cc7b0
TT
46762013-07-23 Tom Tromey <tromey@redhat.com>
4677 Joseph Myers <joseph@codesourcery.com>
4678
4679 * c-parser.c (struct c_generic_association): New.
4680 (c_generic_association_d): New typedef.
4681 (c_parser_generic_selection): New function.
4682 (c_parser_postfix_expression): Handle RID_GENERIC.
4683
26d40c3d
JM
46842013-07-13 Jason Merrill <jason@redhat.com>
4685
4686 PR c++/57793
4687 * c-decl.c (finish_struct): Check for too-large class.
4688
ecdbd01a 46892013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
4690
4691 PR c/57821
4692 * c-typeck.c (set_init_index): When folding, check for index overflow.
4693
1141ed3f
BI
46942013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
4695
4696 * c-parser.c (c_parser_array_notation): Removed rejection of array
4697 notations in an array of function pointers.
4698
713b46fa
BI
46992013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
4700
4701 * c-array-notation.c (make_triplet_val_inv): New function.
4702 (create_cmp_incr): Likewise.
4703 (create_array_refs): Likewise.
4704 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
4705 Also modularized common parts between functions and called the function.
4706 (build_array_notation_expr): Likewise.
4707 (fix_conditional_array_notations_1): Likewise.
4708 (fix_array_notation_expr): Likewise.
4709 (fix_array_notation_call_expr): Likewise.
4710
92f20202
MP
47112013-06-18 Marek Polacek <polacek@redhat.com>
4712
4713 PR c/57630
4714 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
4715
73a23b06
BI
47162013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
4717
4718 * c-array-notation.c (build_array_notation_expr): Reject array notation
4719 mismatch between LHS and RHS even inside a call_expr. Also, removed
4720 a couple while statements that were dead code.
4721
00b8517d
BI
47222013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
4723
4724 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
4725 excessive precision expressions in function parameters. Also removed
4726 couple unwanted while statements.
4727
1509bdda
BI
47282013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
4729
4730 * c-array-notation.c (expand_array_notation_exprs): Added
4731 ARRAY_NOTATION_REF case.
4732
d60f1706
BI
47332013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
4734
4735 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
4736 function to c-family/array-notation-common.c.
4737 (is_cilkplus_reduce_builtin): Likewise.
4738 (find_rank): Likewise.
4739 (extract_array_notation_exprs): Likewise.
4740 (replace_array_notations): Likewise.
4741 (find_inv_trees): Likewise.
4742 (replace_inv_trees): Likewise.
4743 (contains_array_notation_expr): Likewise.
4744 (find_correct_array_notation_type): Likewise.
4745 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
4746 (struct inv_list): Moved this to c-family/array-notation-common.c.
4747 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
4748
6d6efbb3
BI
47492013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
4750
4751 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
4752 reduction functions outside the for-loop. Added a check if the fundecl
4753 is non-NULL. Finally, removed an unwanted if-statement, and made the
4754 body unconditional.
4755
25c22937
BI
47562013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
4757
4758 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
4759 condition of the if-statement matches the rank of else-block and then-
4760 block when array notations are used.
4761 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
4762 expression after the entire function body is parsed.
4763 (c_parser_expr_no_commas): Delayed creating array notation expressions
4764 to the end of function parsing.
4765 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
4766 whole if-statement instead of just the condition.
4767 (expand_array_notation_exprs): Added MODIFY_EXPR case.
4768
edd25645
BI
47692013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
4770
4771 PR c/57474
4772 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
4773 array to NULL_TREE if they are unused. Also added a check for the
4774 field to be NULL before its fields are used in future.
4775
065ce7f1
RO
47762013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4777
4778 PR bootstrap/57450
4779 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
4780 (build_array_notation_expr): Likewise.
4781
36536d79
BI
47822013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
4783
4784 * c-typeck.c (build_array_ref): Added a check to see if array's
4785 index is greater than one. If true, then emit an error.
4786 (build_function_call_vec): Exclude error reporting and checking
4787 for builtin array-notation functions.
4788 (convert_arguments): Likewise.
4789 (c_finish_return): Added a check for array notations as a return
4790 expression. If true, then emit an error.
4791 (c_finish_loop): Added a check for array notations in a loop
4792 condition. If true then emit an error.
4793 (lvalue_p): Added a ARRAY_NOTATION_REF case.
4794 (build_binary_op): Added a check for array notation expr inside
4795 op1 and op0. If present, we call another function to find correct
4796 type.
4797 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
4798 * c-parser.c (c_parser_compound_statement): Check if array
4799 notation code is used in tree, if so, then transform them into
4800 appropriate C code.
4801 (c_parser_expr_no_commas): Check if array notation is used in LHS
4802 or RHS, if so, then build array notation expression instead of
4803 regular modify.
4804 (c_parser_postfix_expression_after_primary): Added a check for
4805 colon(s) after square braces, if so then handle it like an array
4806 notation. Also, break up array notations in unary op if found.
4807 (c_parser_direct_declarator_inner): Added a check for array
4808 notation.
4809 (c_parser_compound_statement): Added a check for array notation in
4810 a stmt. If one is present, then expand array notation expr.
4811 (c_parser_if_statement): Likewise.
4812 (c_parser_switch_statement): Added a check for array notations in
4813 a switch statement's condition. If true, then output an error.
4814 (c_parser_while_statement): Similarly, but for a while.
4815 (c_parser_do_statement): Similarly, but for a do-while.
4816 (c_parser_for_statement): Similarly, but for a for-loop.
4817 (c_parser_unary_expression): Check if array notation is used in a
4818 pre-increment or pre-decrement expression. If true, then expand
4819 them.
4820 (c_parser_array_notation): New function.
4821 * c-array-notation.c: New file.
4822 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
4823
cd192ccc
MS
48242013-05-23 Mike Stump <mikestump@comcast.net>
4825
4826 * c-typeck.c (convert_for_assignment): Handle references to memory
4827 spaces better.
4828
427b248d
JM
48292013-05-16 Jason Merrill <jason@redhat.com>
4830
4831 * Make-lang.in (cc1$(exeext)): Use link mutex.
4832
44d90fe1
PC
48332013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
4834
4835 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
4836 to simply use OPT_Wpointer_arith.
4837 (build_unary_op): Likewise.
4838
4e7d7b3d
JJ
48392013-04-03 Jakub Jelinek <jakub@redhat.com>
4840
4841 PR c/19449
4842 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
4843 argument. If set, or it temporarily for parsing of the first
4844 argument into force_folding_builtin_constant_p.
4845 (c_parser_postfix_expression): Adjust callers.
4846
839b422f
RB
48472013-03-21 Richard Biener <rguenther@suse.de>
4848
4849 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
4850 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
4851
2ee028f1
MP
48522013-02-12 Marek Polacek <polacek@redhat.com>
4853
4854 PR c/44938
4855 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
4856 origtypes to NULL.
4857
8824edff
JJ
48582013-01-24 Jakub Jelinek <jakub@redhat.com>
4859
4860 PR c/56078
4861 * c-typeck.c (set_nonincremental_init_from_string): If
4862 constructor_max_index is NULL, treat it as if tree_int_cst_lt
4863 returned false.
4864 (process_init_element): Likewise.
4865
eadd3d0d
JJ
48662012-12-20 Jakub Jelinek <jakub@redhat.com>
4867
4868 PR c++/55619
4869 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
4870 argument, don't call default_function_array_conversion
4871 nor c_fully_fold here.
4872 (c_parser_asm_statement): Adjust callers.
4873 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
4874 and outputs here, and call default_function_array_conversion
4875 on inputs that don't need to be addressable.
4876
f8a93a2e
JJ
48772012-12-18 Jakub Jelinek <jakub@redhat.com>
4878
4879 PR c/39464
4880 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
4881 warning require that both c_common_unsigned_type as well as
4882 c_common_signed_type is the same for both mvl and mvr types.
4883
9771b263
DN
48842012-11-16 Diego Novillo <dnovillo@google.com>
4885
4886 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
4887
4888 * c-common.c: Use new vec API in vec.h.
4889 * c-common.h: Likewise.
4890 * c-gimplify.c: Likewise.
4891 * c-pragma.c: Likewise.
4892 * c-pretty-print.c: Likewise.
4893 * c-pretty-print.h: Likewise.
4894 * c-semantics.c: Likewise.
4895 * c-decl.c: Likewise.
4896 * c-parser.c: Likewise.
4897 * c-tree.h: Likewise.
4898 * c-typeck.c: Likewise.
4899
880661a4
JW
49002012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
4901
4902 PR c++/54930
4903 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
4904
077d1abe
MLI
49052012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
4906
4907 PR c/53066
4908 * c-decl.c (warn_if_shadowing): Do not warn if a variable
4909 shadows a function, unless the variable is a function or a
4910 pointer-to-function.
4911
3a785c97
JJ
49122012-10-12 Jakub Jelinek <jakub@redhat.com>
4913
4914 PR c/54381
4915 * c-parser.c (struct c_tree_loc_pair): Removed.
4916 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
4917 add location_t * and tree * arguments, fill in array of 3
4918 sizeof_arg trees and corresponding locs.
4919 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
4920 c_parser_expr_list callers.
4921 (c_parser_postfix_expression_after_primary): Likewise. Pass
4922 array of 3 sizeof_arg trees and locs (corresponding to first
4923 3 arguments) to sizeof_pointer_memaccess_warning.
4924
703c8606
LC
49252012-10-09 Lawrence Crowl <crowl@google.com>
4926
4927 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
4928 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
4929 hash table.
4930
5d9de0d0
PC
49312012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
4932
4933 PR c++/54194
4934 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
4935 call.
4936
a212e43f
MG
49372012-10-09 Marc Glisse <marc.glisse@inria.fr>
4938
4939 PR c++/54427
4940 * c-typeck.c: Include c-common.h.
4941 (enum stv_conv): Moved to c-common.h.
4942 (scalar_to_vector): Moved to c-common.c.
4943 (build_binary_op): Adapt to scalar_to_vector's new prototype.
4944 * Make-lang.in: c-typeck.c depends on c-common.h.
4945
3b78de56
AC
49462012-10-04 Arnaud Charlet <charlet@adacore.com>
4947
4948 * c-decl.c (c_write_global_declarations): Fix handling of
4949 -fdump-ada-spec*.
4950
78c60e3d
SS
49512012-09-30 Sharad Singhai <singhai@google.com>
4952
4953 * c-decl.c (c_write_global_declarations): Use a different method
4954 to determine if the dump has ben initialized.
4955
9f33203d
JM
49562012-09-14 Joseph Myers <joseph@codesourcery.com>
4957
4958 PR c/54552
4959 * c-typeck.c (c_cast_expr): When casting to a type requiring
4960 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
4961 c_fully_fold first.
4962
a27d595d
JM
49632012-09-14 Joseph Myers <joseph@codesourcery.com>
4964
4965 PR c/54103
4966 * c-typeck.c (build_unary_op): Pass original argument of
4967 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
4968 any C_MAYBE_CONST_EXPR, if it has integer operands.
4969 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
4970 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
4971 to c_objc_common_truthvalue_conversion, then remove any
4972 C_MAYBE_CONST_EXPR, if they have integer operands. Use
4973 c_objc_common_truthvalue_conversion not
4974 c_common_truthvalue_conversion.
4975 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
4976 call note_integer_operands for arguments with integer operands
4977 that are not integer constants.
4978
9feb29df
JJ
49792012-09-13 Jakub Jelinek <jakub@redhat.com>
4980
4981 PR c/54559
4982 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
4983 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
4984
d409320c
JJ
49852012-08-31 Jakub Jelinek <jakub@redhat.com>
4986
4987 PR c/54428
4988 * c-convert.c (convert): Don't call fold_convert_loc if
4989 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
4990 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
4991 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
4992
6265d07c
JJ
49932012-08-24 Jakub Jelinek <jakub@redhat.com>
4994
4995 PR c/54355
4996 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
4997 for nested and empty_ok arguments in the call to
4998 c_parser_declaration_or_fndef.
4999
1a4049e7
JJ
50002012-08-17 Jakub Jelinek <jakub@redhat.com>
5001
5002 * c-tree.h (c_last_sizeof_arg): Declare.
5003 * c-parser.c (struct c_tree_loc_pair): New type.
5004 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
5005 non-NULL.
5006 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
5007 (c_parser_postfix_expression_after_primary): Likewise. Call
5008 sizeof_pointer_memaccess_warning if needed.
5009 (sizeof_ptr_memacc_comptypes): New function.
5010 * c-typeck.c (c_last_sizeof_arg): New global variable.
5011 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
5012
0229aee9
UB
50132012-07-24 Uros Bizjak <ubizjak@gmail.com>
5014
5015 * c-lang.h (lang_decl): Add variable_size GTY option.
5016
7ee2468b
SB
50172012-07-16 Steven Bosscher <steven@gcc.gnu.org>
5018
5019 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
5020 * Make-lang.in: Fix dependencies.
5021
d4a10d0a
SB
50222012-06-29 Steven Bosscher <steven@gcc.gnu.org>
5023
5024 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
5025 and add language Makefile hooks.
5026 * config-lang.in: New file.
5027 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
5028 add the required "normal" config-lang.in rules.
5029 * c-lang.h: Moved from gcc/ to here.
5030 * c-tree.h: Likewise.
5031 * c-objc-common.c: Likewise.
5032 * c-objc-common.h: Likewise.
5033 * c-typeck.c: Likewise.
5034 * c-convert.c: Likewise.
5035 * c-lang.c: Likewise.
5036 * c-aux-info.c: Likewise.
5037 * c-errors.c: Likewise.
5038 * gccspec.c: Likewise.
5039 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
5040 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
5041\f
cbe34bb5 5042Copyright (C) 2012-2017 Free Software Foundation, Inc.
d4a10d0a
SB
5043
5044Copying and distribution of this file, with or without modification,
5045are permitted in any medium without royalty provided the copyright
5046notice and this notice are preserved.