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