]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
Use gfc_add_*_component defines where appropriate
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
6a3f203c
DM
12016-06-14 David Malcolm <dmalcolm@redhat.com>
2
3 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
4
264757fb
DM
52016-06-14 David Malcolm <dmalcolm@redhat.com>
6
7 * c-typeck.c (build_component_ref): Simplify fixit code by
8 using gcc_rich_location::add_fixit_misspelled_id.
9 (set_init_label): Likewise.
10
f7e4f2e3
DM
112016-06-13 David Malcolm <dmalcolm@redhat.com>
12
13 * c-parser.c (c_parser_initelt): Provide location of name for new
14 location_t param of set_init_label.
15 * c-tree.h (set_init_label): Add location_t param.
16 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
17 param and use it when issuing error messages about unrecognized
18 field names. Attempt to provide a fixit hint if appropriate,
19 otherwise update the error message to provide the type name.
20
4b1ffdb1
TS
212016-06-10 Thomas Schwinge <thomas@codesourcery.com>
22
23 PR c/71381
24 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
25 Loosen checking.
26
44a845ca
MS
272016-06-08 Martin Sebor <msebor@redhat.com>
28 Jakub Jelinek <jakub@redhat.com>
29
30 PR c++/70507
31 PR c/68120
32 * c-typeck.c (convert_arguments): Don't promote last argument
33 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
34
92a5f2ba
MP
352016-06-08 Marek Polacek <polacek@redhat.com>
36
37 PR c/71418
38 * c-decl.c (grokdeclarator): Check TYPE_P.
39
08203f73
MP
40 PR c/71426
41 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
42 code.
43
6ffd47b7
DM
442016-06-07 David Malcolm <dmalcolm@redhat.com>
45
46 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
47 and structure element reference, capture the location of the
48 element name token and pass it to build_component_ref.
49 (c_parser_postfix_expression_after_primary): Likewise for
50 structure element dereference.
51 (c_parser_omp_variable_list): Likewise for
52 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
53 * c-tree.h (build_component_ref): Add location_t param.
54 * c-typeck.c (build_component_ref): Add location_t param
55 COMPONENT_LOC. Use it, if available, when issuing hints about
56 mispelled member names to provide a fixit replacement hint.
57
1f40cff3
MP
582016-06-06 Marek Polacek <polacek@redhat.com>
59
60 PR c/71362
61 * c-parser.c (c_parser_direct_declarator): Set location.
62
5545a907
MP
632016-06-06 Marek Polacek <polacek@redhat.com>
64
65 * c-typeck.c (comptypes_internal): Handle comparisons of
66 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
67 TYPE_REF_CAN_ALIAS_ALL.
68
b605f663
CLT
692016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
70
71 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
72 arguments as addressable when async clause exists.
73
00631022
JJ
742016-05-30 Jakub Jelinek <jakub@redhat.com>
75
76 PR c++/71349
77 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
78 when combined with target construct.
79
7211a097
JJ
802016-05-26 Jakub Jelinek <jakub@redhat.com>
81
82 * c-parser.c (c_parser_omp_clause_schedule): Warn if
83 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
84
95efe6b6
MP
852016-05-25 Marek Polacek <polacek@redhat.com>
86
87 PR c/71265
88 * c-decl.c (c_make_fname_decl): Don't check seen_error.
89
a23faf7a
MP
90 PR c/71266
91 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
92
e46c7770
CP
932016-05-24 Cesar Philippidis <cesar@codesourcery.com>
94
95 * c-parser.c (c_parser_oacc_declare): Add support for
96 GOMP_MAP_FIRSTPRIVATE_POINTER.
97 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
98 argument with enum c_omp_region_type ort.
99 (handle_omp_array_sections): Likewise. Update call to
100 handle_omp_array_sections_1.
101 (c_finish_omp_clauses): Add specific errors and warning messages for
102 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
103 call to handle_omp_array_sections.
104
a04e69c0
TS
1052016-05-24 Thomas Schwinge <thomas@codesourcery.com>
106
107 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
108
f17a223d
RB
1092016-05-24 Richard Biener <rguenther@suse.de>
110
111 PR middle-end/70434
112 PR c/69504
113 * c-typeck.c (build_array_ref): Do not complain about indexing
114 non-lvalue vectors. Adjust for function name change.
115
79063edd
MS
1162016-05-20 Martin Sebor <msebor@redhat.com>
117
118 PR c/71115
119 * c-typeck.c (error_init): Use
120 expansion_point_location_if_in_system_header.
121 (warning_init): Same.
122
8a40fef3
DM
1232016-05-19 David Malcolm <dmalcolm@redhat.com>
124
125 PR c/71171
126 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
127 in error-handling.
128 (c_parser_postfix_expression): Likewise.
129 * c-tree.h (c_expr::set_error): New method.
130 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
131 that result's range is initialized.
132
e9892350
JG
1332016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
134
135 * c-typeck.c (parser_build_unary_op): Fix formatting.
136
8fad45f5
MW
1372016-05-16 Matthew Wahab <matthew.wahab@arm.com>
138
139 * c-decl.c (grokdeclarator): Remove errmsg and use of
140 targetm.invalid_return_type.
141 (grokparms): Remove errmsg and use of
142 targetm.invalid_parameter_type.
143
aa4b467b
JM
1442016-05-13 Joseph Myers <joseph@codesourcery.com>
145
146 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
147 function return type.
148
4f2e1536
MP
1492016-05-12 Marek Polacek <polacek@redhat.com>
150
151 PR c/70756
152 * c-decl.c (build_compound_literal): Pass LOC down to
153 c_incomplete_type_error.
154 * c-tree.h (require_complete_type): Adjust declaration.
155 (c_incomplete_type_error): Likewise.
156 * c-typeck.c (require_complete_type): Add location parameter, pass it
157 down to c_incomplete_type_error.
158 (c_incomplete_type_error): Add location parameter, pass it down to
159 error_at.
160 (build_component_ref): Pass location down to c_incomplete_type_error.
161 (default_conversion): Pass location down to require_complete_type.
162 (build_array_ref): Likewise.
163 (build_function_call_vec): Likewise.
164 (convert_arguments): Likewise.
165 (build_unary_op): Likewise.
166 (build_c_cast): Likewise.
167 (build_modify_expr): Likewise.
168 (convert_for_assignment): Likewise.
169 (c_finish_omp_clauses): Likewise.
170
d6e83a8d
MM
1712016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
172
173 PR c/43651
174 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
175 is enabled.
176 * c-errors.c (pedwarn_c90): Return true if warned.
177 * c-tree.h (pedwarn_c90): Change return type to bool.
178 (enum c_declspec_word): Add new enumerator cdw_atomic.
179
5c3a10fb
MP
1802016-05-11 Marek Polacek <polacek@redhat.com>
181
182 PR c++/71024
183 * c-decl.c (diagnose_mismatched_decls): Factor out code to
184 diagnose_mismatched_attributes and call it.
185
cf68d92c
MP
1862016-05-10 Marek Polacek <polacek@redhat.com>
187
188 PR c/70255
189 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
190 on a declaration following the definition.
191
351f85c5
JJ
1922016-05-05 Jakub Jelinek <jakub@redhat.com>
193
194 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
195 parse it through to c_parser_c99_block_statement.
196 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
197 caller.
198
deef7113
MP
1992016-05-04 Marek Polacek <polacek@redhat.com>
200
201 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
202 OPT_Wdangling_else.
203
de55efd5
MP
2042016-05-04 Marek Polacek <polacek@redhat.com>
205
206 PR c/48778
207 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
208 for macro expansions.
209
79ce98bc
MP
2102016-05-03 Marek Polacek <polacek@redhat.com>
211
212 PR c/70859
213 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
214 check_builtin_function_arguments.
215
fb2647aa
RB
2162016-05-03 Richard Biener <rguenther@suse.de>
217
218 * Make-lang.in (cc1-checksum.c): For stage-final re-use
219 the checksum from the previous stage.
220
77886428
CP
2212016-05-02 Cesar Philippidis <cesar@codesourcery.com>
222
223 * c-parser.c (c_parser_oacc_all_clauses): Update call to
224 c_finish_omp_clauses.
225 (c_parser_omp_all_clauses): Likewise.
226 (c_parser_oacc_cache): Likewise.
227 (c_parser_oacc_loop): Likewise.
228 (omp_split_clauses): Likewise.
229 (c_parser_omp_declare_target): Likewise.
230 (c_parser_cilk_all_clauses): Likewise.
231 (c_parser_cilk_for): Likewise.
232 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
233 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
234
7176a4a0
MP
2352016-05-02 Marek Polacek <polacek@redhat.com>
236
237 PR c/70851
238 * c-decl.c (grokdeclarator): Diagnose when array's size has an
239 incomplete type.
240
e7ff0319
CP
2412016-04-29 Cesar Philippidis <cesar@codesourcery.com>
242
243 PR middle-end/70626
244 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
245 OACC_LOOP_CLAUSE_MASK.
246 (c_parser_oacc_kernels_parallel): Update call to
247 c_oacc_split_loop_clauses.
248
9f405ce1
AM
2492016-04-28 Andrew MacLeod <amacleod@redhat.com>
250
251 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
252 argument to build_modify_expr in two cases.
253
c1e1f433
BS
2542016-04-27 Bernd Schmidt <bschmidt@redhat.com>
255
256 * c-parser.c (c_parser_postfix_expression_after_primary): Call
257 warn_for_memset instead of warning directly here.
258
2448a956
MP
2592016-04-26 Marek Polacek <polacek@redhat.com>
260
261 PR c/67784
262 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
263 out of ...
264 (c_parser_for_statement): ... here.
265 (c_parser_if_statement): Use it.
266 (c_parser_switch_statement): Use it.
267 (c_parser_while_statement): Use it.
268
b02a5e26
MP
269 PR c/70791
270 * c-decl.c (pushdecl): Pass LOCUS down to warning.
271
477d4906
IV
2722016-04-20 Ilya Verbin <ilya.verbin@intel.com>
273
274 PR c++/69363
275 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
276 instead of c_finish_cilk_clauses.
277 * c-tree.h (c_finish_omp_clauses): Add new default argument.
278 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
279 floating-point variables in the linear clause for Cilk Plus.
280
fe37c7af
MM
2812016-04-18 Michael Matz <matz@suse.de>
282
283 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
284 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
285
949505a9
MP
2862016-04-15 Marek Polacek <polacek@redhat.com>
287
288 PR c/70671
289 * c-typeck.c (build_unary_op): Pass location down to error and
290 warning call.
291
dda1bf61
JJ
2922016-04-15 Jakub Jelinek <jakub@redhat.com>
293
294 PR c/70436
295 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
296 where needed.
297 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
298 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
299 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
300 Adjust c_parser_pragma callers.
301 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
302 caller.
303 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
304 c_parser_statement.
305 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
306 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
307 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
308 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
309 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
310 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
311 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
312 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
313 down where needed.
314 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
315 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
316 calls.
317
99cd9857
MP
3182016-04-13 Marek Polacek <polacek@redhat.com>
319
320 PR c/70436
321 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
322 adjust callers.
323 (c_parser_statement): Likewise.
324 (c_parser_c99_block_statement): Likewise.
325 (c_parser_while_statement): Likewise.
326 (c_parser_for_statement): Likewise.
327 (c_parser_if_body): Don't set IF_P here.
328 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
329 about dangling else here.
330 * c-tree.h (c_finish_if_stmt): Adjust declaration.
331 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
332 warn about dangling else here.
333
f13355da
MP
3342016-04-04 Marek Polacek <polacek@redhat.com>
335
336 PR c/70307
337 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
338
5fde6a45
MP
3392016-03-31 Marek Polacek <polacek@redhat.com>
340
341 PR c/70297
342 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
343
4bbf545b
DM
3442016-03-18 David Malcolm <dmalcolm@redhat.com>
345
346 PR c/70281
347 * c-parser.c (c_parser_postfix_expression): Set the source range
348 for uses of "__builtin_types_compatible_p".
349
fcc2b74f
JJ
3502016-03-17 Jakub Jelinek <jakub@redhat.com>
351
352 PR c/70280
353 * c-typeck.c (composite_type): Don't count void_list_node
354 into len, if the list is terminated by void_list_node, start
355 with void_list_node instead of NULL for newargs. Stop
356 at void_list_node.
357
ab4c578f
MP
3582016-03-16 Marek Polacek <polacek@redhat.com>
359
360 PR c/70093
361 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
362 nested functions returning VM types.
363
96b3c82d
CP
3642016-03-09 Cesar Philippidis <cesar@codesourcery.com>
365
366 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
367 when calling c_finish_omp_clauses.
368
29b9828f
BS
3692016-03-04 Bernd Schmidt <bschmidt@redhat.com>
370
371 PR c/69824
372 * c-decl.c (get_parm_info): Don't queue implicit function declarations
373 for later.
374
7ff6ca38
MP
3752016-03-04 Marek Polacek <polacek@redhat.com>
376
377 PR c/69798
378 * c-parser.c (c_parser_postfix_expression): Call
379 c_parser_cast_expression rather than c_parser_postfix_expression.
380
686e2237
JJ
3812016-03-01 Jakub Jelinek <jakub@redhat.com>
382
383 PR c/69796
384 PR c/69974
385 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
386 of incomplete decls to error_mark_node.
387
0b05329b
MP
3882016-02-24 Marek Polacek <polacek@redhat.com>
389
390 PR c/69819
391 * c-decl.c (finish_decl): Don't update the copy of the type of a
392 different decl type.
393
067fbd8b
JJ
3942016-02-23 Jakub Jelinek <jakub@redhat.com>
395
396 PR objc/69844
397 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
398 in id_kind reclassification.
399
bf14eba2
JJ
4002016-02-16 Jakub Jelinek <jakub@redhat.com>
401
402 PR c/69835
403 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
404
ba539195
JN
4052016-02-16 James Norris <jnorris@codesourcery.com>
406
407 PR c/64748
408 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
409
16595a1f
BS
4102016-02-12 Bernd Schmidt <bschmidt@redhat.com>
411
f48dfe98
BS
412 * c-decl.c (build_null_declspecs): Zero the entire struct.
413
16595a1f
BS
414 PR c/69522
415 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
416 callers changed. If nested_p is true, use it to call
417 finish_implicit_inits.
418 * c-tree.h (finish_implicit_inits): Declare.
419 * c-typeck.c (finish_implicit_inits): New function. Move code
420 from ...
421 (push_init_level): ... here.
422 (set_designator, process_init_element): Call finish_implicit_inits.
423
66756373
JJ
4242016-02-11 Jakub Jelinek <jakub@redhat.com>
425
426 PR c/69768
427 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
428 arguments for -Waddress warning.
429
1066e9b5
JJ
4302016-02-04 Jakub Jelinek <jakub@redhat.com>
431
432 PR c/69669
433 * c-decl.c (finish_enum): When honoring mode attribute,
434 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
435
3a5d2ba4
JJ
4362016-01-29 Jakub Jelinek <jakub@redhat.com>
437
438 PR debug/69518
439 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
440 all type variants, not just TYPE_MAIN_VARIANT.
441
cbdd8ae0
JJ
4422016-01-27 Jakub Jelinek <jakub@redhat.com>
443
444 PR debug/66869
445 * c-decl.c (c_write_global_declarations_1): Warn with
446 warn_unused_function if static prototype without definition
447 is not C_DECL_USED.
448
fa74a4bc
MP
4492016-01-27 Marek Polacek <polacek@redhat.com>
450
451 PR c/68062
452 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
453 to unsigned, if needed. Add -Wsign-compare warning.
454
13f92e8d
JJ
4552016-01-26 Jakub Jelinek <jakub@redhat.com>
456
457 PR tree-optimization/69483
458 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
459
cd8e73dc 4602016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
461
462 PR c/24293
463 * c-tree.h (incomplete_record_decls): Declare.
464 * c-parser.c (incomplete_record_decls): Define.
465 (c_parser_translation_unit): Iterate through incomplete_record_decls and
466 report error if any decl has zero size.
467 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
468 or enum type to incomplete_record_decls.
469
e6d6ec9e
TV
4702016-01-14 Tom de Vries <tom@codesourcery.com>
471
472 PR tree-optimization/68773
473 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
474 set force_output.
475
00083992
MP
4762016-01-14 Marek Polacek <polacek@redhat.com>
477
478 PR c/69262
479 * c-decl.c (grokdeclarator): Provide more information for invalid
480 array declarations.
481
7443cf13
DM
4822016-01-06 David Malcolm <dmalcolm@redhat.com>
483
484 * c-parser.c (c_parser_unary_expression): For dereferences, build
485 a combined location before calling build_indirect_ref, so that
486 error reports cover the full range, manually updating the c_expr
487 src_range.
488
6b131d5b
MP
4892016-01-06 Marek Polacek <polacek@redhat.com>
490
491 PR sanitizer/69099
492 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
493 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
494 NULL.
495
818ab71a
JJ
4962016-01-04 Jakub Jelinek <jakub@redhat.com>
497
498 Update copyright years.
499
2fe0a208
MP
5002016-01-04 Marek Polacek <polacek@redhat.com>
501
502 PR c/68908
503 * c-typeck.c (build_atomic_assign): Improve commentary. Add
504 optimization to use __atomic_fetch_* built-in if possible.
505
c7b48c8a
TS
5062015-12-23 Thomas Schwinge <thomas@codesourcery.com>
507
508 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
509 into...
510 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
511 all users.
512
fda5652f
MP
5132015-12-22 Marek Polacek <polacek@redhat.com>
514
515 PR c/69002
516 * c-typeck.c (build_component_ref): Warn when acessing elements of
517 atomic structures or unions.
518
745e411d
DM
5192015-12-21 David Malcolm <dmalcolm@redhat.com>
520
521 * c-typeck.c: Include "gcc-rich-location.h".
522 (build_binary_op): In the two places that call binary_op_error,
523 create a gcc_rich_location and populate it with the location of
524 the binary op and its two operands.
525
94c40e19
DM
5262015-12-16 David Malcolm <dmalcolm@redhat.com>
527
528 * c-parser.c (c_parser_statement_after_labels): When calling
529 c_finish_return, Use the return expression's location if it has
530 one, falling back to the location of the first token within it.
531 * c-typeck.c (c_finish_return): When issuing warnings about
532 the incorrect presence/absence of a return value, issue a note
533 showing the declaration of the function.
534
de67c4c3
DM
5352015-12-16 David Malcolm <dmalcolm@redhat.com>
536
537 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
538 to 4.
539 (c_parser_peek_nth_token): New function.
540 (c_parser_peek_conflict_marker): New function.
541 (c_parser_error): Detect conflict markers and report them as such.
542
a10704e1
DM
5432015-12-16 David Malcolm <dmalcolm@redhat.com>
544
545 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
546 to preserve range information for the primary expression
547 in the call to c_parser_postfix_expression_after_primary.
548
8062bca6
DM
5492015-12-16 David Malcolm <dmalcolm@redhat.com>
550
551 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
552 expression location, falling back on the first token location,
553 rather than always using the latter.
554
d06f8b75
MP
5552015-12-16 Marek Polacek <polacek@redhat.com>
556
557 PR c/64637
558 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
559 available.
560
2994fb91
MP
5612015-12-15 Marek Polacek <polacek@redhat.com>
562
563 PR c/68907
564 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
565 artificial decl.
566
a1b93f8d
DM
5672015-12-08 David Malcolm <dmalcolm@redhat.com>
568
569 * c-parser.c (c_parser_alignof_expression): Capture location of
570 closing parenthesis (if any), or of end of unary expression, and
571 use it to build a src_range for the expression.
572
46c6e1e2
DM
5732015-12-08 David Malcolm <dmalcolm@redhat.com>
574
575 PR c/68757
576 * c-parser.c (c_parser_get_builtin_args): Add
577 "out_close_paren_loc" param, and write back to it.
578 (c_parser_postfix_expression): Capture the closing
579 parenthesis location for RID_CHOOSE_EXPR,
580 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
581 RID_BUILTIN_SHUFFLE and use it to set the source range
582 for such expressions; within RID_BUILTIN_COMPLEX set
583 the underlying location.
584
66189108
MP
5852015-12-07 Marek Polacek <polacek@redhat.com>
586
587 PR c/68668
588 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
589 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
590
f187980b
EB
5912015-12-04 Eric Botcazou <ebotcazou@adacore.com>
592
593 * c-tree.h (c_build_va_arg): Adjust prototype.
594 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
595 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
596 parameter, adjust throughout and issue an error if EXPR is a component
597 with reverse storage order.
598
4250754e
JM
5992015-12-02 Jason Merrill <jason@redhat.com>
600
601 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
602 (c_fully_fold_internal, decl_constant_value_for_optimization):
603 Move from c-common.c.
604 * c-tree.h: Declare decl_constant_value_for_optimization.
605 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
606
e9e32ee6
JM
6072015-12-02 Joseph Myers <joseph@codesourcery.com>
608
609 PR c/68162
610 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
611 following link from declarator to next declarator. Track original
612 qualified type and pass it to c_build_qualified_type.
613 * c-typeck.c (c_build_qualified_type): Add arguments
614 orig_qual_type and orig_qual_indirect.
615
ff7a55bf
TS
6162015-12-02 Thomas Schwinge <thomas@codesourcery.com>
617
618 * c-parser.c (c_parser_omp_clause_name)
619 (c_parser_oacc_all_clauses): Alphabetical sorting.
620
657e4e47
JJ
6212015-12-02 Jakub Jelinek <jakub@redhat.com>
622
623 PR c/68533
624 * c-decl.c (get_parm_info): Use b->locus instead of input_location
625 for diagnostics.
626
37d5ad46
JB
6272015-12-01 Julian Brown <julian@codesourcery.com>
628 Cesar Philippidis <cesar@codesourcery.com>
629 James Norris <James_Norris@mentor.com>
630
631 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
632 (c_parser_oacc_clause_use_device): New function.
633 (c_parser_oacc_all_clauses): Add use_device support.
634 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
635 (c_parser_oacc_host_data): New function.
636 (c_parser_omp_construct): Add host_data support.
637 * c-tree.h (c_finish_oacc_host_data): Add prototype.
638 * c-typeck.c (c_finish_oacc_host_data): New function.
639 (c_finish_omp_clauses): Add use_device support.
640
a4850ce9
JH
6412015-11-29 Jan Hubicka <hubicka@ucw.cz>
642
643 PR c/67106
644 * c-decl.c: Set TYPE_PACKED in variants.
645
b58d3df2
ML
6462015-11-27 Martin Liska <mliska@suse.cz>
647
648 PR c++/68312
649 * c-array-notation.c (fix_builtin_array_notation_fn):
650 Use release_vec_vec instead of vec::release.
651 (build_array_notation_expr): Likewise.
652 (fix_conditional_array_notations_1): Likewise.
653 (fix_array_notation_expr): Likewise.
654 (fix_array_notation_call_expr): Likewise.
655
aec17bfe
JJ
6562015-11-27 Jakub Jelinek <jakub@redhat.com>
657
658 PR c/63326
659 * c-parser.c (c_parser_compound_statement_nostart): If
660 last_label is true, use pragma_stmt instead of pragma_compound
661 as second c_parser_pragma argument.
662 (c_parser_omp_ordered, c_parser_omp_target_update,
663 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
664 false as second argument to c_parser_skip_to_pragma_eol after
665 diagnosing standalone directives used in pragma_stmt context.
666
688c4de0
IV
6672015-11-24 Ilya Verbin <ilya.verbin@intel.com>
668
669 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
670 with "if (ENABLE_OFFLOADING)".
671
cbd03aee
DM
6722015-11-23 David Malcolm <dmalcolm@redhat.com>
673
674 PR objc/68438
675 * c-parser.c (c_parser_postfix_expression): Set up source ranges
676 for various Objective-C constructs: Class.name syntax,
677 @selector(), @protocol(), @encode(), and [] message syntax.
678
a87a86e1
DM
6792015-11-20 David Malcolm <dmalcolm@redhat.com>
680
681 PR 62314
682 * c-typeck.c (should_suggest_deref_p): New function.
683 (build_component_ref): Special-case POINTER_TYPE when
684 generating a "not a structure of union" error message, and
685 suggest a "->" rather than a ".", providing a fix-it hint.
686
8ece8dfb
DM
6872015-11-19 David Malcolm <dmalcolm@redhat.com>
688
689 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
690 candidate into a new function, find_closest_identifier.
691
433068cc
MP
6922015-11-19 Marek Polacek <polacek@redhat.com>
693
694 PR c/68412
695 * c-typeck.c (parser_build_binary_op): Properly handle
696 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
697
bef08b71
DM
6982015-11-17 David Malcolm <dmalcolm@redhat.com>
699
700 * c-parser.c (set_c_expr_source_range): Bulletproof both
701 overloaded implementations against NULL expr->value.
702 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
703 values.
704 (c_parser_unary_expression): Likewise when handling addresses of
705 labels.
706 (c_parser_postfix_expression): Likewise for statement expressions,
707 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
708 __builtin_va_arg, and for __builtin_offset_of.
709 (c_parser_postfix_expression_after_paren_type): Initialize expr's
710 src_range using the range of the braced initializer.
711 (c_parser_transaction_expression): Set src_range for "ret" to a
712 sane pair of values.
713
fff77217
KY
7142015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
715
716 * c-parser.c (c_finish_omp_declare_simd): Look for
717 "simd" attribute as well. Update error message.
718
1d899da2
TS
7192015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
720
721 * c-parser.c (c_parser_omp_declare_target): Adjust.
722
e4606348
JJ
7232015-11-14 Jakub Jelinek <jakub@redhat.com>
724
725 * c-typeck.c (c_finish_omp_clauses): Don't mark
726 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
727
3e636daf
MP
7282015-11-14 Marek Polacek <polacek@redhat.com>
729
730 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
731 * c-typeck.c: Likewise.
732
ebedc9a3
DM
7332015-11-13 David Malcolm <dmalcolm@redhat.com>
734
735 * c-decl.c (warn_defaults_to): Pass line_table to
736 rich_location ctor.
737 * c-errors.c (pedwarn_c99): Likewise.
738 (pedwarn_c90): Likewise.
739 * c-parser.c (set_c_expr_source_range): New functions.
740 (c_token::get_range): New method.
741 (c_token::get_finish): New method.
742 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
743 based on the range from the start of the LHS to the end of the
744 RHS.
745 (c_parser_conditional_expression): Likewise, based on the range
746 from the start of the cond.value to the end of exp2.value.
747 (c_parser_binary_expression): Call set_c_expr_source_range on
748 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
749 (c_parser_cast_expression): Call set_c_expr_source_range on ret
750 based on the cast_loc through to the end of the expr.
751 (c_parser_unary_expression): Likewise, based on the
752 op_loc through to the end of op.
753 (c_parser_sizeof_expression) Likewise, based on the start of the
754 sizeof token through to either the closing paren or the end of
755 expr.
756 (c_parser_postfix_expression): Likewise, using the token range,
757 or from the open paren through to the close paren for
758 parenthesized expressions.
759 (c_parser_postfix_expression_after_primary): Likewise, for
760 various kinds of expression.
761 * c-tree.h (struct c_expr): Add field "src_range".
762 (c_expr::get_start): New method.
763 (c_expr::get_finish): New method.
764 (set_c_expr_source_range): New decls.
765 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
766 on ret for prefix unary ops.
767 (parser_build_binary_op): Likewise, running from the start of
768 arg1.value through to the end of arg2.value.
769
ec8b536f
MP
7702015-11-13 Marek Polacek <polacek@redhat.com>
771
772 PR c/68320
773 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
774
277fe616
DM
7752015-11-13 David Malcolm <dmalcolm@redhat.com>
776
777 * c-typeck.c: Include spellcheck.h.
778 (lookup_field_fuzzy_find_candidates): New function.
779 (lookup_field_fuzzy): New function.
780 (build_component_ref): If the field was not found, try using
781 lookup_field_fuzzy and potentially offer a suggestion.
782
6e232ba4
JN
7832015-11-12 James Norris <jnorris@codesourcery.com>
784 Joseph Myers <joseph@codesourcery.com>
785
786 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
787 (c_parser_omp_clause_name): Handle 'device_resident' clause.
788 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
789 and PRAGMA_OMP_CLAUSE_LINK.
790 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
791 and PRAGMA_OACC_CLAUSE_LINK.
792 (OACC_DECLARE_CLAUSE_MASK): New definition.
793 (c_parser_oacc_declare): New function.
794
9be4f715
MP
7952015-11-12 Marek Polacek <polacek@redhat.com>
796
797 PR c/67784
798 * c-parser.c (c_parser_for_statement): Reclassify the token in
799 a correct scope.
800
e78bede6
MP
8012015-11-11 Marek Polacek <polacek@redhat.com>
802
803 PR c/68107
804 PR c++/68266
805 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
806 checking the size of an array.
807
69f293c9
AM
8082015-11-11 Andrew MacLeod <amacleod@redhat.com>
809
810 * c-array-notation.c: Remove unused header files.
811 * c-aux-info.c: Likewise.
812 * c-convert.c: Likewise.
813 * c-decl.c: Likewise.
814 * c-errors.c: Likewise.
815 * c-lang.c: Likewise.
816 * c-objc-common.c: Likewise.
817 * c-parser.c: Likewise.
818 * c-typeck.c: Likewise.
819 * gccspec.c: Likewise.
820
3a40d81d
NS
8212015-11-09 Thomas Schwinge <thomas@codesourcery.com>
822 Cesar Philippidis <cesar@codesourcery.com>
823 James Norris <jnorris@codesourcery.com>
824 Julian Brown <julian@codesourcery.com>
825 Nathan Sidwell <nathan@codesourcery.com>
826
827 c/
828 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
829 routine arg.
830 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
831 (c_parser_pragma): Parse 'acc routine'.
832 (OACC_ROUTINE_CLAUSE_MARK): Define.
833 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
834
fc402eec
AA
8352015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
836
837 PR debug/67192
838 * c-typeck.c (c_finish_loop): For unconditional loops, set the
839 location of the backward-goto to the start of the loop body.
840
f6b0b3db
AA
8412015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
842
843 PR debug/67192
844 * c-parser.c (c_parser_while_statement): Finish the loop before
845 parsing ahead for misleading indentation.
846 (c_parser_for_statement): Likewise.
847
ee45a32d
EB
8482015-11-08 Eric Botcazou <ebotcazou@adacore.com>
849
850 * c-decl.c (finish_struct): If the structure has reverse storage
851 order, rewrite the type of array fields with scalar component. Call
852 maybe_apply_pragma_scalar_storage_order on entry.
853 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
854 errors on bit-fields and reverse SSO here and not...
855 (c_mark_addressable): ...here.
856 (output_init_element): Adjust call to initializer_constant_valid_p.
857 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
858
8a645150
DM
8592015-11-06 David Malcolm <dmalcolm@redhat.com>
860
861 * c-decl.c (warn_defaults_to): Update for change in signature
862 of diagnostic_set_info.
863 * c-errors.c (pedwarn_c99): Likewise.
864 (pedwarn_c90): Likewise.
865 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
866 for textinfo::set_location.
867
7a5e4956
CP
8682015-11-05 Cesar Philippidis <cesar@codesourcery.com>
869 Thomas Schwinge <thomas@codesourcery.com>
870 James Norris <jnorris@codesourcery.com>
871
872 * c-parser.c (c_parser_omp_clause_name): Add support for
873 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
874 (c_parser_omp_clause_default): Add is_oacc argument. Handle
875 default(none) in OpenACC.
876 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
877 arguments.
878 (c_parser_oacc_clause_tile): New function.
879 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
880 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
881 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
882 TILE}.
883 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
884 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
885 FIRSTPRIVATE}.
886 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
887 (c_parser_oacc_update): Update the error message for missing clauses.
888 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
889 and OMP_CLAUSE_INDEPENDENT.
890
bfcfbfa0
MP
8912015-11-05 Marek Polacek <polacek@redhat.com>
892
893 PR c/68090
894 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
895 deal with pre-evaluation on invalid types.
896
e01d41e5
JJ
8972015-11-05 Jakub Jelinek <jakub@redhat.com>
898 Ilya Verbin <ilya.verbin@intel.com>
899
900 * c-parser.c: Include context.h and gimple-expr.h.
901 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
902 monotonic together with nonmonotonic.
903 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
904 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
905 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
906 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
907 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
908 expressions on combined target teams before the target.
909 (c_parser_omp_declare_target): If decl has "omp declare target" or
910 "omp declare target link" attribute, and cgraph or varpool node already
911 exists, then set corresponding flags. Call c_finish_omp_clauses
912 in the parenthesized extended-list syntax case.
913 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
914 declare target.
915 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
916 on OMP_CLAUSE_REDUCTION array sections.
917 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
918 into the constant offset, or for variable low-bound using
919 POINTER_PLUS_EXPR. For structure element based array sections use
920 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
921 (c_finish_omp_clauses): Drop generic_field_head, structure
922 elements are now always mapped even as array section bases,
923 diagnose same var in data sharing and mapping clauses. Diagnose if
924 linear step on declare simd is neither a constant nor a uniform
925 parameter. Look through POINTER_PLUS_EXPR for array section
926 reductions. Diagnose the same var or function appearing multiple
927 times on the same directive. Fix up wording for the to clause if t
928 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
929 modifier on kinds other than dynamic or guided or nonmonotonic
930 modifier together with ordered clause.
931
4bf9e5a8
TS
9322015-11-03 Thomas Schwinge <thomas@codesourcery.com>
933 Chung-Lin Tang <cltang@codesourcery.com>
934
935 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
936
2adfab87
AM
9372015-10-29 Andrew MacLeod <amacleod@redhat.com>
938
939 * c-array-notation.c: Reorder #include's and remove duplicates.
940 * c-aux-info.c: Likewise.
941 * c-convert.c: Likewise.
942 * c-decl.c: Likewise.
943 * c-errors.c: Likewise.
944 * c-lang.c: Likewise.
945 * c-objc-common.c: Likewise.
946 * c-parser.c: Likewise.
947 * c-typeck.c: Likewise.
948
e922069e
JW
9492015-10-26 Jim Wilson <jim.wilson@linaro.org>
950
951 PR debug/66068
952 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
953 after calling build_qualified_type.
954
765dd391
CP
9552015-10-27 Cesar Philippidis <cesar@codesourcery.com>
956 Thomas Schwinge <thomas@codesourcery.com>
957 James Norris <jnorris@codesourcery.com>
958 Joseph Myers <joseph@codesourcery.com>
959 Julian Brown <julian@codesourcery.com>
960 Bernd Schmidt <bschmidt@redhat.com>
961
962 * c-parser.c (c_parser_oacc_shape_clause): New.
963 (c_parser_oacc_simple_clause): New.
964 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
965 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
966
88bae6f4
TS
9672015-10-27 Thomas Schwinge <thomas@codesourcery.com>
968 James Norris <jnorris@codesourcery.com>
969 Cesar Philippidis <cesar@codesourcery.com>
970
971 PR c/64765
972 PR c/64880
973 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
974 parameters, and handle these. Adjust all users.
975 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
976 into...
977 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
978 all users.
979 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
980 declare functions.
981 (c_finish_omp_construct): Declare function.
982 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
983 Merge functions into...
984 (c_finish_omp_construct): ... this new function.
985
a8fc2579
RB
9862015-10-22 Richard Biener <rguenther@suse.de>
987
988 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
989 before folding a MINUS_EXPR.
990
e9122ef6
MP
9912015-10-21 Marek Polacek <polacek@redhat.com>
992
993 PR c/68024
994 * c-decl.c (start_function): Warn about vararg functions without
995 a prototype.
996
9f47c7e5
IE
9972015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
998
999 * c-typeck.c (build_conditional_expr): Use boolean vector
1000 type for vector comparison.
1001 (build_vec_cmp): New.
1002 (build_binary_op): Use build_vec_cmp for comparison.
1003
fa60eeb9
MP
10042015-10-20 Marek Polacek <polacek@redhat.com>
1005
1006 * c-parser.c (is_cilkplus_vector_p): Don't define here.
1007
2c7020eb
MP
10082015-10-20 Marek Polacek <polacek@redhat.com>
1009
1010 PR c/67964
1011 * c-parser.c (c_parser_attributes): Break out of the loop if the
1012 token after an attribute isn't a comma.
1013
d9a6bd32
JJ
10142015-10-13 Jakub Jelinek <jakub@redhat.com>
1015 Aldy Hernandez <aldyh@redhat.com>
1016
1017 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
1018 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
1019 (c_parser_omp_variable_list): Handle structure elements for
1020 map, to and from clauses. Handle array sections in reduction
1021 clause. Formatting fixes.
1022 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
1023 if clause modifiers.
1024 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
1025 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
1026 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
1027 c_parser_omp_clause_is_device_ptr): New functions.
1028 (c_parser_omp_clause_ordered): Parse optional parameter.
1029 (c_parser_omp_clause_reduction): Handle array reductions.
1030 (c_parser_omp_clause_schedule): Parse optional simd modifier.
1031 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
1032 functions.
1033 (c_parser_omp_clause_linear): Parse linear clause modifiers.
1034 (c_parser_omp_clause_depend_sink): New function.
1035 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
1036 (c_parser_omp_clause_map): Parse release/delete map kinds and
1037 optional always modifier.
1038 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
1039 and c_finish_omp_clauses callers.
1040 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
1041 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
1042 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
1043 (OMP_CRITICAL_CLAUSE_MASK): Define.
1044 (c_parser_omp_critical): Parse critical clauses.
1045 (c_parser_omp_for_loop): Handle doacross loops, adjust
1046 c_finish_omp_for and c_finish_omp_clauses callers.
1047 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
1048 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
1049 (OMP_FOR_CLAUSE_MASK): Add linear clause.
1050 (c_parser_omp_for): Disallow ordered clause when combined with
1051 distribute. Disallow linear clause when combined with distribute
1052 and not combined with simd.
1053 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
1054 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
1055 parse clauses and if depend clause is found, don't parse a body.
1056 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
1057 Allow target parallel without for after it.
1058 (OMP_TASK_CLAUSE_MASK): Add priority clause.
1059 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
1060 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
1061 invalid kinds.
1062 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
1063 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
1064 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
1065 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
1066 functions.
1067 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
1068 defaultmap and is_device_ptr clauses.
1069 (c_parser_omp_target): Parse target parallel and target simd. Set
1070 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
1071 and target exit data. Diagnose invalid map kinds.
1072 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
1073 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
1074 construct.
1075 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
1076 &omp_priv.
1077 (OMP_TASKLOOP_CLAUSE_MASK): Define.
1078 (c_parser_omp_taskloop): New function.
1079 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
1080 handle PRAGMA_OMP_TASKLOOP.
1081 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
1082 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
1083 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
1084 Add IS_OMP argument, handle structure element bases, diagnose
1085 bitfields, pass IS_OMP recursively, diagnose known zero length
1086 array sections in depend clauses, handle array sections in reduction
1087 clause, diagnose negative length even for pointers.
1088 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
1089 types, pass IS_OMP down to handle_omp_array_sections_1, handle
1090 array sections in reduction clause, set
1091 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
1092 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
1093 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
1094 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
1095
21ba0cea
MP
10962015-10-06 Marek Polacek <polacek@redhat.com>
1097
1098 * c-parser.c (c_parser_statement_after_labels): Use
1099 protected_set_expr_location.
1100 (c_parser_omp_clause_num_gangs): Likewise.
1101 (c_parser_omp_clause_num_threads): Likewise.
1102 (c_parser_omp_clause_num_workers): Likewise.
1103 (c_parser_omp_clause_vector_length): Likewise.
1104 (c_parser_omp_clause_num_teams): Likewise.
1105 (c_parser_omp_clause_thread_limit): Likewise.
1106 * c-typeck.c (build_c_cast): Likewise.
1107 (c_cast_expr): Likewise.
1108
624d31fe
RS
11092015-10-05 Richard Sandiford <richard.sandiford@arm.com>
1110
1111 * c-typeck.c (c_tree_equal): Use real_equal instead of
1112 REAL_VALUES_EQUAL.
1113
b8fd7909
JM
11142015-10-04 Jason Merrill <jason@redhat.com>
1115
1116 * c-parser.c (c_lex_one_token): Handle @synchronized.
1117 * c-decl.c (match_builtin_function_types): A declaration of a built-in
1118 can change whether the function is transaction_safe.
1119
1c7485af
MP
11202015-10-02 Marek Polacek <polacek@redhat.com>
1121
1122 PR c/67730
1123 * c-typeck.c (convert_for_assignment): Use the expansion point
1124 location throughout.
1125
3e3b8d63
MP
11262015-10-02 Marek Polacek <polacek@redhat.com>
1127
1128 PR c/64249
1129 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
1130 and pass it down to c_parser_if_statement.
1131 (c_parser_else_body): Add CHAIN parameter and pass it down to
1132 c_parser_statement_after_labels.
1133 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
1134 duplicated if-else-if conditions.
1135
aabef2de
MP
11362015-10-01 Marek Polacek <polacek@redhat.com>
1137
1138 * c-typeck.c (convert_for_assignment): Improve commentary.
1139
de8ddd5f
MP
11402015-09-30 Marek Polacek <polacek@redhat.com>
1141
1142 PR c/67730
1143 * c-typeck.c (c_finish_return): Use the expansion point location for
1144 certain "return with value" warnings.
1145
c4914de6
MLI
11462015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
1147
1148 * c-parser.c (pragma_lex): Add loc argument.
1149
0e36f5c7
MP
11502015-09-15 Marek Polacek <polacek@redhat.com>
1151
1152 PR c/67580
1153 * c-decl.c (tag_exists_p): New function.
1154 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
1155 struct/union/enum keywords are missing.
1156 * c-tree.h (tag_exists_p): Declare.
1157
2f3bb934
MP
11582015-09-15 Marek Polacek <polacek@redhat.com>
1159
1160 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
1161 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
1162 Return NULL_TREE instead of 0.
1163 (lookup_name): Return NULL_TREE instead of 0.
1164 (lookup_name_in_scope): Likewise.
1165 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
1166 (parser_xref_tag): Use false instead of 0.
1167 (start_struct): Use true instead of 1.
1168 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
1169
aa256c4a
MP
11702015-09-14 Marek Polacek <polacek@redhat.com>
1171
1172 * c-typeck.c (set_nonincremental_init_from_string): Use
1173 HOST_WIDE_INT_M1U when shifting a negative value.
1174
dbb68221
MW
11752015-09-09 Mark Wielaard <mjw@redhat.com>
1176
1177 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
1178 parm against NULL.
1179
a8a098ac
JJ
11802015-09-10 Jakub Jelinek <jakub@redhat.com>
1181
1182 PR c/67502
1183 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
1184 into OMP_FOR_PRE_BODY rather than before the loop.
1185
f4b189d5
JJ
11862015-09-09 Jakub Jelinek <jakub@redhat.com>
1187
0bb99c11
JJ
1188 PR c/67501
1189 * c-parser.c (c_parser_oacc_all_clauses,
1190 c_parser_omp_all_clauses): Remove invalid clause from
1191 list of clauses even if parser->error is set.
1192
fce5e5e3
JJ
1193 PR c/67500
1194 * c-parser.c (c_parser_omp_clause_aligned,
1195 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
1196 test for errors.
1197 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
1198 error_mark_node.
1199
f4b189d5
JJ
1200 PR c/67495
1201 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
1202 instead of c_parser_unary_expression. If the result is !lvalue_p,
1203 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
1204
b2aaf235
MP
12052015-09-04 Marek Polacek <polacek@redhat.com>
1206
1207 PR sanitizer/67279
1208 * c-typeck.c (build_binary_op): Don't instrument static initializers.
1209
1807ffc1
MS
12102015-09-03 Martin Sebor <msebor@redhat.com>
1211
1212 PR c/66516
8b652e65
JJ
1213 * c-typeck.c (convert_arguments, parser_build_unary_op,
1214 build_conditional_expr, c_cast_expr, convert_for_assignment,
1215 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
1216 reject_gcc_builtin.
1217 (c_decl_implicit): Define.
1218
d04ff417
MP
12192015-09-02 Marek Polacek <polacek@redhat.com>
1220
1221 PR c/67432
1222 * c-parser.c (c_parser_enum_specifier): Give a better error for
1223 an empty enum.
1224
a79683d5
TS
12252015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
1226
1227 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
1228
191a6b94
MP
12292015-08-12 Marek Polacek <polacek@redhat.com>
1230
1231 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
1232 LOC to it.
1233
420a9d9b
MP
12342015-08-03 Marek Polacek <polacek@redhat.com>
1235
1236 PR c/67088
1237 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
1238 Use it.
1239 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
1240
992118a1
PP
12412015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
1242
1243 * c-parser.c (c_parser_if_body): Take token_indent_info
1244 argument. Call warn_for_misleading_indentation even when the
1245 body is a semicolon. Extract token_indent_infos corresponding
1246 to the guard, body and next tokens. Adjust call to
1247 warn_for_misleading_indentation accordingly.
1248 (c_parser_else_body): Likewise.
1249 (c_parser_if_statement): Likewise.
1250 (c_parser_while_statement): Likewise.
1251 (c_parser_for_statement): Likewise.
1252
46308474
LFSM
12532015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
1254 Manuel López-Ibáñez <manu@gcc.gnu.org>
1255
1256 * c-decl.c (get_parm_info): Remove static var. Update warning
1257 message.
1258
05b28fd6
MP
12592015-07-27 Marek Polacek <polacek@redhat.com>
1260
1261 PR c++/66555
1262 PR c/54979
1263 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
1264
451b5e48
MP
12652015-07-20 Marek Polacek <polacek@redhat.com>
1266
1267 PR c++/55095
1268 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
1269 (build_binary_op): Warn about left shift overflows.
1270
1916bcb5
AM
12712015-07-09 Andrew MacLeod <amacleod@redhat.com>
1272
1273 * c-array-notation.c: Adjust includes for flags.h changes.
1274 * c-objc-common.c: Likewise.
1275
c7131fb2
AM
12762015-07-07 Andrew MacLeod <amacleod@redhat.com>
1277
1278 * c-array-notation.c: Adjust includes.
1279 * c-aux-info.c: Likewise.
1280 * c-convert.c: Likewise.
1281 * c-decl.c: Likewise.
1282 * c-errors.c: Likewise.
1283 * c-lang.c: Likewise.
1284 * c-objc-common.c: Likewise.
1285 * c-parser.c: Likewise.
1286 * c-typeck.c: Likewise.
1287
da2e71c9
MLI
12882015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
1289
1290 PR fortran/66605
1291 * c-decl.c (finish_function): Call do_warn_unused_parameter.
1292
b155cfd9
MP
12932015-06-29 Marek Polacek <polacek@redhat.com>
1294
1295 PR c/66322
1296 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
1297 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
1298 about -Wswitch-bool here.
1299 (do_case): Update c_add_case_label call.
1300 (c_finish_case): Update c_do_switch_warnings call.
1301
31521951
MP
13022015-06-27 Marek Polacek <polacek@redhat.com>
1303
1304 * c-typeck.c: Use VECTOR_TYPE_P throughout.
1305
22d03525
MP
13062015-06-26 Marek Polacek <polacek@redhat.com>
1307
1308 * c-array-notation.c (fix_builtin_array_notation_fn): Use
1309 INDIRECT_REF_P.
1310 * c-typeck.c (array_to_pointer_conversion): Likewise.
1311 (build_unary_op): Likewise.
1312 (c_finish_return): Likewise.
1313
f0889939
AM
13142015-06-25 Andrew MacLeod <amacleod@redhat.com>
1315
1316 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
1317 * c-parser.c: Likewise.
1318
8d67ee55
RS
13192015-06-25 Richard Sandiford <richard.sandiford@arm.com>
1320
1321 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
1322 instead of pointer_hash.
1323 (detect_field_duplicates): Likewise.
1324
0ae9bd27
MP
13252015-06-25 Marek Polacek <polacek@redhat.com>
1326
1327 * c-array-notation.c: Use VAR_P throughout.
1328 * c-decl.c: Likewise.
1329 * c-objc-common.c: Likewise.
1330 * c-parser.c: Likewise.
1331 * c-typeck.c: Likewise.
1332
62f9079a
MP
13332015-06-25 Marek Polacek <polacek@redhat.com>
1334
1335 * c-decl.c: Use is_global_var throughout.
1336 * c-parser.c: Likewise.
1337 * c-typeck.c: Likewise.
1338
abb226c9
AM
13392015-06-17 Andrew MacLeod <amacleod@redhat.com>
1340
1341 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
1342 * c-aux-info.c: Likewise.
1343 * c-convert.c: Likewise.
1344 * c-decl.c: Likewise.
1345 * c-errors.c: Likewise.
1346 * c-lang.c: Likewise.
1347 * c-objc-common.c: Likewise.
1348 * c-parser.c: Likewise.
1349 * c-typeck.c: Likewise.
1350
8cbababc
JH
13512015-06-11 Jan Hubicka <hubicka@ucw.cz>
1352
1353 PR middle-end/66325
1354 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
1355 variants.
1356
a0349665
PMR
13572015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
1358
1359 * c-decl.c (pop_scope): Register the main translation unit
1360 through the new debug hook.
1361
13fdf2e2
AM
13622015-06-08 Andrew MacLeod <amacleod@redhat.com>
1363
1364 * c-array-notation.c : Adjust include files.
1365 * c-aux-info.c : Likewise.
1366 * c-convert.c : Likewise.
1367 * c-decl.c : Likewise.
1368 * c-errors.c : Likewise.
1369 * c-lang.c : Likewise.
1370 * c-lang.h : Likewise.
1371 * c-objc-common.c : Likewise.
1372 * c-parser.c : Likewise.
1373 * c-typeck.c : Likewise.
1374
d7438551
AH
13752015-06-05 Aldy Hernandez <aldyh@redhat.com>
1376
1377 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
1378 immediately clobber it.
1379 (c_write_global_declarations_1): Remove call to
1380 check_global_declaration_1.
1381 (c_write_global_declarations_2): Remove.
1382 (c_write_final_cleanups): Rename from c_write_global_declarations.
1383 Remove call to finalize_compilation_unit.
1384 Remove calls to debugging hooks.
1385 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
1386 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
1387 * c-tree.h: Remove c_write_global_declarations.
1388
ecb9f223
AM
13892015-06-04 Andrew MacLeod <amacleod@redhat.com>
1390
1391 * c-array-notation.c: Adjust includes for restructured coretypes.h.
1392 * c-aux-info.c: Likewise.
1393 * c-convert.c: Likewise.
1394 * c-decl.c: Likewise.
1395 * c-errors.c: Likewise.
1396 * c-lang.c: Likewise.
1397 * c-objc-common.c: Likewise.
1398 * c-parser.c: Likewise.
1399 * c-typeck.c: Likewise.
1400
9482b620
MP
14012015-06-04 Marek Polacek <polacek@redhat.com>
1402
1403 PR c/66341
1404 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
1405 it is a lvalue.
1406
bc51ace3
PK
14072015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1408
1409 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
1410 Warn for empty struct.
1411 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
1412
ea5b45b6
AT
14132015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
1414
1415 * c-decl.c (start_function): Call plugin before parsing.
1416 (finish_function): Call plugin after parsing.
1417
c2d47482
PK
14182015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1419
1420 PR c/49551
1421 * c-decl.c (merge_decls): Merge DECL_COMMON.
1422
a95492ab
JW
14232015-05-22 Jim Wilson <jim.wilson@linaro.org>
1424
1425 * Make-lang.in (check_gcc_pallelize): Define.
1426
fd5c817a
MP
14272015-05-22 Marek Polacek <polacek@redhat.com>
1428
1429 PR c/47043
1430 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
1431 attributes.
1432
c7b70a3c
MP
14332015-05-21 Marek Polacek <polacek@redhat.com>
1434
1435 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
1436 DECL_BUILT_IN.
1437
21b634ae
MP
14382015-05-20 Marek Polacek <polacek@redhat.com>
1439
1440 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
1441 * c-typeck.c: Likewise.
1442
296a8c2f
MP
14432015-05-19 Marek Polacek <polacek@redhat.com>
1444
1445 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
1446
41b37d5e
JJ
14472015-05-19 Jakub Jelinek <jakub@redhat.com>
1448
1449 PR middle-end/66199
1450 * c-parser.c (c_parser_omp_for_loop): Don't add
1451 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
1452 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
1453 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
1454 constructs.
1455
fab27f52
MM
14562015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
1457
1458 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 1459 swaps.
fab27f52 1460
40de31cf
MLI
14612015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
1462
1463 PR fortran/44054
1464 * c-objc-common.c (c_tree_printer): Replace locus pointer with
1465 accessor function.
1466
3aa3c9fc
MP
14672015-05-14 Marek Polacek <polacek@redhat.com>
1468
1469 PR c/66066
1470 PR c/66127
1471 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
1472 rather than with 0.
1473
c3388e62
DM
14742015-05-12 David Malcolm <dmalcolm@redhat.com>
1475
1476 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
1477 to add a call to warn_for_misleading_indentation.
1478 (c_parser_else_body): Likewise, adding param "else_loc".
1479 (c_parser_if_statement): Check for misleading indentation.
1480 (c_parser_while_statement): Likewise.
1481 (c_parser_for_statement): Likewise.
1482
755e528f
MP
14832015-05-08 Marek Polacek <polacek@redhat.com>
1484
1485 PR c/64918
1486 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
1487 (output_init_element): Likewise.
1488
0173bd2a
MP
14892015-05-07 Marek Polacek <polacek@redhat.com>
1490
1491 PR c/65179
1492 * c-typeck.c (build_binary_op): Warn when left shifting a negative
1493 value.
1494
9babc352
MP
14952015-04-30 Marek Polacek <polacek@redhat.com>
1496
1497 * c-typeck.c (set_init_label): Call error_at instead of error and
1498 pass LOC to it.
1499
ac9f18db
MP
1500 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
1501 the type of a decl.
1502
ec3fba51
MP
1503 * c-typeck.c (c_build_va_arg): Clarify the error message.
1504
b811915d
TS
15052015-04-29 Thomas Schwinge <thomas@codesourcery.com>
1506
1507 * c-parser.c (c_parser_oacc_enter_exit_data): Use
1508 OMP_STANDALONE_CLAUSES.
1509
f3075008
MP
15102015-04-28 Marek Polacek <polacek@redhat.com>
1511
1512 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
1513
4e81b788
MP
15142015-04-28 Marek Polacek <polacek@redhat.com>
1515
1516 PR c/65901
1517 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
1518
6c1db78e
MP
15192015-04-25 Marek Polacek <polacek@redhat.com>
1520
1521 PR c/52085
1522 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
1523 attribute.
1524
5c4abbb8
MP
15252015-04-23 Marek Polacek <polacek@redhat.com>
1526
1527 PR c/65345
1528 * c-decl.c (set_labels_context_r): New function.
1529 (store_parm_decls): Call it via walk_tree_without_duplicates.
1530 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
1531 instead of create_tmp_var. Build TARGET_EXPR instead of
1532 COMPOUND_EXPR.
1533 (build_atomic_assign): Use create_tmp_var_raw instead of
1534 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
1535
06aca1d5
IV
15362015-04-20 Ilya Verbin <ilya.verbin@intel.com>
1537
1538 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
1539 (c_parser_omp_target_update): Add missed %> to error_at ().
1540
8fba1830
BRF
15412015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
1542
1543 PR target/55143
1544 * c-decl.c (c_default_pointer_mode): Remove definition.
1545 * c-tree.h (c_default_pointer_mode): Remove declaration.
1546
62021f64
TB
15472015-03-27 Tobias Burnus <burnus@net-b.de>
1548
1549 PR c/65586
1550 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
1551 error out.
1552 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
1553 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
1554 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
1555
9b65e171
JJ
15562015-03-19 Jakub Jelinek <jakub@redhat.com>
1557
1558 * c-decl.c (c_decl_attributes): Also add "omp declare target"
1559 attribute for DECL_EXTERNAL VAR_DECLs.
1560
17958621
JJ
15612015-03-11 Jakub Jelinek <jakub@redhat.com>
1562
1563 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
1564 argument.
1565
7ccb1a11
JJ
15662015-03-10 Jakub Jelinek <jakub@redhat.com>
1567
1568 PR c/65120
1569 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
1570 before preparing arguments to warn_logical_not_parentheses.
1571
01177669
JJ
15722015-03-09 Jakub Jelinek <jakub@redhat.com>
1573
1574 PR c/65120
1575 * c-typeck.c (parser_build_binary_op): Don't warn for
1576 !!x == y or !b == y where b is _Bool.
1577
802ac282
MP
15782015-03-09 Marek Polacek <polacek@redhat.com>
1579
1580 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
1581 * c-decl.c (grokdeclarator): Likewise.
1582 * c-typeck.c (build_binary_op): Likewise.
1583
e5165b60
MP
15842015-02-27 Marek Polacek <polacek@redhat.com>
1585
1586 PR c/65228
1587 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
1588
065d214c
MP
15892015-02-14 Marek Polacek <polacek@redhat.com>
1590
1591 PR c/64768
1592 * c-decl.c (grokdeclarator): Set the range of a flexible array member
1593 declared through a typedef name.
1594
e5d9235b
MP
15952015-02-13 Marek Polacek <polacek@redhat.com>
1596
1597 PR c/65050
1598 * c-decl.c (grokdeclarator): Print also the type when giving
1599 the error message about array's incomplete element type.
1600
fa01ffcc
JJ
16012015-02-11 Jakub Jelinek <jakub@redhat.com>
1602
1603 PR c/64824
1604 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
1605 check in the POP macro.
1606
c3e38a03
MP
16072015-02-09 Marek Polacek <polacek@redhat.com>
1608
1609 PR c/64856
1610 * c-typeck.c (process_init_element): Don't always wrap
1611 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
1612 initializing a range of elements.
1613
4886ec8e
JJ
16142015-02-04 Jakub Jelinek <jakub@redhat.com>
1615
1616 PR c/64824
1617 PR c/64868
1618 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
1619
c3e38a03 16202015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
1621
1622 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
1623 processing enum declaration.
1624
7b33f0c8
MP
16252015-01-29 Marek Polacek <polacek@redhat.com>
1626
1627 PR c/64709
1628 * c-typeck.c (pop_init_level): If constructor_elements has
1629 exactly one element with integer_zerop value, set constructor_zeroinit
1630 to 1. Remove braces around warning_init call.
1631
dea63e49
JJ
16322015-01-27 Jakub Jelinek <jakub@redhat.com>
1633
1634 PR c/64766
1635 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
1636 of FUNCTION_DECLs with error_mark_node.
1637
d38f7dce
JJ
16382015-01-26 Jakub Jelinek <jakub@redhat.com>
1639
1640 PR c/64778
1641 * c-typeck.c (convert_arguments): Return -1 if there are
1642 error_args, even if we've diagnosed too many arguments.
1643
cbf5d0e7
RB
16442015-01-21 Richard Biener <rguenther@suse.de>
1645
1646 PR middle-end/64313
1647 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
1648 for builtins the user declared correctly.
1649
41dbbb37
TS
16502015-01-15 Thomas Schwinge <thomas@codesourcery.com>
1651 Bernd Schmidt <bernds@codesourcery.com>
1652 Cesar Philippidis <cesar@codesourcery.com>
1653 James Norris <jnorris@codesourcery.com>
1654 Jakub Jelinek <jakub@redhat.com>
1655 Ilmir Usmanov <i.usmanov@samsung.com>
1656
1657 * c-parser.c: Include "gomp-constants.h".
1658 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
1659 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
1660 Use OMP_CLAUSE_SET_MAP_KIND.
1661 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
1662 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
1663 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
1664 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
1665 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
1666 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
1667 "copyout", "create", "delete", "deviceptr", "gang", "host",
1668 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
1669 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
1670 "present_or_create", "pcreate", "seq", "self", "vector",
1671 "vector_length", "wait", "worker".
1672 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
1673 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
1674 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
1675 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
1676 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
1677 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
1678 (c_parser_oacc_data_clause_deviceptr)
1679 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
1680 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
1681 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
1682 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
1683 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
1684 (c_parser_oacc_parallel, c_parser_oacc_update)
1685 (c_parser_oacc_wait): New functions.
1686 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
1687 (c_finish_oacc_data): New prototypes.
1688 * c-typeck.c: Include "gomp-constants.h".
1689 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
1690 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
1691 OMP_CLAUSE_SET_MAP_KIND.
1692 (c_finish_oacc_parallel, c_finish_oacc_kernels)
1693 (c_finish_oacc_data): New functions.
1694 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
1695 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
1696 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
1697 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
1698 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
1699 GOMP_MAP_FORCE_DEVICEPTR.
1700
adfac8df
JJ
17012015-01-09 Michael Collison <michael.collison@linaro.org>
1702
1703 * c-array-notation.c: Include hash-set.h, machmode.h,
1704 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
1705 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
1706 * c-aux-info.c: Ditto.
1707 * c-convert.c: Ditto.
1708 * c-decl.c: Ditto.
1709 * c-errors.c: Ditto.
1710 * c-lang.c: Dittoxs.
1711 * c-objc-common.c: Ditto.
1712 * c-parser.c: Ditto.
1713 * c-typeck.c: Include hash-set.h, machmode.h,
1714 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
1715 fold-const.h, wide-int.h, inchash.h, real.h and
1716 fixed-value.h due to flattening of tree.h.
1717
2cc901dc
MP
17182015-01-07 Marek Polacek <polacek@redhat.com>
1719
1720 PR c/64417
1721 * c-typeck.c (process_init_element): Disallow initialization of
1722 a flexible array member with a string constant if the structure
1723 is in an array.
1724
5624e564
JJ
17252015-01-05 Jakub Jelinek <jakub@redhat.com>
1726
e5341100
JJ
1727 PR sanitizer/64344
1728 * c-typeck.c (convert_for_assignment, c_finish_return): For
1729 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
1730 types also set in_late_binary_op around convert call.
1731 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
1732 to integral type casts, if not in_late_binary_op, pass c_fully_fold
1733 result on expr as last argument to ubsan_instrument_float_cast,
1734 if in_late_binary_op, don't use c_save_expr but save_expr.
1735
5624e564
JJ
1736 Update copyright years.
1737
5bd012f8
MP
17382015-01-05 Marek Polacek <polacek@redhat.com>
1739
1740 PR c/64423
1741 * c-typeck.c (build_array_ref): Pass loc down to
1742 warn_array_subscript_with_type_char.
1743
768952be
MU
17442014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
1745
1746 * c-typeck.c: New behavious for pointers to arrays with qualifiers
1747 (common-pointer-type): For pointers to arrays take qualifiers from
1748 element type.
1749 (build_conditional_expr): Add warnings for lost qualifiers.
1750 (comp-target-types): Allow pointers to arrays with different qualifiers.
1751 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
1752 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
1753 to PEDWARN_FOR_QUALIFIERS.
1754
8f94a8c4
JJ
17552014-12-17 Jakub Jelinek <jakub@redhat.com>
1756
1757 PR sanitizer/64289
1758 * c-convert.c: Include ubsan.h.
1759 (convert): For real -> integral casts and
1760 -fsanitize=float-cast-overflow don't call convert_to_integer, but
1761 instead instrument the float cast directly.
1762
b731b390
JJ
17632014-11-29 Jakub Jelinek <jakub@redhat.com>
1764
1765 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
1766 c_finish_stmt_expr): Remove NULL last argument from
1767 create_tmp_var_raw and create_tmp_var calls.
1768 * c-array-notation.c (fix_builtin_array_notation_fn,
1769 build_array_notation_expr, fix_conditional_array_notations_1,
1770 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
1771
541e35a6
MP
17722014-11-28 Marek Polacek <polacek@redhat.com>
1773
1774 PR c/63862
1775 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
1776 convert the right operand to integer type.
1777
b286be94
MP
17782014-11-25 Marek Polacek <polacek@redhat.com>
1779
1780 PR c/63877
1781 * c-decl.c (start_function): Disable -Wmissing-declarations warning
1782 for inline functions.
1783
aa7da51a
JJ
17842014-11-21 Jakub Jelinek <jakub@redhat.com>
1785
1786 PR target/63764
1787 * c-typeck.c (build_array_ref): Adjust
1788 convert_vector_to_pointer_for_subscript caller. If it returns true,
1789 call non_lvalue_loc on the result.
1790
d876207f
RB
17912014-11-11 Richard Biener <rguenther@suse.de>
1792
1793 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
1794 to true.
1795
e5e44252
AK
17962014-11-10 Andi Kleen <ak@linux.intel.com>
1797
1798 PR c/60804
1799 * c-parser.c (c_parser_statement_after_labels): Call
1800 check_no_cilk.
1801 (c_parser_if_statement): Dito.
1802 (c_parser_switch_statement): Dito.
1803 (c_parser_while_statement): Dito.
1804 (c_parser_do_statement): Dito.
1805 (c_parser_for_statement): Dito.
1806 * c-typeck.c (c_finish_loop): Dito.
1807
13c21655
PC
18082014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
1809
1810 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
1811 OPT_Wshift_count_overflow in the warnings.
1812
2d51fcef
MP
18132014-10-30 Marek Polacek <polacek@redhat.com>
1814
1815 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
1816 print the stripped version as well, if they're not the same.
1817
ef4bddc2
RS
18182014-10-29 Richard Sandiford <richard.sandiford@arm.com>
1819
1820 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
1821 machine_mode.
1822
c582198b
AM
18232014-10-28 Andrew MacLeod <amacleod@redhat.com>
1824
1825 * c-decl.c: Adjust include files.
1826 * c-parser.c: Ditto.
1827
ddc8de03
PM
18282014-10-27 Phil Muldoon <pmuldoon@redhat.com>
1829 Tom Tromey <tromey@redhat.com>
1830
1831 * c-tree.h (enum c_oracle_request): New.
1832 (c_binding_oracle_function): New typedef.
1833 (c_binding_oracle, c_pushtag, c_bind): Declare.
1834 * c-decl.c (c_binding_oracle): New global.
1835 (I_SYMBOL_CHECKED): New macro.
1836 (i_symbol_binding): New function.
1837 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
1838 (I_TAG_CHECKED): New macro.
1839 (i_tag_binding): New function.
1840 (I_TAG_BINDING, I_TAG_DECL): Redefine.
1841 (I_LABEL_CHECKED): New macro.
1842 (i_label_binding): New function.
1843 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
1844 (c_print_identifier): Save and restore c_binding_oracle.
1845 (c_pushtag, c_bind): New functions.
1846
60393bbc
AM
18472014-10-27 Andrew MacLeod <amacleod@redhat.com>
1848
1849 * c-typeck.c: Adjust include files.
1850
d723bb7c
MLI
18512014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
1852
1853 PR c++/53061
1854 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
1855 initialization here...
1856 (c_initialize_diagnostics): ... but here. Set defaults after
1857 building pretty-printer.
1858
1bc5a451
MP
18592014-10-23 Marek Polacek <polacek@redhat.com>
1860
1861 PR c/63626
1862 * c-decl.c (pop_scope): Don't print warning in external_scope.
1863
4435bb92
MP
18642014-10-19 Marek Polacek <polacek@redhat.com>
1865
1866 PR c/63567
1867 * c-typeck.c (output_init_element): Allow initializing objects with
1868 static storage duration with compound literals even in C99 and add
1869 pedwarn for it.
1870
7278465e
MP
18712014-10-17 Marek Polacek <polacek@redhat.com>
1872
1873 PR c/63567
1874 * c-typeck.c (digest_init): Allow initializing objects with static
1875 storage duration with compound literals even in C99 and add pedwarn
1876 for it.
1877
d9b7be2e
MP
18782014-10-17 Marek Polacek <polacek@redhat.com>
1879
1880 PR c/63543
1881 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
1882 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
1883 error multiple times. Print the type.
1884
f406ae1f
MP
18852014-10-17 Marek Polacek <polacek@redhat.com>
1886
1887 PR c/63549
1888 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
1889 type.
1890
92574c7c
MP
18912014-10-17 Marek Polacek <polacek@redhat.com>
1892
1893 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
1894 (start_function): Use OPT_Wimplicit_int instead of 0.
1895 (store_parm_decls_oldstyle): Likewise.
1896
1bc4a978
MT
18972014-10-17 Alan Modra <amodra@gmail.com>
1898
1899 PR middle-end/61848
1900 * c-decl.c (merge_decls): Don't merge section name or tls model
1901 to newdecl symtab node, instead merge to olddecl. Override
1902 existing olddecl section name. Set tls_model for all thread-local
1903 vars, not just OMP thread-private ones. Remove incorrect comment.
1904
83685514
AM
19052014-10-16 Andrew MacLeod <amacleod@redhat.com>
1906
1907 * c-decl.c: Adjust include files.
1908
78a7c317
DD
19092014-10-14 DJ Delorie <dj@redhat.com>
1910
1911 * c-parser.c (c_parse_init): Add RID entries for each __intN.
1912 (c_token_starts_typename): Check all __intN, not just __int128.
1913 (c_token_starts_declspecs): Likewise.
1914 (c_parser_declspecs): Likewise.
1915 (c_parser_attribute_any_word): Likewise.
1916 (c_parser_objc_selector): Likewise.
1917 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
1918 (struct c_declspecs): Add int_n_idx field to record *which* __intN
1919 is specified.
1920 * c-decl.c (declspecs_add_type): Check for all __intN, not just
1921 __int128.
1922 (finish_declspecs): Likewise.
1923
74d98c1e
AB
19242014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
1925
1926 * c-parser.c (c_parser_all_labels): New function to replace
1927 the duplicate code.
1928 (c_parser_statement): Call the new function.
1929
84937de2
MP
19302014-10-09 Marek Polacek <polacek@redhat.com>
1931
1932 PR c/63480
1933 * c-typeck.c (pop_init_level): Don't warn about initializing
1934 with { }.
1935
0382aaa0
MP
19362014-10-07 Marek Polacek <polacek@redhat.com>
1937
1938 PR c/59717
1939 * c-decl.c (header_for_builtin_fn): New function.
1940 (implicitly_declare): Suggest which header to include.
1941
7a0ca710
MP
19422014-10-07 Marek Polacek <polacek@redhat.com>
1943
1944 * c-convert.c (convert): Use error_operand_p.
1945 * c-typeck.c (require_complete_type): Likewise.
1946 (really_atomic_lvalue): Likewise.
1947 (digest_init): Likewise.
1948 (handle_omp_array_sections_1): Likewise.
1949
6bc8a126
MP
19502014-10-03 Marek Polacek <polacek@redhat.com>
1951
1952 PR c/63453
1953 * c-decl.c (pop_scope): Don't warn about "inline function declared
1954 but never defined" for functions marked with gnu_inline attribute.
1955
d90c0a59
JJ
19562014-09-25 Jakub Jelinek <jakub@redhat.com>
1957
1958 PR c++/63249
1959 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
1960 on low_bound and length.
1961
083e891e
MP
19622014-09-24 Marek Polacek <polacek@redhat.com>
1963
1964 PR c/61405
1965 PR c/53874
1966 * c-parser.c: Don't define CPP_KEYWORD.
1967 (c_parser_switch_statement): Pass original type to c_finish_case.
1968 * c-tree.h (c_finish_case): Update declaration.
1969 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
1970 conditionally to c_do_switch_warnings.
1971
8d95fe25
MP
19722014-09-03 Marek Polacek <polacek@redhat.com>
1973
1974 PR c/62024
1975 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
1976 conversions.
1977
9a771876
JJ
19782014-09-02 Jakub Jelinek <jakub@redhat.com>
1979 Balaji V. Iyer <balaji.v.iyer@intel.com>
1980 Igor Zamyatin <igor.zamyatin@intel.com>
1981
1982 * c-parser.c (c_parser_cilk_for): New function.
1983 (c_parser_cilk_grainsize): Likewise.
1984 (c_get_temp_regvar): Likewise.
1985 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
1986 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
1987 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
1988 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
1989 case.
1990
b7679d96
CG
19912014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
1992
1993 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
1994 with using HOST_WIDE_INT without truncation to 'int'
1995
59ea0364
MP
19962014-08-22 Marek Polacek <polacek@redhat.com>
1997
1998 PR c++/62199
1999 * c-typeck.c (parser_build_binary_op): Adjust call to
2000 warn_logical_not_parentheses.
2001
671a475e
IZ
20022014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
2003
2004 PR other/62008
2005 * c-parser.c (c_parser_array_notation): Check for correct
2006 type of an array added.
2007
04159acf
MP
20082014-08-19 Marek Polacek <polacek@redhat.com>
2009
2010 PR c++/62153
2011 * c-typeck.c (build_binary_op): If either operand of a comparison
2012 is a boolean expression, call maybe_warn_bool_compare.
2013
c77935ee
PP
20142014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
2015
2016 PR c/45584
2017 * c-typeck.c (build_c_cast): Do a conversion even when the
2018 TYPE_MAIN_VARIANTs are the same.
2019
35aff4fb
MP
20202014-08-19 Marek Polacek <polacek@redhat.com>
2021
2022 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
2023 pedwarn_c99 instead of pedwarn.
2024 (grokfield): Likewise.
2025 (warn_defaults_to): New function.
2026 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
2027 Unconditionally call pedwarn_c99 instead of pedwarn.
2028 (start_function): Call warn_defaults_to instead of pedwarn_c99.
2029 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
2030 check flag_isoc11 before.
2031 * c-errors.c (pedwarn_c99): Change the return type to bool.
2032 Handle -Wc99-c11-compat.
2033 * c-parser.c (disable_extension_diagnostics): Handle
2034 warn_c99_c11_compat.
2035 (restore_extension_diagnostics): Likewise.
2036 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
2037 instead of pedwarn, don't check flag_isoc11 before.
2038 (c_parser_declspecs): Likewise.
2039 (c_parser_alignas_specifier): Likewise.
2040 (c_parser_alignof_expression): Likewise.
2041 (c_parser_generic_selection): Likewise.
2042 * c-tree.h (pedwarn_c99): Update declaration.
2043 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
2044 of pedwarn_c99.
2045
177cce46
MP
20462014-08-19 Marek Polacek <polacek@redhat.com>
2047
2048 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
2049 to pedwarn_c90.
2050 * c-errors.c: Include "opts.h".
2051 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
2052 * c-parser.c (disable_extension_diagnostics): Handle negative value
2053 of warn_c90_c99_compat, too.
2054 (restore_extension_diagnostics): Likewise.
2055 (c_parser_compound_statement_nostart): Pass
2056 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
2057
6dc99c33
MP
20582014-08-12 Marek Polacek <polacek@redhat.com>
2059
2060 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
2061 Add pedwarn.
2062 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
2063 Likewise.
2064 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
2065
f3bede71
MP
20662014-08-10 Marek Polacek <polacek@redhat.com>
2067
2068 PR c/51849
2069 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
2070 Call pedwarn_c90 instead of pedwarn.
2071 (check_bitfield_type_and_width): Likewise.
2072 (declspecs_add_qual): Likewise.
2073 (declspecs_add_type): Likewise.
2074 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
2075 Adjust to only call pedwarn_c90.
2076 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
2077 pedwarn_c90 instead of pedwarn.
2078 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
2079 * c-parser.c (disable_extension_diagnostics): Handle
2080 warn_c90_c99_compat.
2081 (restore_extension_diagnostics): Likewise.
2082 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
2083 pedwarn_c90 instead of pedwarn.
2084 (c_parser_initelt): Likewise.
2085 (c_parser_postfix_expression): Likewise.
2086 (c_parser_postfix_expression_after_paren_type): Likewise.
2087 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
2088 * c-tree.h: Fix formatting.
2089 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
2090 pedwarn_c90 instead of pedwarn.
2091
9f25a338
TS
20922014-08-07 Trevor Saunders <tsaunders@mozilla.com>
2093
2094 * c-typeck.c: Remove include of pointer-set.h.
2095
044331a8
MP
20962014-08-07 Marek Polacek <polacek@redhat.com>
2097
2098 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
2099
b787e7a2
TS
21002014-08-02 Trevor Saunders <tsaunders@mozilla.com>
2101
2102 * c-typeck.c: Use hash_map instead of pointer_map.
2103
6e2830c3
TS
21042014-08-02 Trevor Saunders <tsaunders@mozilla.com>
2105
2106 * c-decl.c: Use hash_set instead of pointer_set.
2107
a7ee52fb
IZ
21082014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
2109
2110 PR middle-end/61455
2111 * c-array-notation.c (expand_array_notations): Handling
2112 of DECL_EXPR added.
2113
b4dfdc11
MG
21142014-07-31 Marc Glisse <marc.glisse@inria.fr>
2115
2116 PR c++/60517
2117 * c-typeck.c (c_finish_return): Return 0 instead of the address of
2118 a local variable.
2119
976d5a22
TT
21202014-07-30 Tom Tromey <tromey@redhat.com>
2121
2122 * c-typeck.c (struct constructor_stack) <designator_depth>: New
2123 field.
2124 (really_start_incremental_init, push_init_level): Initialize
2125 designator_depth.
2126 (pop_init_level): Set global designator_depth.
2127 (process_init_element): Check for designated_init attribute.
2128
30281de2
MP
21292014-07-20 Marek Polacek <polacek@redhat.com>
2130
2131 PR c/61852
2132 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
2133 (implicitly_declare): Pass location to implicit_decl_warning.
2134
b108f48f
JJ
21352014-07-14 Jakub Jelinek <jakub@redhat.com>
2136
2137 PR middle-end/61294
2138 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
2139 If non-NULL, call c_parser_check_literal_zero.
2140 (c_parser_check_literal_zero): New function.
2141 (c_parser_postfix_expression_after_primary): Adjust
2142 c_parser_expr_list caller, handle -Wmemset-transposed-args.
2143
773ec47f
MP
21442014-07-06 Marek Polacek <polacek@redhat.com>
2145
2146 PR c/6940
2147 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
2148 * c-tree.h (C_ARRAY_PARAMETER): Define.
2149 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
2150 function parameter.
2151
22e1cf1c
JH
21522014-07-02 Jan Hubicka <hubicka@ucw.cz>
2153 Chen Gang <gang.chen.5i5j@gmail.com>
2154
2155 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
2156 releasing symbol.
2157
52ec0ea3
MP
21582014-07-01 Marek Polacek <polacek@redhat.com>
2159
2160 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
2161 instead of 0 to WARN_FOR_ASSIGNMENT.
2162
d5c3d343
MP
21632014-07-01 Marek Polacek <polacek@redhat.com>
2164
2165 PR c/58286
2166 * c-typeck.c (convert_for_assignment): Pass
2167 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
2168
6a7253a4
MP
21692014-06-30 Marek Polacek <polacek@redhat.com>
2170
2171 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
2172 has no_sanitize_undefined attribute.
2173
5e88a8f4
IZ
21742014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
2175
2176 PR middle-end/57541
2177 * c-array-notation.c (fix_builtin_array_notation_fn):
2178 Check for 0 arguments in builtin call. Check that bultin argument is
2179 correct.
2180 * c-parser.c (c_parser_array_notation): Check for incorrect initial
2181 index.
2182
9698b078
SH
21832014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
2184
2185 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
2186 qualifiers in __auto_type for atomic types.
2187 (c_parser_typeof_specifier): Discard all type qualifiers in
2188 __typeof__ for atomic types.
2189
6e07c515
MP
21902014-06-25 Marek Polacek <polacek@redhat.com>
2191
2192 PR c/61162
2193 * c-parser.c (c_parser_statement_after_labels): Pass the location of
2194 the return expression to c_finish_return.
2195
da6f124d
JJ
21962014-06-25 Jakub Jelinek <jakub@redhat.com>
2197
2198 * c-typeck.c (c_finish_omp_clauses): Make sure
2199 OMP_CLAUSE_LINEAR_STEP has correct type.
2200
c203e8a7
TS
22012014-06-24 Trevor Saunders <tsaunders@mozilla.com>
2202
2203 * c-decl.c: Adjust.
2204
56ad0e38
JJ
22052014-06-24 Jakub Jelinek <jakub@redhat.com>
2206
2207 * c-parser.c (c_parser_omp_for_loop): For
2208 #pragma omp parallel for simd move lastprivate clause from parallel
2209 to for rather than simd.
2210
47c2554f
MP
22112014-06-23 Marek Polacek <polacek@redhat.com>
2212
2213 * c-typeck.c (parser_build_binary_op): Don't call
2214 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
2215
56363ffd
JH
22162014-06-15 Jan Hubicka <hubicka@ucw.cz>
2217
2218 * c-parser.c (c_parser_omp_threadprivate): Likewise.
2219 * c-decl.c (merge_decls): Likewise.
2220
d7ff7ae5
MP
22212014-06-09 Marek Polacek <polacek@redhat.com>
2222
2223 PR c/36446
2224 * c-typeck.c (error_init): Call inform instead of error_at.
2225 (pedwarn_init): Call inform instead of pedwarn.
2226 (warning_init): Call inform instead of warning_at.
2227
24d047a3
JH
22282014-06-07 Jan Hubicka <hubicka@ucw.cz>
2229
2230 * c-decl.c (merge_decls): Use set_decl_section_name.
2231 (duplicate_decls): Remove node if it exists.
2232
9bac5cbb
G
22332014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
2234
2235 PR c/53119
2236 * c-typeck.c (push_init_level, process_init_element,
2237 pop_init_level): Correct check for zero initialization, move
2238 missing brace warning to respect zero initialization.
2239
8ffcdea8
MP
22402014-06-05 Marek Polacek <polacek@redhat.com>
2241
2242 PR c/56724
2243 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
2244
742938c9
MP
22452014-06-05 Marek Polacek <polacek@redhat.com>
2246
2247 PR c/49706
2248 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
2249 on the left hand side operand of a comparison.
2250
6447c55d
MP
22512014-06-05 Marek Polacek <polacek@redhat.com>
2252
2253 PR c/48062
2254 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
2255 Print note only if the warning was printed.
2256
9dc7743c
IZ
22572014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
2258
2259 PR c/58942
2260 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
2261 with a pointer.
2262
fedfecef
MP
22632014-06-03 Marek Polacek <polacek@redhat.com>
2264
2265 PR c/60439
2266 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
2267 c_start_case.
2268 * c-tree.h (c_start_case): Update.
2269 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
2270 switch condition has boolean value.
2271
9b2b7279
AM
22722014-06-02 Andrew MacLeod <amacleod@redhat.com>
2273
2274 * c-decl.c: Include builtins.h.
2275 * c-parser.c: Likewise.
2276
5c1bc275
MP
22772014-05-27 Marek Polacek <polacek@redhat.com>
2278
2279 PR c/56724
2280 * c-typeck.c (convert_arguments): Get location of a parameter. Change
2281 error and warning calls to error_at and warning_at. Pass location of
2282 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
2283 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
2284 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
2285
97563bc8
IZ
22862014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
2287
2288 PR c/61191
2289 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
2290 function parameters.
2291
aede2c10
JH
22922014-05-23 Jan Hubicka <hubicka@ucw.cz>
2293
2294 * c-decl.c (merge_decls): Preserve symtab node pointers.
2295 (duplicate_decls): Free new decl.
2296
edbba2ce
TS
22972014-05-23 Thomas Schwinge <thomas@codesourcery.com>
2298
f3316c6d
TS
2299 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
2300 initialization.
2301
edbba2ce
TS
2302 * c-parser.c (c_parser_omp_target): Return bool values.
2303
68c81f24
TS
23042014-05-22 Thomas Schwinge <thomas@codesourcery.com>
2305
2306 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
2307 num_teams_loc variable to num_thread_limit_loc.
2308
632f2871
RS
23092014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
2310
2311 * c-array-notation.c (expand_array_notations): Use void_node
2312 instead of void_zero_node.
2313
766090c2
TS
23142014-05-17 Trevor Saunders <tsaunders@mozilla.com>
2315
2316 * c-decl.c (finish_struct): Adjust.
2317 (finish_enum): Likewise.
2318 (bind): Adjust.
2319 (record_inline_static): Likewise.
2320 (push_scope): Likewise.
2321 (make_label): Likewise.
2322 (lookup_label_for_goto): Likewise.
2323 (finish_struct): Likewise.
2324 (finish_enum): Likewise.
2325 (store_parm_decls): Likewise.
2326 (c_push_function_context): Likewise.
2327 * c-lang.h: Remove usage of variable_size gty attribute.
2328 * c-parser.c (c_parse_init): Adjust.
2329 (c_parse_file): Likewise.
2330
2b107f6b
MP
23312014-05-13 Marek Polacek <polacek@redhat.com>
2332
2333 PR c/61162
2334 * c-typeck.c (convert_for_assignment): Pass location to
2335 WARN_FOR_ASSIGNMENT instead of input_location.
2336
d033409e
MP
23372014-05-10 Marek Polacek <polacek@redhat.com>
2338
2339 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
2340 maybe_warn_string_init.
2341 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
2342 maybe_warn_string_init.
2343 * c-tree.h (maybe_warn_string_init): Update declaration.
2344 * c-typeck.c (maybe_warn_string_init): Add location parameter.
2345 Call pedwarn_init with loc instead of with input_location.
2346 (digest_init): Pass init_loc to maybe_warn_string_init.
2347 (pop_init_level): Call pedwarn_init with loc instead of with
2348 input_location.
2349 (set_init_index): Likewise.
2350 (process_init_element): Likewise.
2351
ea58ef42
MP
23522014-05-09 Marek Polacek <polacek@redhat.com>
2353
2354 PR c/61096
2355 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
2356 (c_parser_initelt): Pass location to set_init_label. Pass array index
2357 location to set_init_index.
2358 * c-tree.h (push_init_level): Update declaration.
2359 (pop_init_level): Likewise.
2360 (set_init_index): Likewise.
2361 (set_init_label): Likewise.
2362 * c-typeck.c (error_init): Add location parameter. Call error_at
2363 instead of error.
2364 (digest_init): Pass init_loc to error_init.
2365 (really_start_incremental_init):
2366 (push_init_level): Add location parameter. Pass loc to pop_init_level
2367 and error_init.
2368 (pop_init_level): Likewise.
2369 (set_designator): Add location parameter. Pass loc to pop_init_level,
2370 push_init_level, and error_init.
2371 (set_init_index): Add location parameter. Pass loc to error_init and
2372 set_designator.
2373 (set_init_label): Likewise.
2374 (output_init_element): Pass loc to error_init.
2375 (process_init_element): Pass loc to error_init, pop_init_level,
2376 pedwarn_init, and push_init_level.
2377
661a0813
MP
23782014-05-09 Marek Polacek <polacek@redhat.com>
2379
2380 PR c/50459
2381 * c-parser.c (c_parser_attributes): Parse the arguments as an
2382 expression-list if the attribute takes identifier.
2383
2793eeab
MP
23842014-05-08 Marek Polacek <polacek@redhat.com>
2385
2386 PR c/61053
2387 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
2388 TYPE_ALIGN_UNIT.
2389
f827930a
MP
23902014-05-08 Marek Polacek <polacek@redhat.com>
2391
2392 PR c/61077
2393 * c-decl.c (start_function): Warn for _Atomic-qualified return type
2394 of main.
2395
1d60af08
KZ
23962014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
2397 Mike Stump <mikestump@comcast.net>
2398 Richard Sandiford <rdsandiford@googlemail.com>
2399
2400 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
2401 (finish_enum): Use wide-int interfaces.
2402 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
2403 * c-typeck.c (build_c_cast): Likewise.
2404 (set_nonincremental_init_from_string): Likewise.
2405 (c_tree_equal): Likewise.
2406
a0e24419
MP
24072014-05-02 Marek Polacek <polacek@redhat.com>
2408
2409 PR c/25801
2410 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
2411 Return size_one_node when the type is not complete.
2412 (pointer_diff): Remove comment.
2413 (build_unary_op): Improve error messages.
2414
19fc9faa
MP
24152014-05-02 Marek Polacek <polacek@redhat.com>
2416
2417 * c-typeck.c (c_finish_return): Separate warning_at calls.
2418
63bc4e87
MP
24192014-05-02 Marek Polacek <polacek@redhat.com>
2420
2421 * c-tree.h (error_init): Remove declaration.
2422 (pedwarn_init): Likewise.
2423 * c-typeck.c (error_init): Make static and move above.
2424 (pedwarn_init): Likewise.
2425 (warning_init): Move above.
2426 (maybe_warn_string_init): Likewise.
2427
4bd2511b
JL
24282014-05-01 Jeff Law <law@redhat.com>
2429
2430 Revert:
2431
2432 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2433 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
2434 avoid goto.
2435
6a358dcb
MP
24362014-05-02 Marek Polacek <polacek@redhat.com>
2437
2438 PR c/60784
2439 * c-typeck.c (push_init_level): Set constructor_designated to
2440 p->designated for structures.
2441
ae5ebda4
MP
24422014-05-01 Marek Polacek <polacek@redhat.com>
2443
2444 PR c/60915
2445 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
2446 function-definition has an attribute after the declarator.
2447
96b40f8d
MP
24482014-05-01 Marek Polacek <polacek@redhat.com>
2449
2450 PR c/60257
2451 * c-typeck.c (warning_init): Add location_t parameter. Call
2452 warning_at instead of warning.
2453 (push_init_level): Pass input_location to warning_init.
2454 (add_pending_init): Add location_t parameter. Pass loc to
2455 warning_init.
2456 (set_nonincremental_init): Pass input_location to add_pending_init.
2457 (set_nonincremental_init_from_string): Likewise.
2458 (output_init_element): Pass loc to warning_init and to
2459 add_pending_init.
2460
32e00768
MP
24612014-05-01 Marek Polacek <polacek@redhat.com>
2462
2463 PR c/43395
2464 * c-typeck.c (c_finish_return): Distinguish between label and variable
2465 when warning about returning local address.
2466
c9379ce2
MP
24672014-05-01 Marek Polacek <polacek@redhat.com>
2468
2469 PR c/29467
2470 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
2471 in C89 mode.
2472
d00887e8
MP
24732014-05-01 Marek Polacek <polacek@redhat.com>
2474
2475 PR c/43245
2476 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
2477 instead of 0 to WARN_FOR_QUALIFIERS.
2478
5436fa2e
MP
24792014-05-01 Marek Polacek <polacek@redhat.com>
2480
2481 PR c/56989
2482 * c-typeck.c (default_conversion): Use better location for
2483 error call.
2484
f8ed5150
MP
24852014-04-30 Marek Polacek <polacek@redhat.com>
2486
2487 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
2488 also when SANITIZE_FLOAT_DIVIDE is on.
2489
8337d1db
MP
24902014-04-30 Marek Polacek <polacek@redhat.com>
2491
2492 PR c/60139
2493 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
2494 and pedwarn_init. Use loc insted of input_location.
2495
c4bdc42f
MP
24962014-04-30 Marek Polacek <polacek@redhat.com>
2497
2498 PR c/60351
2499 * c-typeck.c (build_binary_op): Use location when warning about
2500 shift count.
2501
45484dcf
MP
25022014-04-25 Marek Polacek <polacek@redhat.com>
2503
2504 PR c/18079
2505 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
2506 always_inline/noinline and hot/cold attributes.
2507
34cf811f
MP
25082014-04-25 Marek Polacek <polacek@redhat.com>
2509
2510 PR c/60114
2511 * c-parser.c (c_parser_initelt): Pass input_location to
2512 process_init_element.
2513 (c_parser_initval): Pass loc to process_init_element.
2514 * c-tree.h (process_init_element): Adjust declaration.
2515 * c-typeck.c (push_init_level): Pass input_location to
2516 process_init_element.
2517 (pop_init_level): Likewise.
2518 (set_designator): Likewise.
2519 (output_init_element): Add location_t parameter. Pass loc to
2520 digest_init.
2521 (output_pending_init_elements): Pass input_location to
2522 output_init_element.
2523 (process_init_element): Add location_t parameter. Pass loc to
2524 output_init_element.
2525
42056eac
JJ
25262014-04-24 Jakub Jelinek <jakub@redhat.com>
2527
2528 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
2529 atomic-clause, allow comma in between atomic-clause and
2530 seq_cst.
2531
e162a134
JJ
25322014-04-22 Jakub Jelinek <jakub@redhat.com>
2533
2534 PR c/59073
2535 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
2536 fails, don't set OM_PARALLEL_COMBINED and return NULL.
2537
2f6babac
IZ
25382014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
2539
2540 PR middle-end/60469
2541 * c-array-notation.c (fix_builtin_array_notation_fn): Use
2542 create_tmp_var instead build_decl for creating temps.
2543 (build_array_notation_expr): Likewise.
2544 (fix_conditional_array_notations_1): Likewise.
2545 (fix_array_notation_expr): Likewise.
2546 (fix_array_notation_call_expr): Likewise.
2547
8edbfaa6
JJ
25482014-03-28 Jakub Jelinek <jakub@redhat.com>
2549
2550 PR c++/60689
2551 * c-tree.h (c_build_function_call_vec): New prototype.
2552 * c-typeck.c (build_function_call_vec): Don't call
2553 resolve_overloaded_builtin here.
2554 (c_build_function_call_vec): New wrapper function around
2555 build_function_call_vec. Call resolve_overloaded_builtin here.
2556 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
2557 Call c_build_function_call_vec instead of build_function_call_vec.
2558 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2559 * c-decl.c (finish_decl): Likewise.
2560
7485aeea
MLI
25612014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
2562
2563 PR c/55383
2564 * c-typeck.c: Use correct format string in cast-qual warning
2565
b17a8b07
TS
25662014-03-07 Thomas Schwinge <thomas@codesourcery.com>
2567
2568 * c-decl.c (c_decl_attributes): Use
2569 lang_hooks.types.omp_mappable_type.
2570 * c-typeck.c (c_finish_omp_clauses): Likewise.
2571
3af9c5e9
MP
25722014-03-06 Marek Polacek <polacek@redhat.com>
2573
2574 PR c/60197
2575 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
2576 of checking tree code.
2577
1c9f5f33
PK
25782014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2579
2580 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
2581 (c_parser_parameter_declaration): Likewise.
2582
cc28fc7f
MP
25832014-02-19 Marek Polacek <polacek@redhat.com>
2584
2585 PR c/60195
2586 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
2587 Call mark_exp_read on exp.value.
2588 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
2589 TREE_ADDRESSABLE on old instead of val.
2590 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
2591
b581c05c
PK
25922014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2593
2594 * c-parser.c (c_parser_get_builtin_args): Replace calls to
2595 C_EXPR_APPEND by vec_safe_push.
2596 * c-tree.h (C_EXPR_APPEND): Remove.
2597
81e5eca8
MP
25982014-01-31 Marek Polacek <polacek@redhat.com>
2599
2600 PR c/59963
2601 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
2602 build_function_call_vec.
2603 (build_function_call): Likewise.
2604 (build_atomic_assign): Likewise.
2605 (build_function_call_vec): Add arg_loc parameter. Use it.
2606 (convert_arguments): Likewise.
2607 (convert_for_assignment): Rename rhs_loc to expr_loc.
2608 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
2609 (c_parser_objc_keywordexpr): Likewise.
2610 (c_parser_postfix_expression_after_primary): Call
2611 build_function_call_vec with expr_loc rather than op_loc.
2612 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
2613 build_function_call_vec.
2614 (c_parser_expr_list): Add locations parameter. Fill it with locations
2615 of function arguments.
2616 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
2617
68fca595
MP
26182014-01-30 Marek Polacek <polacek@redhat.com>
2619
2620 PR c/59940
2621 * c-typeck.c (build_function_call_vec): Use loc parameter.
2622 (convert_arguments): Add location parameter. Use it.
2623 (ep_convert_and_check): Likewise.
2624 (build_atomic_assign): Adjust convert_for_assignment call.
2625 (build_modify_expr): Likewise.
2626 (digest_init): Likewise.
2627 (c_finish_return): Likewise.
2628 (build_conditional_expr): Adjust ep_convert_and_check calls.
2629 (convert_for_assignment): Add rhs_loc parameter. Use it.
2630 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
2631 calls.
2632
fa337f3a
RB
26332014-01-30 Richard Biener <rguenther@suse.de>
2634
2635 PR c/59905
2636 * c-typeck.c (build_function_call_vec): Do not replace calls
2637 to a function via an incompatible type with a runtime abort.
2638
b72271b9
BI
26392014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
2640
2641 * c-parser.c (c_parser_declaration_or_fndef): Replaced
2642 flag_enable_cilkplus with flag_cilkplus.
2643 (c_parser_direct_declarator_inner): Likewise.
2644 (c_parser_attribute_any_word): Likewise.
2645 (c_parser_attributes): Likewise.
2646 (c_parser_compound_statement): Likewise.
2647 (c_parser_statement_after_labels): Likewise.
2648 (c_parser_if_statement): Likewise.
2649 (c_parser_switch_statement): Likewise.
2650 (c_parser_do_statement): Likewise.
2651 (c_parser_for_statement): Likewise.
2652 (c_parser_unary_expression): Likewise.
2653 (c_parser_postfix_expression): Likewise.
2654 (c_parser_postfix_expression_after_primary): Likewise.
2655 (c_parser_postfix_expression_after_primary): Likewise.
2656 (c_parser_omp_clause_name): Likewise.
2657 (c_finish_omp_declare_simd): Likewise.
2658 (c_parser_cilk_verify_simd): Likewise.
2659 * c-typeck.c (build_array_ref): Likewise.
2660 (build_function_call_vec): Likewise.
2661 (convert_arguments): Likewise.
2662 (build_compound_expr): Likewise.
2663 (c_finish_return): Likewise.
2664 (c_finish_if_stmt): Likewise.
2665 (c_finish_loop): Likewise.
2666 (build_binary_op): Likewise.
2667
393e8e8b
MP
26682014-01-23 Marek Polacek <polacek@redhat.com>
2669
2670 PR c/59846
2671 * c-typeck.c (parser_build_binary_op): Use location instead of
2672 input_location.
2673 (build_binary_op): Pass location to shorten_compare.
2674
f04dda30
MP
26752014-01-23 Marek Polacek <polacek@redhat.com>
2676
2677 PR c/58346
2678 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
2679 an empty aggregate.
2680
789eadcd
MP
26812014-01-23 Marek Polacek <polacek@redhat.com>
2682
2683 PR c/59871
2684 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
2685 of a comma expression.
2686 (emit_side_effect_warnings): Likewise.
2687
40f14e9f
BI
26882014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
2689
2690 PR c/59825
2691 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
2692 function to use walk_tree and moved a lot of its functionality to
2693 expand_array_notations.
2694 (expand_array_notations): New function.
2695
74558dd9
BI
26962014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
2697
2698 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
2699 attribute an attribute without value.
2700
652fea39
JJ
27012014-01-23 Jakub Jelinek <jakub@redhat.com>
2702
2703 PR middle-end/58809
2704 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
2705 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
2706
f34f1c87
MP
27072014-01-22 Marek Polacek <polacek@redhat.com>
2708
2709 PR c/59891
2710 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
2711 of remove_c_maybe_const_expr on op1 and op2.
2712
241f845a
JJ
27132014-01-15 Jakub Jelinek <jakub@redhat.com>
2714
2715 PR c/58943
2716 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
2717 effects, preevaluate rhs using SAVE_EXPR first.
2718
9a74f20c
BI
27192014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
2720
2721 PR c++/59631
2722 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
2723 statements with if-elseif statements.
2724
96066ce1
MP
27252014-01-06 Marek Polacek <polacek@redhat.com>
2726
2727 PR c/57773
2728 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
2729 defined bit-field types only in ISO C.
2730
23a5b65a
RS
27312014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
2732
2733 Update copyright years
2734
f9030485
RS
27352014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
2736
2737 * c-array-notation.c: Use the standard form for the copyright notice.
2738
41958c28
BI
27392013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
2740
2741 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
2742 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
2743 field in parser is not empty. If not-empty, call the function
2744 c_parser_finish_omp_declare_simd.
2745 (c_parser_cilk_clause_vectorlength): Modified function to be shared
2746 between SIMD-enabled functions and #pragma simd. Added new parameter.
2747 (c_parser_cilk_all_clauses): Modified the usage of the function
2748 c_parser_cilk_clause_vectorlength as mentioned above.
2749 (c_parser_cilk_simd_fn_vector_attrs): New function.
2750 (c_finish_cilk_simd_fn_tokens): Likewise.
2751 (is_cilkplus_vector_p): Likewise.
2752 (c_parser_omp_clause_name): Added checking for "vectorlength,"
2753 "nomask," and "mask" strings in clause name.
2754 (c_parser_omp_all_clauses): Added 3 new case statements:
2755 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
2756 PRAGMA_CILK_CLAUSE_NOMASK.
2757 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
2758 check for vector attribute and if so call the function
2759 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
2760 called the function c_finish_cilk_simd_fn_tokens.
2761 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
2762 parser field is non-empty. If so, parse them as you would parse
2763 the omp declare simd pragma.
2764 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
2765 Added a check when step is a parameter and flag it as error.
2766 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
2767 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
2768 pragma_omp_clause.
2769
cef0fd0e
TS
27702013-12-17 Thomas Schwinge <thomas@codesourcery.com>
2771
2772 * c-parser.c (c_parser_omp_parallel): Fix description.
2773
12893402
BI
27742013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
2775
2776 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
2777 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
2778 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
2779 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
2780
296674db
JM
27812013-12-04 Joseph Myers <joseph@codesourcery.com>
2782
2783 PR c/52023
2784 * c-parser.c (c_parser_alignas_specifier): Use
2785 c_sizeof_or_alignof_type instead of c_alignof.
2786 (c_parser_alignof_expression): Likewise, with min_alignof
2787 parameter depending on alignof spelling used.
2788
edd28054
MP
27892013-12-04 Marek Polacek <polacek@redhat.com>
2790
2791 PR c/54113
2792 * c-decl.c (start_function): Don't warn for missing prototype for
2793 inline functions.
2794
da0fc454
MP
27952013-12-03 Marek Polacek <polacek@redhat.com>
2796
2797 PR c/59351
2798 * c-decl.c (build_compound_literal): Allow compound literals with
2799 empty initial value.
2800
4c2ecab0
JM
28012013-12-02 Joseph Myers <joseph@codesourcery.com>
2802
2803 PR c/58235
2804 * c-typeck.c (build_modify_expr): Diagnose assignment to
2805 expression with array type.
2806
340baef7
JM
28072013-11-29 Joseph Myers <joseph@codesourcery.com>
2808
2809 PR c/42262
2810 * c-typeck.c (process_init_element): Do not treat a string as
2811 initializing a whole array when used with a designator for an
2812 individual element.
2813
6763b9f7
JM
28142013-11-29 Joseph Myers <joseph@codesourcery.com>
2815
2816 PR c/57574
2817 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
2818 an inline function following a static declaration.
2819
e7bd1de1
JJ
28202013-11-28 Jakub Jelinek <jakub@redhat.com>
2821
2822 PR c/59310
2823 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
2824 to p_name before calling c_parser_omp_teams instead of after.
2825 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
2826 argument. Remove unused p_name variable.
2827
0136f8f0
AH
28282013-11-27 Aldy Hernandez <aldyh@redhat.com>
2829 Jakub Jelinek <jakub@redhat.com>
2830
2831 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
2832 external_scope is NULL.
2833
241b71bb
TV
28342013-11-27 Tom de Vries <tom@codesourcery.com>
2835 Marc Glisse <marc.glisse@inria.fr>
2836
2837 PR c++/59032
2838 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
2839
2fb9a547
AM
28402013-11-22 Andrew MacLeod <amacleod@redhat.com>
2841
2842 * c-typeck.c: Add required include files from gimple.h.
2843
8400e75e
DM
28442013-11-22 David Malcolm <dmalcolm@redhat.com>
2845
2846 * c-decl.c (define_label, shadow_tag_warned)
2847 (check_bitfield_type_and_width, grokdeclarator, grokparms,
2848 store_parm_decls_newstyle, store_parm_decls_oldstyle)
2849 (declspecs_add_type): Remove use of in_system_header macro.
2850 * c-parser.c (c_parser_unary_expression): Likewise.
2851 * c-typeck.c (store_init_value, process_init_element)
2852 (c_start_case): Likewise.
2853
2854 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
2855 macro.
2856
2857 * c-parser.c (c_parser_set_source_position_from_token): Remove
2858 reference to in_system_header from comment.
2859
386b1f1f
RS
28602013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2861
2862 * c-decl.c (grokdeclarator): Update comment to refer to
2863 tree_to_[su]hwi rather than tree_low_cst.
2864
ae7e9ddd
RS
28652013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2866
2867 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
2868 tree_to_uhwi throughout.
2869
9439e9a1
RS
28702013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2871
2872 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
2873 throughout.
2874
9541ffee
RS
28752013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2876
2877 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
2878 throughout.
2879
c02065fc
AH
28802013-11-15 Aldy Hernandez <aldyh@redhat.com>
2881
2882 * c-parser.c (c_parser_cilk_simd): New.
2883 (c_parser_cilk_verify_simd): New.
2884 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
2885 (c_parser_omp_for_loop): Add case for NE_EXPR.
2886 Set c_break_label for CILK_SIMD.
2887 (c_parser_cilk_clause_vectorlength): New.
2888 (c_parser_cilk_clause_linear): New.
2889 (c_parser_cilk_clause_name): New.
2890 (c_parser_cilk_all_clauses): New.
2891 * c-typeck.c (build_unary_op): Pass location argument to
2892 readonly_error.
2893 (build_modify_expr): Same.
2894 (build_asm_expr): Same.
2895 (c_finish_bc_stmt): Error on break/continue in loops.
2896
18f429e2
AM
28972013-11-14 Andrew MacLeod <amacleod@redhat.com>
2898
2899 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
2900
d8a2d370
DN
29012013-11-14 Diego Novillo <dnovillo@google.com>
2902
2903 * c-decl.c: Include print-tree.h.
2904 Include stor-layout.h.
2905 Include varasm.h.
2906 Include attribs.h.
2907 Include stringpool.h.
2908 * c-lang.c: Include fold-const.h.
2909 * c-parser.c: Include stringpool.h.
2910 Include attribs.h.
2911 Include stor-layout.h.
2912 Include varasm.h.
2913 Include trans-mem.h.
2914 * c-typeck.c: Include stor-layout.h.
2915 Include trans-mem.h.
2916 Include varasm.h.
2917 Include stmt.h.
2918
38b7bc7f
JM
29192013-11-13 Joseph Myers <joseph@codesourcery.com>
2920
2921 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
2922 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
2923 __auto_type.
2924 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
2925 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
2926 RID_AUTO_TYPE.
2927 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
2928 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
2929 (c_parser_declarator, c_parser_direct_declarator_inner)
2930 (c_parser_parameter_declaration, c_parser_type_name): All callers
2931 changed.
2932 (c_parser_declaration_or_fndef): Handle declarations with type
2933 determined from the initializer.
2934
45b0be94
AM
29352013-11-12 Andrew MacLeod <amacleod@redhat.com>
2936
18f429e2 2937 * c-typeck.c: Include gimplify.h.
45b0be94 2938
582d9b50
JM
29392013-11-12 Joseph Myers <joseph@codesourcery.com>
2940
2941 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
2942 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
2943 comment.
2944 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
2945 or _Thread_local as appropriate in diagnostics.
2946 (build_null_declspecs): Initialize ret->thread_gnu_p.
2947 (declspecs_add_scspec): Handle either __thread or _Thread_local
2948 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
2949 pedantic. Do not disallow _Thread_local extern and _Thread_local
2950 static.
2951
267bac10
JM
29522013-11-07 Joseph Myers <joseph@codesourcery.com>
2953 Andrew MacLeod <amacleod@redhat.com>
2954
2955 * c-aux-info.c (gen_type): Handle atomic qualifier.
2956 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
2957 qualifiers when compating types.
2958 (shadow_tag_warned): Handle atomic_p in declspecs.
2959 (quals_from_declspecs): Likewise.
2960 (start_decl): Use c_type_promotes_to when promoting argument
2961 types.
2962 (grokdeclarator): Handle _Atomic.
2963 (get_parm_info): Diagnose any qualifier on "void" as only
2964 parameter.
2965 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
2966 comparing types. Use c_type_promotes_to when promoting argument
2967 types.
2968 (finish_function): Use c_type_promotes_to when promoting argument
2969 types.
2970 (build_null_declspecs): Handle atomic_p in declspecs.
2971 (declspecs_add_qual): Handle RID_ATOMIC.
2972 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
2973 (c_token_starts_declspecs): Handle RID_ATOMIC.
2974 (c_parser_declspecs): Handle atomic type specifiers and
2975 qualifiers.
2976 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
2977 from types of expressions with atomic type.
2978 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
2979 (c_parser_attribute_any_word): Handle RID_ATOMIC.
2980 (c_parser_initializer, c_parser_initelt, c_parser_initval)
2981 (c_parser_statement_after_labels, c_parser_switch_statement)
2982 (c_parser_for_statement, c_parser_expr_no_commas)
2983 (c_parser_conditional_expression, c_parser_binary_expression)
2984 (c_parser_cast_expression, c_parser_unary_expression)
2985 (c_parser_postfix_expression)
2986 (c_parser_postfix_expression_after_primary, c_parser_expression):
2987 Use convert_lvalue_to_rvalue.
2988 (c_parser_expression_conv, c_parser_expr_list): Document
2989 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
2990 (c_parser_objc_synchronized_statement): Use
2991 convert_lvalue_to_rvalue.
2992 (c_parser_objc_selector): Handle RID_ATOMIC.
2993 (c_parser_objc_receiver, c_parser_array_notation): Use
2994 convert_lvalue_to_rvalue.
2995 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
2996 _Atomic (type-name).
2997 (struct c_declspecs): Add atomic_p field.
2998 (convert_lvalue_to_rvalue): Declare.
2999 * c-typeck.c (c_type_promotes_to): Promote atomic types to
3000 corresponding atomic types.
3001 (qualify_type): Don't add _Atomic qualifiers from second argument.
3002 (comp_target_types): Do not allow _Atomic mismatches.
3003 (type_lists_compatible_p): Do not remove atomic qualifiers when
3004 comparing types.
3005 (really_atomic_lvalue, convert_lvalue_to_rvalue)
3006 (build_atomic_assign): New functions.
3007 (build_unary_op): Use build_atomic_assign for atomic increment and
3008 decrement.
3009 (build_conditional_expr): Do not treat _Atomic void as a qualified
3010 version of void.
3011 (build_modify_expr): Use build_atomic_assign for atomic LHS.
3012 (find_anonymous_field_with_type, convert_to_anonymous_field)
3013 (convert_for_assignment): Do not remove atomic qualifiers when
3014 comparing types.
3015 (digest_init): Do not accept initialization of arrays of atomic
3016 elements by string constants.
3017 (build_asm_expr): Use convert_lvalue_to_rvalue.
3018 (build_binary_op): Do not treat _Atomic void as a qualified
3019 version of void.
3020
0c249d4b
DD
30212013-11-06 DJ Delorie <dj@redhat.com>
3022
3023 * c-decl.c (locate_old_decl): If a previous conflicting decl is
3024 both explicit and builtin, print the location of the explicit one.
3025
6d7f7e0a
TB
30262013-11-05 Tobias Burnus <burnus@net-b.de>
3027
3028 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
3029 c_parser_omp_distribute, c_parser_omp_teams,
3030 c_parser_omp_target, c_parser_omp_declare): Handle
3031 -fopenmp-simd.
3032
b906f4ca
MP
30332013-11-03 Marek Polacek <polacek@redhat.com>
3034
3035 * c-decl.c (grokdeclarator): Add VLA instrumentation.
3036
ee1d5a02
JJ
30372013-11-01 Jakub Jelinek <jakub@redhat.com>
3038
3039 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
3040 check_dup_generic at the end, unless remove is true.
3041 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
3042 remove = true;.
3043 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
3044
5a9785fb
JJ
30452013-10-31 Jakub Jelinek <jakub@redhat.com>
3046
3047 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
3048 with decl that is not pointer nor array.
3049
939b37da
BI
30502013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
3051
3052 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
3053 a spawning function is found.
3054 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
3055 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
3056 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
3057 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
3058 case.
3059 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
3060 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
3061 expr.
3062 (c_finish_return): Added a check to reject _Cilk_spawn in return
3063 expression.
3064 (build_cilk_spawn): New function.
3065 (build_cilk_sync): Likewise.
3066 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
3067
d4af74d4
TB
30682013-10-27 Tobias Burnus <burnus@net-b.de>
3069
3070 PR other/33426
3071 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
3072 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
3073 (c_parser_statement_after_labels): Update calls.
3074
d73749df 30752013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
3076
3077 PR other/33426
3078 * c-parser.c (c_parser_pragma, c_parser_for_statement):
3079 Handle PRAGMA_IVDEP.
3080 (c_parser_statement_after_labels): Update call.
3081
f28aa681
MP
30822013-10-24 Marek Polacek <polacek@redhat.com>
3083
3084 * c-parser.c (c_parser_struct_declaration): Add a comment.
3085 (c_parser_declarator): Don't allow _Alignas here.
3086
0645c1a2
AM
30872013-10-17 Andrew MacLeod <amacleod@redhat.com>
3088
3089 * c-parser.c: Include omp-low.h.
3090 * c-typeck.c: Likewise.
3091
568a31f2
MP
30922013-10-17 Marek Polacek <polacek@redhat.com>
3093
3094 PR c/58267
3095 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
3096 Document syntax of the array-declarator.
3097 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
3098 are not permitted.
3099 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
3100 (c_parser_struct_declaration): Likewise.
3101 (c_parser_declarator): Likewise.
3102 (c_parser_direct_declarator_inner): Likewise.
3103 (c_parser_parameter_declaration): Likewise.
3104 (c_parser_type_name): Likewise.
3105
acf0174b
JJ
31062013-10-11 Jakub Jelinek <jakub@redhat.com>
3107
3108 * c-lang.h (current_omp_declare_target_attribute): New extern
3109 decl.
3110 * c-parser.c: Include c-lang.h.
3111 (struct c_parser): Change tokens to c_token *.
3112 Add tokens_buf field. Change tokens_avail type to unsigned int.
3113 (c_parser_consume_token): If parser->tokens isn't
3114 &parser->tokens_buf[0], increment parser->tokens.
3115 (c_parser_consume_pragma): Likewise.
3116 (enum pragma_context): Add pragma_struct and pragma_param.
3117 (c_parser_external_declaration): Adjust
3118 c_parser_declaration_or_fndef caller.
3119 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
3120 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
3121 Adjust recursive call.
3122 (c_parser_struct_or_union_specifier): Use pragma_struct instead
3123 of pragma_external.
3124 (c_parser_parameter_declaration): Use pragma_param instead of
3125 pragma_external.
3126 (c_parser_compound_statement_nostart, c_parser_label,
3127 c_parser_for_statement): Adjust
3128 c_parser_declaration_or_fndef callers.
3129 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
3130 it through to c_parser_conditional_expression.
3131 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
3132 pass it through to c_parser_binary_expression. Adjust recursive
3133 call.
3134 (c_parser_binary_expression): Remove prec argument, add
3135 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
3136 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
3137 binop matches it, use build2 instead of parser_build_binary_op.
3138 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
3139 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
3140 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
3141 Handle pragma_struct and pragma_param the same as pragma_external.
3142 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
3143 (c_parser_omp_variable_list): Parse array sections for
3144 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
3145 (c_parser_omp_clause_collapse): Fully fold collapse expression.
3146 (c_parser_omp_clause_reduction): Handle user defined reductions.
3147 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
3148 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
3149 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
3150 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
3151 c_parser_omp_clause_depend, c_parser_omp_clause_map,
3152 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
3153 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
3154 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
3155 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
3156 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
3157 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
3158 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
3159 (c_parser_omp_for_loop): Add CODE argument, pass it through
3160 to c_finish_omp_for. Change last argument to cclauses,
3161 and adjust uses to grab parallel clauses from the array of all
3162 the split clauses. Adjust c_parser_binary_expression,
3163 c_parser_declaration_or_fndef and c_finish_omp_for callers.
3164 (omp_split_clauses): New function.
3165 (c_parser_omp_simd): New function.
3166 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
3167 Allow the function to be called also when parsing combined constructs,
3168 and call c_parser_omp_simd when parsing for simd.
3169 (c_parser_omp_sections_scope): If section-sequence doesn't start with
3170 #pragma omp section, require exactly one structured-block instead of
3171 sequence of statements.
3172 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
3173 Allow the function to be called also when parsing combined constructs.
3174 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
3175 Allow the function to be called also when parsing combined
3176 constructs.
3177 (c_parser_omp_taskgroup, c_parser_omp_cancel,
3178 c_parser_omp_cancellation_point, c_parser_omp_distribute,
3179 c_parser_omp_teams, c_parser_omp_target_data,
3180 c_parser_omp_target_update, c_parser_omp_target,
3181 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
3182 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
3183 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
3184 (c_parser_omp_construct): Add p_name and mask vars. Handle
3185 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
3186 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
3187 and c_parser_omp_sections callers.
3188 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
3189 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
3190 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
3191 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
3192 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
3193 OMP_CLAUSE_DEPEND.
3194 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
3195 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
3196 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
3197 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
3198 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
3199 * c-typeck.c: Include tree-inline.h.
3200 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
3201 handle_omp_array_sections_1, handle_omp_array_sections,
3202 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
3203 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
3204 user defined reductions.
3205 (c_tree_equal): New function.
3206 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
3207 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
3208 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
3209 c_check_omp_declare_reduction_r): New prototypes.
3210 * c-decl.c (current_omp_declare_target_attribute): New variable.
3211 (c_decl_attributes): New function.
3212 (start_decl, start_function): Use it instead of decl_attributes.
3213 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
3214 c_omp_reduction_decl, c_omp_reduction_lookup,
3215 c_check_omp_declare_reduction_r): New functions.
3216
0a6c2227
TT
32172013-09-25 Tom Tromey <tromey@redhat.com>
3218
3219 * Make-lang.in (c/gccspec.o): Remove.
3220 (CFLAGS-c/gccspec.o): New variable.
3221 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
3222 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
3223 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
3224
f3bc55f0
TT
32252013-09-25 Tom Tromey <tromey@redhat.com>
3226
3227 * Make-lang.in (c/gccspec.o): Don't use subshell.
3228
a24d975c
MP
32292013-09-18 Marek Polacek <polacek@redhat.com>
3230
3231 PR sanitize/58443
3232 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
3233 Remove unnecessary check.
3234
ce6923c5
MP
32352013-09-18 Marek Polacek <polacek@redhat.com>
3236
3237 PR sanitizer/58411
3238 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
3239 no_sanitize_undefined attribute.
3240
a1e51df9
KT
32412013-09-13 Kai Tietz <ktietz@redhat.com>
3242
3243 PR target/57848
3244 * c-decl.c (c_builtin_function_ext_scope): Remove
3245 wrong assumption that it is never called on prexisting
3246 symbol.
3247
0af94e6f
JR
32482013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
3249
3250 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
3251
20059c8b
GDR
32522013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
3253
3254 * c-objc-common.c (c_tree_printer): Tidy.
3255
de5a5fa1
MP
32562013-08-30 Marek Polacek <polacek@redhat.com>
3257
3258 * c-typeck.c (build_binary_op): Add division by zero and shift
3259 instrumentation.
3260
2531a1d9 32612013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 3262 Joseph Myers <joseph@codesourcery.com>
2531a1d9 3263
6e2bcc98 3264 PR c/35649
2531a1d9
JR
3265 * c-typeck.c (c_common_type): Prefer double_type_node over
3266 other REAL_TYPE types with the same precision.
3267 (convert_arguments): Likewise.
3268
025311c4
GDR
32692013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
3270
3271 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
3272 (c_initialize_diagnostics): Call a destructor for the early printer.
3273
da6ca2b5
GDR
32742013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
3275
3276 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
3277 printer initialization.
3278
318cda85 32792013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 3280
318cda85
BI
3281 PR c/57490
3282 * c-array-notation.c (fix_conditional_array_notations_1): Added a
3283 check for truth values.
3284 (expand_array_notation_exprs): Added truth values case. Removed an
3285 unwanted else. Added for-loop to walk through subtrees in default
3286 case.
3287
b066401f
GDR
32882013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
3289
3290 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
3291
fb48aadc
JM
32922013-07-23 Joseph Myers <joseph@codesourcery.com>
3293
3294 * c-parser.c (struct c_generic_association): Fix typo.
3295
433cc7b0
TT
32962013-07-23 Tom Tromey <tromey@redhat.com>
3297 Joseph Myers <joseph@codesourcery.com>
3298
3299 * c-parser.c (struct c_generic_association): New.
3300 (c_generic_association_d): New typedef.
3301 (c_parser_generic_selection): New function.
3302 (c_parser_postfix_expression): Handle RID_GENERIC.
3303
26d40c3d
JM
33042013-07-13 Jason Merrill <jason@redhat.com>
3305
3306 PR c++/57793
3307 * c-decl.c (finish_struct): Check for too-large class.
3308
ecdbd01a 33092013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
3310
3311 PR c/57821
3312 * c-typeck.c (set_init_index): When folding, check for index overflow.
3313
1141ed3f
BI
33142013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
3315
3316 * c-parser.c (c_parser_array_notation): Removed rejection of array
3317 notations in an array of function pointers.
3318
713b46fa
BI
33192013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
3320
3321 * c-array-notation.c (make_triplet_val_inv): New function.
3322 (create_cmp_incr): Likewise.
3323 (create_array_refs): Likewise.
3324 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
3325 Also modularized common parts between functions and called the function.
3326 (build_array_notation_expr): Likewise.
3327 (fix_conditional_array_notations_1): Likewise.
3328 (fix_array_notation_expr): Likewise.
3329 (fix_array_notation_call_expr): Likewise.
3330
92f20202
MP
33312013-06-18 Marek Polacek <polacek@redhat.com>
3332
3333 PR c/57630
3334 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
3335
73a23b06
BI
33362013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
3337
3338 * c-array-notation.c (build_array_notation_expr): Reject array notation
3339 mismatch between LHS and RHS even inside a call_expr. Also, removed
3340 a couple while statements that were dead code.
3341
00b8517d
BI
33422013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
3343
3344 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
3345 excessive precision expressions in function parameters. Also removed
3346 couple unwanted while statements.
3347
1509bdda
BI
33482013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
3349
3350 * c-array-notation.c (expand_array_notation_exprs): Added
3351 ARRAY_NOTATION_REF case.
3352
d60f1706
BI
33532013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
3354
3355 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
3356 function to c-family/array-notation-common.c.
3357 (is_cilkplus_reduce_builtin): Likewise.
3358 (find_rank): Likewise.
3359 (extract_array_notation_exprs): Likewise.
3360 (replace_array_notations): Likewise.
3361 (find_inv_trees): Likewise.
3362 (replace_inv_trees): Likewise.
3363 (contains_array_notation_expr): Likewise.
3364 (find_correct_array_notation_type): Likewise.
3365 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
3366 (struct inv_list): Moved this to c-family/array-notation-common.c.
3367 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
3368
6d6efbb3
BI
33692013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
3370
3371 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
3372 reduction functions outside the for-loop. Added a check if the fundecl
3373 is non-NULL. Finally, removed an unwanted if-statement, and made the
3374 body unconditional.
3375
25c22937
BI
33762013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
3377
3378 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
3379 condition of the if-statement matches the rank of else-block and then-
3380 block when array notations are used.
3381 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
3382 expression after the entire function body is parsed.
3383 (c_parser_expr_no_commas): Delayed creating array notation expressions
3384 to the end of function parsing.
3385 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
3386 whole if-statement instead of just the condition.
3387 (expand_array_notation_exprs): Added MODIFY_EXPR case.
3388
edd25645
BI
33892013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
3390
3391 PR c/57474
3392 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
3393 array to NULL_TREE if they are unused. Also added a check for the
3394 field to be NULL before its fields are used in future.
3395
065ce7f1
RO
33962013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3397
3398 PR bootstrap/57450
3399 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
3400 (build_array_notation_expr): Likewise.
3401
36536d79
BI
34022013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
3403
3404 * c-typeck.c (build_array_ref): Added a check to see if array's
3405 index is greater than one. If true, then emit an error.
3406 (build_function_call_vec): Exclude error reporting and checking
3407 for builtin array-notation functions.
3408 (convert_arguments): Likewise.
3409 (c_finish_return): Added a check for array notations as a return
3410 expression. If true, then emit an error.
3411 (c_finish_loop): Added a check for array notations in a loop
3412 condition. If true then emit an error.
3413 (lvalue_p): Added a ARRAY_NOTATION_REF case.
3414 (build_binary_op): Added a check for array notation expr inside
3415 op1 and op0. If present, we call another function to find correct
3416 type.
3417 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
3418 * c-parser.c (c_parser_compound_statement): Check if array
3419 notation code is used in tree, if so, then transform them into
3420 appropriate C code.
3421 (c_parser_expr_no_commas): Check if array notation is used in LHS
3422 or RHS, if so, then build array notation expression instead of
3423 regular modify.
3424 (c_parser_postfix_expression_after_primary): Added a check for
3425 colon(s) after square braces, if so then handle it like an array
3426 notation. Also, break up array notations in unary op if found.
3427 (c_parser_direct_declarator_inner): Added a check for array
3428 notation.
3429 (c_parser_compound_statement): Added a check for array notation in
3430 a stmt. If one is present, then expand array notation expr.
3431 (c_parser_if_statement): Likewise.
3432 (c_parser_switch_statement): Added a check for array notations in
3433 a switch statement's condition. If true, then output an error.
3434 (c_parser_while_statement): Similarly, but for a while.
3435 (c_parser_do_statement): Similarly, but for a do-while.
3436 (c_parser_for_statement): Similarly, but for a for-loop.
3437 (c_parser_unary_expression): Check if array notation is used in a
3438 pre-increment or pre-decrement expression. If true, then expand
3439 them.
3440 (c_parser_array_notation): New function.
3441 * c-array-notation.c: New file.
3442 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
3443
cd192ccc
MS
34442013-05-23 Mike Stump <mikestump@comcast.net>
3445
3446 * c-typeck.c (convert_for_assignment): Handle references to memory
3447 spaces better.
3448
427b248d
JM
34492013-05-16 Jason Merrill <jason@redhat.com>
3450
3451 * Make-lang.in (cc1$(exeext)): Use link mutex.
3452
44d90fe1
PC
34532013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
3454
3455 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
3456 to simply use OPT_Wpointer_arith.
3457 (build_unary_op): Likewise.
3458
4e7d7b3d
JJ
34592013-04-03 Jakub Jelinek <jakub@redhat.com>
3460
3461 PR c/19449
3462 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
3463 argument. If set, or it temporarily for parsing of the first
3464 argument into force_folding_builtin_constant_p.
3465 (c_parser_postfix_expression): Adjust callers.
3466
839b422f
RB
34672013-03-21 Richard Biener <rguenther@suse.de>
3468
3469 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
3470 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
3471
2ee028f1
MP
34722013-02-12 Marek Polacek <polacek@redhat.com>
3473
3474 PR c/44938
3475 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
3476 origtypes to NULL.
3477
8824edff
JJ
34782013-01-24 Jakub Jelinek <jakub@redhat.com>
3479
3480 PR c/56078
3481 * c-typeck.c (set_nonincremental_init_from_string): If
3482 constructor_max_index is NULL, treat it as if tree_int_cst_lt
3483 returned false.
3484 (process_init_element): Likewise.
3485
eadd3d0d
JJ
34862012-12-20 Jakub Jelinek <jakub@redhat.com>
3487
3488 PR c++/55619
3489 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
3490 argument, don't call default_function_array_conversion
3491 nor c_fully_fold here.
3492 (c_parser_asm_statement): Adjust callers.
3493 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
3494 and outputs here, and call default_function_array_conversion
3495 on inputs that don't need to be addressable.
3496
f8a93a2e
JJ
34972012-12-18 Jakub Jelinek <jakub@redhat.com>
3498
3499 PR c/39464
3500 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
3501 warning require that both c_common_unsigned_type as well as
3502 c_common_signed_type is the same for both mvl and mvr types.
3503
9771b263
DN
35042012-11-16 Diego Novillo <dnovillo@google.com>
3505
3506 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
3507
3508 * c-common.c: Use new vec API in vec.h.
3509 * c-common.h: Likewise.
3510 * c-gimplify.c: Likewise.
3511 * c-pragma.c: Likewise.
3512 * c-pretty-print.c: Likewise.
3513 * c-pretty-print.h: Likewise.
3514 * c-semantics.c: Likewise.
3515 * c-decl.c: Likewise.
3516 * c-parser.c: Likewise.
3517 * c-tree.h: Likewise.
3518 * c-typeck.c: Likewise.
3519
880661a4
JW
35202012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
3521
3522 PR c++/54930
3523 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
3524
077d1abe
MLI
35252012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3526
3527 PR c/53066
3528 * c-decl.c (warn_if_shadowing): Do not warn if a variable
3529 shadows a function, unless the variable is a function or a
3530 pointer-to-function.
3531
3a785c97
JJ
35322012-10-12 Jakub Jelinek <jakub@redhat.com>
3533
3534 PR c/54381
3535 * c-parser.c (struct c_tree_loc_pair): Removed.
3536 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
3537 add location_t * and tree * arguments, fill in array of 3
3538 sizeof_arg trees and corresponding locs.
3539 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
3540 c_parser_expr_list callers.
3541 (c_parser_postfix_expression_after_primary): Likewise. Pass
3542 array of 3 sizeof_arg trees and locs (corresponding to first
3543 3 arguments) to sizeof_pointer_memaccess_warning.
3544
703c8606
LC
35452012-10-09 Lawrence Crowl <crowl@google.com>
3546
3547 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
3548 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
3549 hash table.
3550
5d9de0d0
PC
35512012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
3552
3553 PR c++/54194
3554 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
3555 call.
3556
a212e43f
MG
35572012-10-09 Marc Glisse <marc.glisse@inria.fr>
3558
3559 PR c++/54427
3560 * c-typeck.c: Include c-common.h.
3561 (enum stv_conv): Moved to c-common.h.
3562 (scalar_to_vector): Moved to c-common.c.
3563 (build_binary_op): Adapt to scalar_to_vector's new prototype.
3564 * Make-lang.in: c-typeck.c depends on c-common.h.
3565
3b78de56
AC
35662012-10-04 Arnaud Charlet <charlet@adacore.com>
3567
3568 * c-decl.c (c_write_global_declarations): Fix handling of
3569 -fdump-ada-spec*.
3570
78c60e3d
SS
35712012-09-30 Sharad Singhai <singhai@google.com>
3572
3573 * c-decl.c (c_write_global_declarations): Use a different method
3574 to determine if the dump has ben initialized.
3575
9f33203d
JM
35762012-09-14 Joseph Myers <joseph@codesourcery.com>
3577
3578 PR c/54552
3579 * c-typeck.c (c_cast_expr): When casting to a type requiring
3580 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
3581 c_fully_fold first.
3582
a27d595d
JM
35832012-09-14 Joseph Myers <joseph@codesourcery.com>
3584
3585 PR c/54103
3586 * c-typeck.c (build_unary_op): Pass original argument of
3587 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
3588 any C_MAYBE_CONST_EXPR, if it has integer operands.
3589 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
3590 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
3591 to c_objc_common_truthvalue_conversion, then remove any
3592 C_MAYBE_CONST_EXPR, if they have integer operands. Use
3593 c_objc_common_truthvalue_conversion not
3594 c_common_truthvalue_conversion.
3595 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
3596 call note_integer_operands for arguments with integer operands
3597 that are not integer constants.
3598
9feb29df
JJ
35992012-09-13 Jakub Jelinek <jakub@redhat.com>
3600
3601 PR c/54559
3602 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
3603 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
3604
d409320c
JJ
36052012-08-31 Jakub Jelinek <jakub@redhat.com>
3606
3607 PR c/54428
3608 * c-convert.c (convert): Don't call fold_convert_loc if
3609 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
3610 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
3611 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
3612
6265d07c
JJ
36132012-08-24 Jakub Jelinek <jakub@redhat.com>
3614
3615 PR c/54355
3616 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
3617 for nested and empty_ok arguments in the call to
3618 c_parser_declaration_or_fndef.
3619
1a4049e7
JJ
36202012-08-17 Jakub Jelinek <jakub@redhat.com>
3621
3622 * c-tree.h (c_last_sizeof_arg): Declare.
3623 * c-parser.c (struct c_tree_loc_pair): New type.
3624 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
3625 non-NULL.
3626 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
3627 (c_parser_postfix_expression_after_primary): Likewise. Call
3628 sizeof_pointer_memaccess_warning if needed.
3629 (sizeof_ptr_memacc_comptypes): New function.
3630 * c-typeck.c (c_last_sizeof_arg): New global variable.
3631 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
3632
0229aee9
UB
36332012-07-24 Uros Bizjak <ubizjak@gmail.com>
3634
3635 * c-lang.h (lang_decl): Add variable_size GTY option.
3636
7ee2468b
SB
36372012-07-16 Steven Bosscher <steven@gcc.gnu.org>
3638
3639 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
3640 * Make-lang.in: Fix dependencies.
3641
d4a10d0a
SB
36422012-06-29 Steven Bosscher <steven@gcc.gnu.org>
3643
3644 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
3645 and add language Makefile hooks.
3646 * config-lang.in: New file.
3647 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
3648 add the required "normal" config-lang.in rules.
3649 * c-lang.h: Moved from gcc/ to here.
3650 * c-tree.h: Likewise.
3651 * c-objc-common.c: Likewise.
3652 * c-objc-common.h: Likewise.
3653 * c-typeck.c: Likewise.
3654 * c-convert.c: Likewise.
3655 * c-lang.c: Likewise.
3656 * c-aux-info.c: Likewise.
3657 * c-errors.c: Likewise.
3658 * gccspec.c: Likewise.
3659 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
3660 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
3661\f
818ab71a 3662Copyright (C) 2012-2016 Free Software Foundation, Inc.
d4a10d0a
SB
3663
3664Copying and distribution of this file, with or without modification,
3665are permitted in any medium without royalty provided the copyright
3666notice and this notice are preserved.